Mixing tank

Update: June 1, 2017
OpenFOAM 4.x
This tutorial cannot be run on Ubuntu 14.04 LTS version of OpenFOAM, you need to use Ubuntu 16.04 LTS version of OpenFOAM or build foamyHexMesh by yourself.

Case directory



We use foamyHexMesh to create the mesh. The original shape is defined in (STL format) files under the directory constant/triSurface and the mesh settings are defined in the file system/foamyHexMeshDict.

Model geometry (whole) Model geometry (whole)
Model geometry (internal mixer and stator) Model geometry (internal mixer and stator)

After creating the mesh, we will calculate the flow for 5 seconds for the case where a liquid tank is stirred with gas passing through it.

The rotation speed of the mixer is specified in the file constant/dynamicMeshDict as follows.

dynamicFvMesh   solidBodyMotionFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" );
    cellZone        rotating;
    solidBodyMotionFunction  rotatingMotion;
        origin        (0 0 0);
        axis          (0 0 1);
        omega         -5;

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

Mesh Meshes
Mesh (internal mixer and stator) Mesh (internal mixer and stator)

The calculation result is as follows.

Flow velocity (U)
Volume fraction of gas phase (alpha-phase1)
Flow velocity at the final time (U) Flow velocity at the final time (U)
Volume fraction of gas phase at the final time (alpha-phase1) Volume fraction of gas phase at the final time (alpha-phase1)
Pressure distribution on the mixer surface at the final time (p_rgh) Pressure distribution on the mixer surface at the final time (p_rgh)


cp -r $FOAM_TUTORIALS/mesh/foamyHexMesh/mixerVessel mixerVessel
cd mixerVessel

rm -rf 0

surfaceBooleanFeatures intersection constant/triSurface/vessel.stl constant/triSurface/spargerShaft.stl -perturb
surfaceBooleanFeatures intersection constant/triSurface/vessel.stl constant/triSurface/shaft.stl -perturb
surfaceBooleanFeatures intersection constant/triSurface/spargerShaft.stl constant/triSurface/spargerInlet.stl -perturb
surfaceBooleanFeatures intersection constant/triSurface/stirrer.stl constant/triSurface/shaftRotating.stl -perturb
surfaceBooleanFeatures intersection constant/triSurface/stirrer_baffles.stl constant/triSurface/stirrer.stl -surf1Baffle -perturb
surfaceBooleanFeatures intersection constant/triSurface/rotating.stl constant/triSurface/shaft.stl -surf1Baffle -perturb

surfaceBooleanFeatures intersection constant/triSurface/stirrer_baffles_1.obj constant/triSurface/stirrer_baffles_plate.obj -surf1Baffle -surf2Baffle
surfaceBooleanFeatures intersection constant/triSurface/stirrer_baffles_2.obj constant/triSurface/stirrer_baffles_plate.obj -surf1Baffle -surf2Baffle
surfaceBooleanFeatures intersection constant/triSurface/stirrer_baffles_3.obj constant/triSurface/stirrer_baffles_plate.obj -surf1Baffle -surf2Baffle
surfaceBooleanFeatures intersection constant/triSurface/stirrer_baffles_4.obj constant/triSurface/stirrer_baffles_plate.obj -surf1Baffle -surf2Baffle
surfaceBooleanFeatures intersection constant/triSurface/stirrer_baffles_5.obj constant/triSurface/stirrer_baffles_plate.obj -surf1Baffle -surf2Baffle
surfaceBooleanFeatures intersection constant/triSurface/stirrer_baffles_6.obj constant/triSurface/stirrer_baffles_plate.obj -surf1Baffle -surf2Baffle

# Making meshes
cp system/controlDict.mesh system/controlDict
blockMesh -region backgroundMeshDecomposition
decomposePar -region backgroundMeshDecomposition
mpirun -np 8 foamyHexMesh -parallel
mpirun -np 8 collapseEdges -collapseFaces -latestTime -dict system/collapseDict.collapseFaces -parallel
mpirun -np 8 checkMesh -allTopology -allGeometry -latestTime -parallel
reconstructParMesh -latestTime

latestTime=$(foamListTimes -latestTime)
cp -r $latestTime/polyMesh constant
rm -rf $latestTime

cp system/controlDict.flow system/controlDict
rm -rf 0

createBaffles -overwrite
mergeOrSplitBaffles -split -overwrite
createPatch -overwrite
cp -r 0.orig 0

# Calculating
decomposePar -force
mpirun -np 8 interDyMFoam -parallel
reconstructPar -noFunctionObjects


Calculation time

  • Making meshes: 51 minutes and 53.7 seconds. *8 parallel
  • Calculating: 7 days, 6 hours, 13 minutes and 4 seconds. *8 parallel

※Inter(R) Core(TM) i7-2600 CPU @ 3.40GHz 3.40GHz