/*--------------------------------*- 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      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

libs            (overset fvMotionSolvers     "librigidBodyDynamicsCOM.so"
    "libforcesCOM.so"
    "librigidBodyMeshMotionCOM.so"
);

DebugSwitches
{
    overset                 0;
    dynamicOversetFvMesh    0;
    cellVolumeWeight        0;
}

application     overPimpleDyMFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         1.0;

deltaT          0.00001;

writeControl    adjustable;

writeInterval   0.0001;

purgeWrite      0;

writeFormat     ascii;

writePrecision  8;

writeCompression off;

timeFormat      general;

timePrecision   8;

runTimeModifiable false;

adjustTimeStep  false;

maxCo          	0.5;

maxDeltaT       0.0001;

functions
{
   wingRforce.dat
   {
    type            forces;
    libs            ("libforcesCOM.so");
    patches         (R00 R02 R03 R04 R12 R13 R14 R20 R21 R22 R23 R30 R31 R32 R40 R41 R42 R51 R61);
   
    writeControl        runTime;
    writeInterval       0.001;

    rho         rhoInf;
    rhoInf      1.293;

    cofRname	R12part;	// Open this body file and read the center of rotation. this file will be updated every time step.
    CofR        (0 0 0);	//  If cofRname exists, this value is neglected.
    log		false;
   }

   wingLforce.dat
   {
    type            forces;
    libs            ("libforcesCOM.so");
    patches         (L00 L02 L03 L04 L12 L13 L14 L20 L21 L22 L23 L30 L31 L32 L40 L41 L42 L51 L61);
   
    writeControl        runTime;
    writeInterval       0.001;

    rho         rhoInf;
    rhoInf      1.293;

    cofRname	L12part;
    CofR        (0 0 0);	
    log		false;
   }

   totalforce.dat
   {
    type            forces;
    libs            ("libforcesCOM.so");
    patches         (R00 R02 R03 R04 R12 R13 R14 R20 R21 R22 R23 R30 R31 R32 R40 R41 R42 R51 R61 L00 L02 L03 L04 L12 L13 L14 L20 L21 L22 L23 L30 L31 L32 L40 L41 L42 L51 L61 thorax abdomen);
   
    writeControl        runTime;
    writeInterval       0.001;

    rho         rhoInf;
    rhoInf      1.293;

    cofRname	thoraxpart;
    CofR        (0 0 0);	//  Center of rotation will be updated ever time step based on "totalforce.dat" file.
    log		false;
   }
}

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