1 /*--------------------------------*- C++ -*----------------------------------*\
3 | \\ / F ield | foam-extend: Open Source CFD |
4 | \\ / O peration | Version: 3.2 |
5 | \\ / A nd | Web: http://www.foam-extend.org |
6 | \\/ M anipulation | |
7 \*---------------------------------------------------------------------------*/
13 object massOnSpringWithDamper;
15 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
17 mass m [1 0 0 0 0 0 0] 1;
18 momentOfInertia J [1 2 0 0 0 0 0] (1 1 1);
20 equilibriumPosition Xeq [0 1 0 0 0 0 0] (2 0 0);
21 linearSpring k [1 0 -2 0 0 0 0] (1 0 0);
22 linearDamping d [1 0 -1 0 0 0 0] (1 0 0);
25 Xrel Xrel [0 1 0 0 0 0 0] (-2 0 0);
26 U U [0 1 -1 0 0 0 0] (0 0 0);
27 Uold Uold [0 1 -1 0 0 0 0] (0 0 0);
28 rotationVector (0 0 1);
29 rotationAngle rotA [0 0 0 0 0 0 0] 0;
30 omega rotU [0 0 -1 0 0 0 0] (0 0 0);
32 force f [1 1 -2 0 0 0 0] (0 0 0);
33 moment m [1 2 -2 0 0 0 0] (0 0 0);
35 forceRelative fRel [1 1 -2 0 0 0 0] (0 0 0);
36 momentRelative mRel [1 2 -2 0 0 0 0] (0 0 0);
38 // ************************************************************************* //