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

dynamicFvMesh      dynamicMotionSolverFvMesh;

motionSolverLibs ("libsixDoFRigidBodyMotion.so");

motionSolver    sixDoFRigidBodyMotion;

patches         ("prism");
innerDistance   1.0;
outerDistance   2.0;

mass            290.250212;
centreOfMass    (0. 0. 0.84);
momentOfInertia (7.1387e-6 1.14102e-4 1.2122e-4);
orientation
(
    1 0 0
    0 1 0
    0 0 1
);


velocity        (0 0.18 0);
acceleration    (0 0 0);
angularMomentum (0 0 0);
g               (0 0 0);
rho             rhoInf;
rhoInf          1.225;
report          on;

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

}

constraints
{
    fixedLine1
    {
        sixDoFRigidBodyMotionConstraint line;
        direction     (0 1 0);
    }

    fixedAxis1
    {
        sixDoFRigidBodyMotionConstraint orientation;//fixedAxis;
        tolerance       1e-06;
        relaxationFactor 0.7;
        fixedOrientationCoeffs {}
    }
}

restraints
{
    verticalSpring
    {
        sixDoFRigidBodyMotionRestraint nonLinearSpring;

        anchor          (0.0 0.0 0.84);
        refAttachmentPt (0.0 0.0 0.84);
        dampingModelType linear;
        c1              4.594375;
        restLength      0.0;

        stiffnessList
        {
            interpolationType linear;
            outOfBounds       EXTRAPOLATE;

            values
            (
	        (-0.123784	-5456.419282)
                (-0.123701	-5401.303936)
                (-0.123618	-5346.188589)
                (-0.123535	-5291.073243)
                (-0.123453	-5235.957897)
                (-0.12337	-5180.84255)
                (-0.123287	-5125.727204)
                (-0.123204	-5070.611858)
                (-0.123121	-5015.496512)
                (-0.123038	-4960.381165)
                (-0.122956	-4905.265819)
                (-0.122873	-4850.150473)
                (-0.12279	-4795.035127)
                (-0.122707	-4739.91978)
                (-0.122624	-4684.804434)
                (-0.122541	-4629.689088)
                (-0.122459	-4574.573741)
                (-0.122376	-4519.458395)
                (-0.122293	-4464.343049)
                (-0.12221	-4409.227703)
                (-0.122126	-4354.112356)
                (-0.12204	-4298.99701)
                (-0.121951	-4243.881664)
                (-0.121859	-4188.766317)
                (-0.121765	-4133.650971)
                (-0.121667	-4078.535625)
                (-0.121567	-4023.420279)
                (-0.121464	-3968.304932)
                (-0.121358	-3913.189586)
                (-0.121248	-3858.07424)
                (-0.121135	-3802.958893)
                (-0.121018	-3747.843547)
                (-0.120897	-3692.728201)
                (-0.120773	-3637.612855)
                (-0.120644	-3582.497508)
                (-0.120511	-3527.382162)
                (-0.120373	-3472.266816)
                (-0.120231	-3417.151469)
                (-0.120083	-3362.036123)
                (-0.119931	-3306.920777)
                (-0.119773	-3251.805431)
                (-0.119609	-3196.690084)
                (-0.119439	-3141.574738)
                (-0.119263	-3086.459392)
                (-0.11908	-3031.344046)
                (-0.11889	-2976.228699)
                (-0.118693	-2921.113353)
                (-0.118488	-2865.998007)
                (-0.118275	-2810.88266)
                (-0.118053	-2755.767314)
                (-0.117822	-2700.651968)
                (-0.117582	-2645.536622)
                (-0.117331	-2590.421275)
                (-0.117069	-2535.305929)
                (-0.116796	-2480.190583)
                (-0.116511	-2425.075236)
                (-0.116213	-2369.95989)
                (-0.115901	-2314.844544)
                (-0.115575	-2259.729198)
                (-0.115233	-2204.613851)
                (-0.114874	-2149.498505)
                (-0.114498	-2094.383159)
                (-0.114103	-2039.267812)
                (-0.113687	-1984.152466)
                (-0.113249	-1929.03712)
                (-0.112789	-1873.921774)
                (-0.112303	-1818.806427)
                (-0.111789	-1763.691081)
                (-0.111247	-1708.575735)
                (-0.110673	-1653.460388)
                (-0.110064	-1598.345042)
                (-0.109419	-1543.229696)
                (-0.108733	-1488.11435)
                (-0.108003	-1432.999003)
                (-0.107224	-1377.883657)
                (-0.106393	-1322.768311)
                (-0.105504	-1267.652964)
                (-0.104551	-1212.537618)
                (-0.103527	-1157.422272)
                (-0.102425	-1102.306926)
                (-0.101236	-1047.191579)
                (-0.099949	-992.076233)
                (-0.098554	-936.960887)
                (-0.097035	-881.845541)
                (-0.095376	-826.730194)
                (-0.093559	-771.614848)
                (-0.091558	-716.499502)
                (-0.089347	-661.384155)
                (-0.08689	-606.268809)
                (-0.084143	-551.153463)
                (-0.081053	-496.038117)
                (-0.077547	-440.92277)
                (-0.073532	-385.807424)
                (-0.068882	-330.692078)
                (-0.063418	-275.576731)
                (-0.056876	-220.461385)
                (-0.048836	-165.346039)
                (-0.038557	-110.230693)
                (-0.024448	-55.115346)
                (-0.002000       -2.080791694)
                (0	0)
                (0.002000        2.080791694)
                (0.024448	55.115346)
                (0.038557	110.230693)
                (0.048836	165.346039)
                (0.056876	220.461385)
                (0.063418	275.576731)
                (0.068882	330.692078)
                (0.073532	385.807424)
                (0.077547	440.92277)
                (0.081053	496.038117)
                (0.084143	551.153463)
                (0.08689	606.268809)
                (0.089347	661.384155)
                (0.091558	716.499502)
                (0.093559	771.614848)
                (0.095376	826.730194)
                (0.097035	881.845541)
                (0.098554	936.960887)
                (0.099949	992.076233)
                (0.101236	1047.191579)
                (0.102425	1102.306926)
                (0.103527	1157.422272)
                (0.104551	1212.537618)
                (0.105504	1267.652964)
                (0.106393	1322.768311)
                (0.107224	1377.883657)
                (0.108003	1432.999003)
                (0.108733	1488.11435)
                (0.109419	1543.229696)
                (0.110064	1598.345042)
                (0.110673	1653.460388)
                (0.111247	1708.575735)
                (0.111789	1763.691081)
                (0.112303	1818.806427)
                (0.112789	1873.921774)
                (0.113249	1929.03712)
                (0.113687	1984.152466)
                (0.114103	2039.267812)
                (0.114498	2094.383159)
                (0.114874	2149.498505)
                (0.115233	2204.613851)
                (0.115575	2259.729198)
                (0.115901	2314.844544)
                (0.116213	2369.95989)
                (0.116511	2425.075236)
                (0.116796	2480.190583)
                (0.117069	2535.305929)
                (0.117331	2590.421275)
                (0.117582	2645.536622)
                (0.117822	2700.651968)
                (0.118053	2755.767314)
                (0.118275	2810.88266)
                (0.118488	2865.998007)
                (0.118693	2921.113353)
                (0.11889	2976.228699)
                (0.11908	3031.344046)
                (0.119263	3086.459392)
                (0.119439	3141.574738)
                (0.119609	3196.690084)
                (0.119773	3251.805431)
                (0.119931	3306.920777)
                (0.120083	3362.036123)
                (0.120231	3417.151469)
                (0.120373	3472.266816)
                (0.120511	3527.382162)
                (0.120644	3582.497508)
                (0.120773	3637.612855)
                (0.120897	3692.728201)
                (0.121018	3747.843547)
                (0.121135	3802.958893)
                (0.121248	3858.07424)
                (0.121358	3913.189586)
                (0.121464	3968.304932)
                (0.121567	4023.420279)
                (0.121667	4078.535625)
                (0.121765	4133.650971)
                (0.121859	4188.766317)
                (0.121951	4243.881664)
                (0.12204	4298.99701)
                (0.122126	4354.112356)
                (0.12221	4409.227703)
                (0.122293	4464.343049)
                (0.122376	4519.458395)
                (0.122459	4574.573741)
                (0.122541	4629.689088)
                (0.122624	4684.804434)
                (0.122707	4739.91978)
                (0.12279	4795.035127)
                (0.122873	4850.150473)
                (0.122956	4905.265819)
                (0.123038	4960.381165)
                (0.123121	5015.496512)
                (0.123204	5070.611858)
                (0.123287	5125.727204)
                (0.12337	5180.84255)
                (0.123453	5235.957897)
                (0.123535	5291.073243)
                (0.123618	5346.188589)
                (0.123701	5401.303936)
                (0.123784	5456.419282)
            );
        }
    }
}


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