Marine systems simulation

3DOF rigid body with gravity

+ Collaboration diagram for 3D Body:

Simulation of a rigid body in three degrees of freedom with gravity. Implemented in class C3DBody.

\begin{eqnarray*} \dot{\vec{x_1}} &=& \vec{x_2} \\ \dot{\vec{x_2}} &=& \frac{\sum \vec{F} + m\vec{g}}{m} \end{eqnarray*}

where

Author
Karl-Johan Reite
Date
01.01.2006 KJR: Initial version.
18.02.2011 KJR: Rewritten to new version of FhSim.

Example configuration excerpt

<Lib
LibName = "fhsim_base"
SimObject = "Ball/3DBody"
Name = "M"
/>
...
<Connection
M.Force="0,0,0"
/>
...
<InitialCondition
M.Pos="0,0,0"
M.Vel="0,0,0"
/>

Input Ports

Name Width Description
Force 3 The total force acting on the mass, except gravity.

Output Ports

Name Width Description
Pos 3 Body position.
Vel 3 Body velocity.

Configuration parameters

Name Width Description
Mass 1 Mass of the object in kg.
Material 1 The visualization material of the mass, specified by its name.
Mesh 1 The visualization mesh (geometry) of the mass, specified by its filename. (Default: fhSphere.mesh)
Scale 1 Scaling of the mesh; defaults to 1 (Visualization).

Initial conditions

Name Width Description
Pos 3 3D position [m].
Vel 3 3D velocity [m/s].

Full example file

<Contents>
<OBJECTS>
<Lib
LibName="base"
SimObject="Body/3DBody"
Name="M"
Scale="1"
Mass="1"
Material="Simple/Red"
/>
</OBJECTS>
<INTERCONNECTIONS>
<Connection
M.Force="0,0,0"
/>
</INTERCONNECTIONS>
<INITIALIZATION>
<InitialCondition
M.Pos="0,0,0"
M.Vel="0,0,0"
/>
</INITIALIZATION>
<INTEGRATION>
<Engine
IntegratorMethod="2"
NumCores="1"
TOutput="0, 0:1:10, 30"
LogStates ="1"
stepsize ="0"
HMax="0.002"
HMin="0.00000001"
AbsTol="1e-3" RelTol="1e-3"
UseRSSNormInsteadOfInfNorm="0"
FileOutput="objects:all"
/>
</INTEGRATION>
</Contents>

This SimObject is referred to as Body/3DBody