Close

17th February 2014

OpenFOAM 2.3.0: Mesh Motion

Mesh Morphing

In previous versions, rigid body motion simulations use one of the generic motion solvers, e.g. displacementSBRStress that solves an elliptic equation for the displacement. These motion solvers suffer from a tendency of cells to shear, and despite various attempts to stiffen cells against shearing particularly near rotating boundaries, mesh quality can often degrade under fairly modest rotations.

In this version the rigid body motion framework uses a specialised motion solver, which uses an interpolation of displacement and rotation based on the distance to the object to move. The interpolation method is spherical linear interpolation, or Slerp , which enforces smoothness and the distance function has a cosine profile to preserve shape of cells close to the moving surface.

box_mesh_motion_initial
box_mesh_motion_rotated

Solid Body Motion

OpenFOAM supports mesh morphing six degree of freedom (6-DoF) body motion, e.g. to simulate a floating object prescribed by centre of mass, mass, moment of inertia, etc.. A 6-DoF solid body can be specified through a boundary condition on a patch prescribing the boundary of the solid body. This existing functionality is still supported in version 2.3.0, but sixDoFRigidBodyMotion can additionally be specified as a mesh morphing solver within the dynamicMeshDict file, e.g.

dynamicFvMesh       dynamicMotionSolverFvMesh;
motionSolverLibs    ("libsixDoFRigidBodyMotion.so");
solver              sixDoFRigidBodyMotion;

sixDoFRigidBodyMotionCoeffs
{
    patches         (hull);
    innerDistance   0.3;   // Extent of the solid-body motion region around body
    outerDistance   1;     // Extent of mesh-morphing region around body

    centreOfMass    (2.929541 0 0.2);
    mass            412.73;
    momentOfInertia (40 921 921);
    rhoInf          1;
    report          on;
    accelerationRelaxation 0.3;
    value           uniform (0 0 0);

    constraints
    {
        zAxis
        {
            sixDoFRigidBodyMotionConstraint line;
            direction     (0 0 1);
        }
        yPlane
        {
            sixDoFRigidBodyMotionConstraint axis;
            axis          (0 1 0);
        }
    }

    restraints
    {
        translationDamper
        {
            sixDoFRigidBodyMotionRestraint linearDamper;
            coeff         8596;
        }
        rotationDamper
        {
            sixDoFRigidBodyMotionRestraint sphericalAngularDamper;
            coeff         11586;
        }
    }
}

This example uses the constraints and restraints system, which has been overhauled to use explicit correction of the motion rather than force adjustment, to obey constraints while avoiding high-frequency force fluctuations induced by the force correction. The naming and coefficient specification has been rationalised to improve control and usability.

Source code

  • 6-DoF rigid body motion
    $FOAM_SRC/sixDoFRigidBodyMotion

Examples

  • wing motion
    $FOAM_TUTORIALS/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam
  • floating object
    $FOAM_TUTORIALS/multiphase/interDyMFoam/ras/floatingObject
  • DTC hull
    $FOAM_TUTORIALS/multiphase/interDyMFoam/ras/DTCHull