FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches
Pendulum

Simple kinematic pendulum.

+ Collaboration diagram for Pendulum:

Pendulum is a very simple pendulum described by angle and angular velocity dynamics. Only influenced by gravity.

Author
Joakim Haugen

Example configuration excerpt

<Lib LibName = "fhsim_base"
SimObject = "Example/Pendulum"
Name = "Pendle"
Position = "0,0,0"
Length = "3"
/>
...
<InitialCondition
Pen.Angle = "1.0"
Pen.AngularVelocity = "0"
/>

Input Ports

There are no input ports

Output Ports

Name Width Description
Angle 1 The angle in radians of the pendulum with respect to the z-axis.
AngularVelocity 1 The angular velocity of the above angle.

Configuration parameters

Name Width Description
Length 1 Length of the pendulum arm [meter].
Position 3 North, east, and down position of the suspension point [m^3].
Material 1 The visualization material (Default: Simple/White). Visualization builds only.

Initial conditions

Name Width Description
Angle 1 -.
AngularVelocity 1 -.

Full example file

<Contents>
<OBJECTS>
<Lib
LibName = "fhsim_base"
SimObject = "Example/Pendulum"
Name = "Pen"
Length = "3"
Position = "0,0,0"
Material = "darkseagreen"
/>
</OBJECTS>
<INTERCONNECTIONS>
</INTERCONNECTIONS>
<INITIALIZATION>
<InitialCondition
Pen.Angle = "1.0"
Pen.AngularVelocity = "0"
/>
</INITIALIZATION>
<SIMULATION>
<Timing TStart="0" TEnd="100"/>
<Integrator Method="RK45_i" NumCores="1">
<StepControl Step="1e-5"/>
</Integrator>
</SIMULATION>
</Contents>

This SimObject is referred to as Example/Pendulum