Mixing air, water, oil and mercury in a cylindrical mixer

Update: July 10, 2017
OpenFOAM 4.x
This tutorial does not give proper results in OpenFOAM 4.1 due to a bug.

Case directory



We calculate the mixing of air, water, oil, and mercury in a mixer with moving mesh function. The region "rotor" rotates at 6.2832 rad/s with the Z-axis as the rotation axis, and the calculation is performed as a two-dimensional problem with one mesh in the Z direction.

Model geometry Model geometry

The rotation axis and the rotation speed are defined in the file "constant/dynamicMeshDict" as follows.

dynamicFvMesh   solidBodyMotionFvMesh;
motionSolverLibs ( "libfvMotionSolvers.so" );
    cellZone        rotor;

    solidBodyMotionFunction  rotatingMotion;
        origin        (0 0 0);
        axis          (0 0 1);
        omega         6.2832;

The rotation area is defined as the cell zone "rotor" as shown in the figure below (white part).

Cell zone rotor Cell zone "rotor"

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

Mesh Meshes

The initial arrangement and ID value of each phase are shown below.

  • Water: 0.0
  • Oil: 1.0
  • Mercury: 2.0
  • Air: 3.0
Fluids at initial time (alphas) Fluids at initial time (alphas)


cp -r $FOAM_TUTORIALS/multiphase/multiphaseInterDyMFoam/laminar/mixerVesselAMI2D mixerVesselAMI2D
cd mixerVesselAMI2D

m4 < system/blockMeshDict.m4 > system/blockMeshDict

rm -rf 0
cp -r 0.orig 0

mpirun -np 4 multiphaseInterDyMFoam -parallel


Calculation time

The calculation may fail in OpenFOAM 4.1.