In fluid dynamics, sloshing refers to the movement of fluid inside a solid object, which can also be under motion. Some examples of this application are the fuel tank of racing cars (like in Formula 1 cars)  and the propellant slosh in spacecraft tanks and rockets .
In these applications, the fluid sloshing created by the large g-forces due to acceleration/braking/cornering can produce stability problems in the overall performance of the vehicle. In most of these applications, every drop of the fuel must be consumed and must be well distributed and controlled inside the tank. Being able to reliably predict the dynamics of fuel motion are an extremely important design points.
To influence fuel motion during dynamic events, anti-slosh devices such as solid baffles and trap-doors are widely used to limit the slosh effect inside the tanks. In the following applications, we will use one-way trap-doors (Figure 1) for “baffling”. The doors open based on the signed pressure difference between the two sides and the opening threshold value depends on the attached spring type, which typically is given by the manufacturer.
Figure 1: Trap-door examples. Pictures are taken from .
From the modelling perspective, we’ll use the helyxVoF solver, which is a Volume-of-Fluid  solver using the Flux-Corrected-Transport (FCT)  for the transport of the phase-field of the two fluids (air-fuel). Usually, the starting position of the fuel is predefined and the governing equations are solved to predict the fuel motion. For acceleration/braking modelling, the time-dependent g-force acceleration is provided by the user as input. One could use actual track data and model the fuel sloshing of an F1 car for a whole race lap.
General Approach for Trap-Door Modelling
Under the assumption that a moving trap-door does not significantly influence the flow simulation, there are multiple approaches to model the trap-door system:
- Porous Media Approach: The trap-door is represented as a thin porous media with high and zero values to model a solid and a pass through trap-door, respectively. The disadvantage of this approach is the reduced accuracy since the modelling of the wall using a porous media (via a force term in the momentum equation) is never as accurate as a real boundary, where the flow is blocked via boundary conditions (BCs).
- Baffled Boundary Approach: The trap-door as a baffle-boundary which behaves as cyclic or wall (no-slip) boundary. This is accomplished by special BCs where their contributions to the matrix assembly switch from cyclic to wall. From the programming point of view, this approach is not clean since every boundary condition of each field must be rewritten, leading to code duplication. Moreover, exceptions must be added in many places, such as in wall distance computation which is required from the turbulence models.
- Moving Trap-Door Boundary: A moving boundary option requires performing a re-mesh when a trap-door changes state, which is time-consuming since mesh-generation and solution mapping are computationally demanding.
- Generalized Internal Boundary (GIB): No topology changes, no re-meshing required, and easy treatment of physics in a single boundary. GIB is computationally efficient and general enough to use for many different problems.
With all the aforementioned options, the best option is to use the approach of Generalized Internal Boundaries (GIB).
Trap-Door Modelling Using GIB
The Generalised Internal Boundary Method (GIB) [5, 6] allows prescribing boundary conditions on internal faces of the domain on-the-fly. The GIB method consists of three main stages. Assume that we have a background mesh and an interface, as it is presented in Figure 2,
Figure 2: The three stages of GIB (left) identify closest points, (middle) impose BCs, and (right) apply contributions to transport equations
- First, the closest points of the background mesh from the interface are identified and projected onto the interface. This is similar to the “snapping” stage of the helyxHexMesh mesh generator. After this stage, some of the internal faces are located exactly on the interface. These internal faces constitute the GIB boundary.
- Second, we impose BCs for the fields on each side of the interface. Here, any existing BC is compatible with the GIB (for instance fixedValue for Dirichlet, zeroGradient for zero Neumann etc).
- Third, our main goal is to keep the computational cost as low as possible. For this reason, the BCs on the GIB must behave as a standard boundary and at the same time, the mesh topology should remain unchanged. Otherwise, data structure updates can slow down the performance of the simulation. To solve this problem, we modify the finite-volume implicit (fvm::) and explicit (fvc::) operators to inject on-the-fly the contributions of the aforementioned BCs into the matrix. All operators are modified and are now compatible with GIB.
To better understand the operator modifications, the computation of the gradient at a cell for the quantity ξ is given in Figure 3. Our goal is to compute the gradient of the quantity ξ. Firstly, the gradient expression is transformed from the volume to the surface integral using the Gauss divergence theorem. Based on the above formula, the gradient is equal to the sum of the ξ at the surrounding faces of the cell multiplied with the surface area. Assume now that we want to add a GIB on face 4. The contributions of the GIB boundaries to the matrix (CGIB) contain the contribution of the boundary condition (ξ5S5j) and one additional term (-ξ4S4j) which cancels out the already added contributions of the internal faces that collocate with the GIB (face 4). Based on the final expression, the middle cell behaves exactly (machine accuracy) as a standard (external) boundary of the domain without changing the mesh topology.
Figure 3: GIB and the gradient operator
Now that you have a brief explanation of how GIB is implemented, a few relevant examples will show how elegant this approach can be when applied to sloshing simulation.
Simple Application: 2D SLOSHING
The first application is a simple 2D geometry with 3 fuel tanks presented in the following Figure 4.
Figure 4: Two-dimensional sloshing example with GIB trap-doors
Three fuel tanks “communicate” via two ducts. Each duct contains a trap-door (red and green patch), which allows the fuel to flow from the side tanks to the middle one. The trap-doors are controlled using flow characteristics. In this case, we use the signed pressure difference between the two sides of the trap-door. Based on this control mechanism, the trap-door is either open or closed. Finally, the blue patches represent the atmospheric outlet boundaries to provide a fixed pressure for the flow solver.
Initially, the fuel is positioned in the side tanks (black regions) and, after the simulation starts, acceleration is applied to mimic cornering. The helyxVoF solver is selected to solve the governing VoF equations and the simulation time is 10 seconds.
The transient simulation results are show in the following video. As the fuel is sloshing, the trap-doors change state (close/open) in order to move the fuel from the side to the middle tank.
Figure 5: Transient sloshing results for a two-dimensional test case
Two-dimensional simulations provide tremendous insight into the dynamic behavior of the baffles on a simple system. A more challenging test would be to apply similar GIB-based trap-door mechanics to a three-dimensional VOF simulation.
Advanced Application: 3D FUEL TANK
The second application is the fuel sloshing of a 3D geometry composed by two side tanks (left and right). The tanks communicate via two trap-doors, which are modelled using GIBs. The red GIB allows flow from the right to the left tank, whereas the green one from the left to the right tank. Each tank has an atmospheric boundary (dark blue). The computational mesh is generated using the hex-dominant mesh generator helyxHexMesh and it has approximately 1e+6 cells.
Figure 6: Three-Dimensional Fuel tank Domain with trap-Doors
The fuel is represented with cyan colour and its initial position is only in the left tank. The GIBs switch from active (no-slip wall modelling) to inactive (pass-through/invisible) based on the signed pressure drop of the two sides of the GIB. The helyxVoF is selected as the multiphase flow solver and the k-ωSST model is chosen for turbulence modelling. When the trap-door is closed, the GIB inherits all the characteristics of a no-slip wall. This means that a) turbulent wall-function boundary conditions are imposed on the GIB and that b) the GIBs are considered in the wall-distance computation, which is required by the turbulence models. Additional g-force acceleration (Figure 7) is again added to model cornering over a chicane.
Figure 7: Gravitational forces imposed on the sloshing system vs time
The transient simulation results of the fuel sloshing are presented in the video in Figure 8. The fuel starts moving from the left to the right tank via the green trap-door, and, then, at the second corner (t=5-7s), the fuel moves back to the left tank from the red trap-door. The case is decomposed in 32 sub-domains (processors) and the overall computational cost is 3.5 hours (wall clock-time) on one AMD Epyc 7351 node.
Figure 8: Transient multiphase sloshing results using a GIB trap-door model
Overall, the case predicts the dynamic motion of the fuel free-surface as well as the trap-door mechanism to control the fuel motion during dynamic events.
To sum up, a new method for modelling trap-doors in fuel tanks is presented. Though these examples are based on a motorsport application, plenty of aerospace or automotive applications related to fuel management analysis could use the same approach. Furthermore, it’s worth mentioning that the GIB method is very versatile and general (hence the name “generalized” in GIB), which means that the presented applications are just one use of the GIB. The same mechanism can be used in other applications governed by other flow equations, for instance modelling windows in fire modelling applications.
- Technical F1. fuel tank, 1999.
- Hubert, C. “Behavior of Spinning Space Vehicles with Onboard Liquids“, NASA GSFC Symposium, 2003.
- Hirt, C.W. and Nichols, B.D. “Volume of Fluid (VOF) Method for the Dynamics of Free Boundaries“, Journal of Computational Physics, pp. 201-225, 1981.
- Boris, J.P. and Book, D.L. “Flux-corrected transport, I: SHASTA, a fluid transport algorithm that works“, Journal of Computational Physics, pp. 38-67, 1973.
- Karpouzas, G. “A Hybrid Method for Shape and Topology Optimization in Fluid Mechanics”. PhD Thesis, NTUA, 2019.
- Karpouzas, G. and de Villiers E. “Generalized Internal Boundaries (GIB)” , arXiv.org, 2017.
- Check Valve, TD150P