1

Previous: Multiple Reference Frame – Up: Rotation using OpenFOAM Next: Dynamic Meshes in OpenFOAM
This is an automatically generated documentation by LaTeX2HTML utility. In case of any issue, please, contact us at info@cfdsupport.com.

Solid Body Motion

  • The second approach we would like to mention is using solidBodyMotion, where one part of a mesh is moving relatively to the other part of the mesh. Of course, this takes more computational time but on the other hand is more reliable.
  • We use prepared case from training materials and we copy the original mesh to it.
    # cd $FOAM_RUN /mixerCase
    # cp -r wholeMesh/constant/polyMesh SBMCase/constant
    # cd SBMCase
    %	pRefPoint	(0.02 0.02 0);
    %	pRefValue	0;
    
  • We set water initial conditions by setFields just as we did in the previous section crossref 3.
    # cp 0/alpha.water.org 0/alpha.water
    # setFields
  • To set the rotation, we need to create cell zone as same as in MRF case. Let us look at the file topoSetDict.
    # cat system/topoSetDict
    actions
    (
            {
                    name    rotor;
                    type    cellSet;
                    action  new;
                    source  cylinderToCell;
                    sourceInfo
                    {
                            p1 (0 0 0);
                            p2 (0 0 0.1);
                            radius 0.1;
                    }
            }
    );
    
  • Run topoSet utility.
    # topoSet
    # setsToZones
    %solidBodyMotionFvMeshCoeffs
    %{
    %   cellZone        rotor;
    %
    %   solidBodyMotionFunction  rotatingMotion;
    %   rotatingMotionCoeffs
    %   {
    %      CofG             (0 0 0); // cofg = center of gravity
    %      radialVelocity   (0 0 360); // deg/s
    %   }
    %}
    
  • Rotation itself is set in dynamicMeshDict.
    # cat constant/dynamicMeshDict
    dynamicFvMesh   dynamicMotionSolverFvMesh;
    
    solver solidBody;
    
    motionSolverLibs ( "libfvMotionSolvers.so" );
    
    solidBodyCoeffs
    {
            cellZone        rotor;
    
            solidBodyMotionFunction  rotatingMotion;
            rotatingMotionCoeffs
            {
                    origin        (0 0 0);
                    axis          (0 0 1);
                    omega         6.28318;
            }
    }
    
  • Now we can run the case by interFoam or run it in parallel.
    # decomposePar
    # mpiexec -np 2 interFoam -parallel > log.interFoam 2>&1
    # reconstructPar
100
101

Figure: solidBodyMotion results visualization, time 102and 103