Marine systems simulation

A general gain object with port width and gain ratio decided by input parameters.

+ Collaboration diagram for Gain:

Multiplies the input with a scalar value (gain).

Author
Karl-Johan Reite
Date
21.11.2006 KJR: Initial version.
20.07.2011 KGA: Ported to FhSim 2.0.
25.07.2011 KGA: Added documentation.

Example configuration excerpt

<Lib
LibName = "fhsim_base"
SimObject = "Math/Gain"
Name = "A"
Gain = "20"
PortWidth = "1"
/>
...
<Connection
A.In = "1"
/>

Input Ports

Name Width Description
In <PortWidth> The input signal.

Output Ports

Name Width Description
Out <PortWidth> The input multiplied by a gain.

Configuration parameters

Name Width Description
PortWidth

Gain <PortWidth>

Initial conditions

This SimObject contains no initial conditions.

Full example file

<Contents>
<OBJECTS>
<Lib
LibName="base"
SimObject="Math/Gain"
Name="A"
Gain="5"
/>
</OBJECTS>
<INTERCONNECTIONS>
<Connection
A.In="20"
/>
</INTERCONNECTIONS>
<INITIALIZATION>
<InitialCondition
/>
</INITIALIZATION>
<INTEGRATION>
<Engine
IntegratorMethod="2"
NumCores="1"
TOutput="0, 1, 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 Math/Gain