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

dynamicFvMesh   dynamicMotionSolverFvMesh;

motionSolverLibs (sixDoFRigidBodyMotion);

motionSolver    sixDoFRigidBodyMotion;

// Not necessarily useful here, but can have different motion updates types
updateControl   timeStep;
updateInterval  1;


patches         (wing);
innerDistance   0.3;
outerDistance   1;

mass            22.9;
//centreOfMass    (0.4974612746 -0.01671895744 0.125);
centreOfMass    (0.25 0.007 0.125);
centreOfRotation (0.25 0.007 0.125);
momentOfInertia (1.958864357 3.920839234 40.6452);
orientation
(
    0.9953705935 0.09611129781 0
    -0.09611129781 0.9953705935 0
    0 0 1
);
velocity        (0 0 0);
acceleration    (0 0 0);
angularMomentum (0 0 107.70978);
g               (0 0 0);
rho             rhoInf;
rhoInf          1e-10;//1.225;
report          on;

/*solver
{
    type symplectic;
}*/

solver
{
    //type symplectic; //2nd order explicit
    type     Newmark; //2nd order implicit with outer correction
    gamma    0.5; //Velocity integration coefficient
    beta     0.25; //Position integration coefficient
    /*type     CrankNicolson; //2nd order implicit with outer correction
    aoc      0.5; //Acceleration off-centering coefficient
    voc      0.25; //Velocity off-centering coeffcieient*/

}

constraints
{
    zAxis
    {
        sixDoFRigidBodyMotionConstraint axis;
        axis                (0 0 1);
    }
    
    pointConstrating
    {
        sixDoFRigidBodyMotionConstraint   point;
        centreOfRotation                              (0.25 0.007 0.125);
    };
}

restraints
{
    axialSpring
    {
        sixDoFRigidBodyMotionRestraint nonLinearAxialAngularSpring;

        axis            (0 0 1);
        
        dampingModelType         Rayleigh;
        c1    20;
        c2    50;
        referenceOrientation $orientation;
        
        modelType       stiffnessList;

        stiffnessList
        {
            interpolationType linear;
            outOfBounds       EXTRAPOLATE;

            values
            (
                (-0.1745329  -2459.578788)
                (-0.1727876  -2414.034624)
                (-0.1710423  -2369.122069)
                (-0.1692969  -2324.834744)
                (-0.1675516  -2281.166268)
                (-0.1658063  -2238.110261)
                (-0.1640609  -2195.660345)
                (-0.1623156  -2153.810138)
                (-0.1605703  -2112.553261)
                (-0.1588250  -2071.883335)
                (-0.1570796  -2031.793978)
                (-0.1553343  -1992.278812)
                (-0.1535890  -1953.331457)
                (-0.1518436  -1914.945532)
                (-0.1500983  -1877.114657)
                (-0.1483530  -1839.832453)
                (-0.1466077  -1803.092540)
                (-0.1448623  -1766.888538)
                (-0.1431170  -1731.214068)
                (-0.1413717  -1696.062748)
                (-0.1396263  -1661.428199)
                (-0.1378810  -1627.304042)
                (-0.1361357  -1593.683897)
                (-0.1343904  -1560.561383)
                (-0.1326450  -1527.930120)
                (-0.1308997  -1495.783730)
                (-0.1291544  -1464.115831)
                (-0.1274090  -1432.920045)
                (-0.1256637  -1402.189991)
                (-0.1239184  -1371.919289)
                (-0.1221730  -1342.101559)
                (-0.1204277  -1312.730422)
                (-0.1186824  -1283.799497)
                (-0.1169371  -1255.302405)
                (-0.1151917  -1227.232766)
                (-0.1134464  -1199.584199)
                (-0.1117011  -1172.350326)
                (-0.1099557  -1145.524766)
                (-0.1082104  -1119.101139)
                (-0.1064651  -1093.073065)
                (-0.1047198  -1067.434165)
                (-0.1029744  -1042.178058)
                (-0.1012291  -1017.298365)
                (-0.0994838  -992.788705)
                (-0.0977384  -968.642700)
                (-0.0959931  -944.853968)
                (-0.0942478  -921.416131)
                (-0.0925025  -898.322808)
                (-0.0907571  -875.567619)
                (-0.0890118  -853.144184)
                (-0.0872665  -831.046124)
                (-0.0855211  -809.267059)
                (-0.0837758  -787.800608)
                (-0.0820305  -766.640392)
                (-0.0802851  -745.780031)
                (-0.0785398  -725.213145)
                (-0.0767945  -704.933355)
                (-0.0750492  -684.934279)
                (-0.0733038  -665.209539)
                (-0.0715585  -645.752754)
                (-0.0698132  -626.557545)
                (-0.0680678  -607.617532)
                (-0.0663225  -588.926335)
                (-0.0645772  -570.477573)
                (-0.0628319  -552.264867)
                (-0.0610865  -534.281838)
                (-0.0593412  -516.522105)
                (-0.0575959  -498.979288)
                (-0.0558505  -481.647007)
                (-0.0541052  -464.518883)
                (-0.0523599  -447.588536)
                (-0.0506145  -430.849585)
                (-0.0488692  -414.295652)
                (-0.0471239  -397.920355)
                (-0.0453786  -381.717316)
                (-0.0436332  -365.680153)
                (-0.0418879  -349.802488)
                (-0.0401426  -334.077941)
                (-0.0383972  -318.500131)
                (-0.0366519  -303.062678)
                (-0.0349066  -287.759203)
                (-0.0331613  -272.583327)
                (-0.0314159  -257.528668)
                (-0.0296706  -242.588847)
                (-0.0279253  -227.757484)
                (-0.0261799  -213.028200)
                (-0.0244346  -198.394614)
                (-0.0226893  -183.850346)
                (-0.0209440  -169.389017)
                (-0.0191986  -155.004247)
                (-0.0174533  -140.689656)
                (-0.0157080  -126.438863)
                (-0.0139626  -112.245490)
                (-0.0122173  -98.103155)
                (-0.0104720  -84.005480)
                (-0.0087266  -69.946085)
                (-0.0069813  -55.918588)
                (-0.0052360  -41.916612)
                (-0.0034907  -27.933775)
                (-0.0017453  -13.963697)
                (0.0000000   0.000000)
                (0.0017453   13.963697)
                (0.0034907   27.933775)
                (0.0052360   41.916612)
                (0.0069813   55.918588)
                (0.0087266   69.946085)
                (0.0104720   84.005480)
                (0.0122173   98.103155)
                (0.0139626   112.245490)
                (0.0157080   126.438863)
                (0.0174533   140.689656)
                (0.0191986   155.004247)
                (0.0209440   169.389017)
                (0.0226893   183.850346)
                (0.0244346   198.394614)
                (0.0261799   213.028200)
                (0.0279253   227.757484)
                (0.0296706   242.588847)
                (0.0314159   257.528668)
                (0.0331613   272.583327)
                (0.0349066   287.759203)
                (0.0366519   303.062678)
                (0.0383972   318.500131)
                (0.0401426   334.077941)
                (0.0418879   349.802488)
                (0.0436332   365.680153)
                (0.0453786   381.717316)
                (0.0471239   397.920355)
                (0.0488692   414.295652)
                (0.0506145   430.849585)
                (0.0523599   447.588536)
                (0.0541052   464.518883)
                (0.0558505   481.647007)
                (0.0575959   498.979288)
                (0.0593412   516.522105)
                (0.0610865   534.281838)
                (0.0628319   552.264867)
                (0.0645772   570.477573)
                (0.0663225   588.926335)
                (0.0680678   607.617532)
                (0.0698132   626.557545)
                (0.0715585   645.752754)
                (0.0733038   665.209539)
                (0.0750492   684.934279)
                (0.0767945   704.933355)
                (0.0785398   725.213145)
                (0.0802851   745.780031)
                (0.0820305   766.640392)
                (0.0837758   787.800608)
                (0.0855211   809.267059)
                (0.0872665   831.046124)
                (0.0890118   853.144184)
                (0.0907571   875.567619)
                (0.0925025   898.322808)
                (0.0942478   921.416131)
                (0.0959931   944.853968)
                (0.0977384   968.642700)
                (0.0994838   992.788705)
                (0.1012291   1017.298365)
                (0.1029744   1042.178058)
                (0.1047198   1067.434165)
                (0.1064651   1093.073065)
                (0.1082104   1119.101139)
                (0.1099557   1145.524766)
                (0.1117011   1172.350326)
                (0.1134464   1199.584199)
                (0.1151917   1227.232766)
                (0.1169371   1255.302405)
                (0.1186824   1283.799497)
                (0.1204277   1312.730422)
                (0.1221730   1342.101559)
                (0.1239184   1371.919289)
                (0.1256637   1402.189991)
                (0.1274090   1432.920045)
                (0.1291544   1464.115831)
                (0.1308997   1495.783730)
                (0.1326450   1527.930120)
                (0.1343904   1560.561383)
                (0.1361357   1593.683897)
                (0.1378810   1627.304042)
                (0.1396263   1661.428199)
                (0.1413717   1696.062748)
                (0.1431170   1731.214068)
                (0.1448623   1766.888538)
                (0.1466077   1803.092540)
                (0.1483530   1839.832453)
                (0.1500983   1877.114657)
                (0.1518436   1914.945532)
                (0.1535890   1953.331457)
                (0.1553343   1992.278812)
                (0.1570796   2031.793978)
                (0.1588250   2071.883335)
                (0.1605703   2112.553261)
                (0.1623156   2153.810138)
                (0.1640609   2195.660345)
                (0.1658063   2238.110261)
                (0.1675516   2281.166268)
                (0.1692969   2324.834744)
                (0.1710423   2369.122069)
                (0.1727876   2414.034624)
                (0.1745329   2459.578788)
            );
        }
    }
}


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