Taming the Waves Within: Understanding Sloshing and Simulating It with DualSPHysics
Have you ever tried to walk quickly while carrying a full, shallow mug of hot coffee? You take a few steps, and suddenly the coffee starts rocking back and forth, amplifying with every stride until it spills over the edge.
Congratulations, you’ve just experienced sloshing.
While spilling coffee is an annoyance, when that “mug” is a liquid natural gas (LNG) carrier, a tanker truck on a highway, or a rocket rocketing toward orbit, sloshing becomes a multi-million-dollar, potentially life-threatening engineering challenge.
Here is a dive into the physics of sloshing, the chaos it causes in the real world, and how engineers use cutting-edge simulation tools like DualSPHysics to predict and control it.

The Anatomy of Sloshing
At its core, sloshing refers to the movement of liquid inside another object, typically one that is undergoing motion.
For sloshing to occur, the liquid must have a “free surface”—an interface between the liquid and a gas (like fuel and the pressurized gas above it). When the container moves, accelerates, or vibrates, the liquid responds.
The real danger emerges from resonance. Every fluid volume inside a specific tank shape has a natural frequency. If the external movement of the vehicle matches that natural frequency, the fluid waves amplify exponentially. This creates violent impacts against the tank walls, known as sloshing impacts or hydraulic jumps.
Why the Real World Cares: The High Stakes of Sloshing
Sloshing isn’t just an academic curiosity; it dictates the design of massive global industries.
- Aerospace & Rocketry: Fuel makes up the vast majority of a rocket’s mass. If that liquid fuel sloshes rhythmically, it can shift the rocket’s center of gravity drastically, confusing the guidance systems and causing the rocket to tumble out of control. (Early SpaceX Falcon 1 flights and historical Apollo missions had to heavily engineer around this).
- Maritime (LNG Carriers): Ships transporting Liquid Natural Gas feature massive, insulated membrane tanks. Violent ocean storms can induce sloshing that slams millions of gallons of heavy liquid against the tank walls, potentially fracturing the cryogenic insulation.
- Transportation: Tanker trucks carrying water, milk, or hazardous chemicals are highly susceptible to rollover accidents. A sudden lane change can cause the fluid payload to surge to one side, flipping the truck.
- Civil Engineering: During an earthquake, water in elevated water towers or large swimming pools sloshes violently, creating massive dynamic loads that can compromise the structural integrity of the building.
To combat this, engineers install baffles—internal walls with holes that act as breakwaters to disrupt the fluid’s momentum. But to design a baffle, you first have to simulate the chaos.
Enter SPH and DualSPHysics
Historically, simulating violent sloshing with traditional grid-based Computational Fluid Dynamics (CFD) has been a nightmare. Grid-based methods (like Finite Volume) struggle when the surface of the liquid breaks apart, splashes, or folds over itself. The computational “mesh” gets tangled and fails.
Smoothed Particle Hydrodynamics (SPH) is the perfect antidote.
Instead of a fixed grid, SPH represents the fluid as a collection of interacting, discrete particles. Because it is meshless, SPH can effortlessly handle massive deformations, violent splashing, and fragmented liquid surfaces.
DualSPHysics is an open-source powerhouse built specifically for this. It takes the SPH method and turbocharges it using GPU (Graphics Processing Unit) acceleration. This allows engineers to simulate millions of fluid particles in highly complex tank geometries incredibly fast.
How to Simulate and Estimate Sloshing Using DualSPHysics
If you want to use DualSPHysics to test a tank design, the workflow is highly intuitive:
- Geometry Creation (The Tank and Fluid):Using the built-in DesignSPHysics GUI (or FreeCAD macros), you draw your tank and your initial block of fluid. This is also where you experiment with different anti-sloshing baffle designs—adding rings, perforated plates, or cross-walls inside the tank.
- Assigning Kinematics (The Motion):DualSPHysics excels at moving boundaries. You can apply specific motion profiles to the tank walls. For example, you can input a sinusoidal sway (side-to-side) or pitch motion to simulate a ship in rolling waves, or import real-world acceleration data from a rocket telemetry file.
- Running the GPU Solver:The software calculates the interactions of all the fluid particles as the tank moves, computing the weakly compressible Navier-Stokes equations to simulate the violent fluid-structure interaction.
- Estimation and Data Extraction:Visualizing a cool splash is nice, but engineering requires numbers. In DualSPHysics, you use post-processing tools to estimate the impact:
- Measure Forces: You can calculate the exact force and torque the fluid particles exert on the tank boundary particles over time.
- Pressure Probes: You can place virtual sensors anywhere on the tank walls to record peak impact pressures when a sloshing wave hits.
- Center of Mass Tracking: The software can output the real-time coordinates of the fluid’s center of mass. This data is critical for vehicle stability control systems.
By comparing the peak forces and center of gravity shifts in a “baffled” tank versus an “empty” tank in DualSPHysics, you can definitively prove if your engineering solution works before a single piece of metal is cut.
CloudHPC is a HPC provider to run engineering simulations on the cloud. CloudHPC provides from 1 to 224 vCPUs for each process in several configuration of HPC infrastructure - both multi-thread and multi-core. Current software ranges includes several CAE, CFD, FEA, FEM software among which OpenFOAM, FDS, Blender and several others.
New users benefit of a FREE trial of 300 vCPU/Hours to be used on the platform in order to test the platform, all each features and verify if it is suitable for their needs