Sloshing of water in a tank (3D)

Update: July 28, 2017
OpenFOAM 4.x

Case directory



Model geometry Model geometry

We calculate the water flow in a shaking tank using the mesh movement function for 40 seconds. The volume of water is assumed to be about 20% of the tank, and the rest is air.

The properties of the water and air are specified in the file "constant/transportProperties".

The movement of the mesh is specified in the file "constant/dynamicMeshDict" as follows.

dynamicFvMesh   solidBodyMotionFvMesh;
    solidBodyMotionFunction SDA;
        CofG            (0 0 0);
        lamda           50;
        rollAmax        0.22654;
        rollAmin        0.10472;
        heaveA          3.79;
        swayA           2.34;
        Q               2;
        Tp              13.93;
        Tpn             11.93;
        dTi             0.059;
        dTp             -0.001;

SDA means Ship Design Analysis, which provides three degrees of freedom (roll, heave, and sway) of motion. The meaning of each parameter is as follows.

SDA parameters
CofGCenter of Gravitym
lamdaModel scale rationone
rollAmaxMaximum roll amplituderad
rollAminMinimum roll amplituderad
heaveAHeave amplitudem
swayASway amplitudem
QDamping rationone
TpTime period of liquidsec
TpnEigen periodsec
dTiReference time stepsec
dTpIncrease in Tp per unit dTi
Motion of a ship Motion of a ship

The following settings are made in the file "system/controlDict" to output the pressure "p" at the specified point and surface. The output data will be saved in the folder "postProcessing".

        type            probes;
        libs ("");
        writeControl   timeStep;
        writeInterval  1;
            (0 9.95 19.77)
            (0 -9.95 19.77)
        fixedLocations  false;

The meshes are as follows, and the number of mesh is 25840.

Mesh Meshes

The calculation result is as follows.

Surface boundary of water
Surface boundary of water at initial time Surface boundary of water at initial time
Surface boundary of water at final time Surface boundary of water at final time
Pressure p at the specified coordinates Pressure "p" at the specified coordinates. Solid line: coordinates (0, 9.95, 19.77), dashed line: coordinates (0, -9.95, 19.77).


cp -r $FOAM_TUTORIALS/multiphase/interDyMFoam/ras/sloshingTank3D sloshingTank3D
cd sloshingTank3D

m4 system/blockMeshDict.m4 > system/blockMeshDict
cp 0/alpha.water.orig 0/alpha.water

# Display in 3D

# Draw the pressures at the specified coordinates as a graph
gnuplot>plot "postProcessing/probes/0/p" using 1:2 title 'point 1' with lines lc rgb "black", "postProcessing/probes/0/p" using 1:3 title 'point 2' with lines dt (5,5) lc rgb "black"

Calculation time

46 minutes 15.88 seconds *Single, Inter(R) Core(TM) i7-2600 CPU @ 3.40GHz 3.40GHz