/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2312                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dynamicFvMesh   dynamicOversetFvMesh; //for overset mesh

motionSolverLibs ( "libsixDoFRigidBodyMotion.so" );

displacementLaplacianCoeffs
{
    //diffusivity     uniform 1; 
}

solver          sixDoFRigidBodyMotion;

sixDoFRigidBodyMotionCoeffs
{
    patches         (walls);

    innerDistance   100;
    outerDistance   101;
        
    accelerationRelaxation 0.95;
    accelerationDamping 0.05;
   
    mass 0.1571; // Effective body mass
   
    momentOfInertia (0.00995 0.04909 0.03941);  // Moment of inertia
    
    /*initial
        {
            velocity    (0 0 0);
            //angularMomentum (0 0.0003731 0);
              
        }*/
        
    orientation     (0.9659 0 -0.2588 0 1 0 0.2588 0 0.9659);
    //omega           (0 0.0076 0);

    centreOfMass (0 0.05 0);// Centre of mass location
    rho             rhoInf;
    rhoInf          1;
        
    report          on; // Motion reporting
    reportToFile    on;    
    
    // Time integration solver
    solver
    {
        type Newmark;
    } 
    
    //searchMethod    banana;    
    
    // Motion constraints
    constraints
    {
        yrotationAxis
        {
        sixDoFRigidBodyMotionConstraint axis; //along which direction it can rotate
        axis (0 1 0);
        }

        yPlane
        {
        sixDoFRigidBodyMotionConstraint plane; //along which direction it can't translate
        normal (0 1 0);  
        }
        
        xPlane
        {
        sixDoFRigidBodyMotionConstraint plane; //along which direction it can't translate
        normal (1 0 0);  
        }
        
        zPlane
        {
        sixDoFRigidBodyMotionConstraint plane; //along which direction it can't translate
        normal (0 0 1);  
        }
    }

} 



// ************************************************************************* //
