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

dynamicFvMesh       dynamicOversetFvMesh;

motionSolverLibs    ("librigidBodyDynamicsCOM.so"
    "libforcesCOM.so"
    "librigidBodyMeshMotionCOM.so"
);
motionSolver        rigidBodyMotion;

report          off;
g               ( 0 0 -9.8065 );

solver
{
    type NewmarkCOM;
//    gamma   0.75;    // Velocity integration coefficient:	"gamma > 0.5" is unconditionary stable, but low accuracy.  
//    beta    0.390625;    // Position integration coefficient:	beta = (gamma+0.5)^2/4	
}

Iteration_number_for_MB	1;

//OutputFiles	(flyingfishbody);	// save the center of rotation.

golocalCoordinateSystem	(1 0 0  0 1 0  0 0 1);

bodies
{
    flyingfishbody
    {
        type            rigidBody;
        parent          root;
        mass            0.090;
        inertia         (3940e-9 0 0  4210e-9 0  2140e-9);	
        centreOfMass    (-0.014 0.014 0);			/* global coordinate system */
        transform       $golocalCoordinateSystem $centreOfMass;
        joint {
            type            composite;
            joints ( 
                {   type Pxyz;	}
                {   type Rxyz;	}
            );
        }
        patches         (flyingfish);
        innerDistance   0;
        outerDistance   101;
    }
}

restraints
{
}

FSI	false;

// ******* flyingfish parameters *******
fishLength	0.2;	// fish body length [m]
fishCenter	(0 0 0);	// fish center position (x, y, z) [m]
pitchAttitude	0.785398;	// fish pitch attitude [rad]

motionFreq	40;	// wave motion frequency [Hz]
waveLength	0.2;	// wave length for wave motion [m]
amplitude	0.02;	// wave motion maplitude[m]

rollMotion	(0.261799 40 1.570796);	// roll motion parameters (amplitude [rad], freq [Hz], phase [rad] )

relaxation_time 0.025;	// relaxation time for stable calculation




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