Become an Expert ANSYS Fluent User — Ep 17
UDF: Sloshing of a Tanker Truck
- Lesson
- 17
- Run Time
- 14m 37s
- Published
- Jun 14, 2026
- Category
- ANSYS Fluent
- Course Progress
- 0%
Sloshing of a Tanker Truck — ANSYS Fluent CFD Simulation
This project simulates the sloshing behavior of liquid inside a tanker truck during braking, using ANSYS Fluent. The two-phase flow field is modeled using the Volume of Fluid (VOF) method, with air as the primary phase and water as the secondary phase. The truck is traveling at 15 m/s and decelerates to a stop over 3 seconds, meaning the water inside the tank experiences both gravitational acceleration and braking deceleration during this period.
Geometry and Mesh
The geometry was created in SpaceClaim, with the tanker measuring 12,300 × 1,900.1867 mm. The model was meshed in ANSYS Meshing using a structured mesh throughout the domain, totaling 233,700 cells.
Setup and Assumptions
Given the incompressible nature of the flow, a pressure-based, transient solver is used. Gravity is set to -9.81 m/s² along the Y-axis, while braking deceleration is applied along the X-axis as 5 m/s² for the first 3 seconds and zero afterward, defined through a time-dependent expression.
The multiphase model is set to VOF with two phases—air (primary) and water (secondary)—using sharp interface modeling, explicit formulation, and a constant surface tension coefficient of 0.072 N/m. Turbulence is modeled using the realizable k-epsilon model with scalable wall functions.
Air is defined with a density of 1.225 kg/m³ and viscosity of 1.7894×10⁻⁵ kg/m·s, while water-liquid has a density of 998.2 kg/m³ and viscosity of 0.001003 kg/m·s.
The SIMPLE scheme is used for pressure-velocity coupling, with PRESTO! for pressure and second-order upwind discretization for momentum, turbulent kinetic energy, and turbulent dissipation rate. The volume fraction is solved using a compressive scheme. The domain is initialized using the standard method, with the water region patched to a volume fraction of 1.
The simulation runs with a time step size of 0.002 s, a maximum of 20 iterations per time step, and a total of 5,000 time steps.
Results
Upon completion, contours of velocity, pressure, water volume fraction, eddy viscosity, streamlines, and turbulence intensity are extracted. The results show that under the combined effects of gravity and braking deceleration, the water inside the tanker shifts and impacts the front wall of the tank. After the 3-second braking period ends, the truck comes to rest and gravity becomes the only force acting on the water.