|
FhSim
3.1.0
Marine systems simulation
|
Short answer: FhSim has no units. The engine integrates whatever numbers the input file and the SimObject library give it, and never converts, scales or checks them. Units are a property of the model library you are using, not of FhSim. This page says exactly what that means, what FhSim does fix (a visualisation convention), and where to look to find the units for a given library.
There is no unit system anywhere in the simulation engine. There is no gravity constant, no unit-conversion layer, no reference length or mass, and no scaling step between the input file and the integrator. The engine sees a state vector of doubles and a derivative function, and it advances one against the other.
The practical consequences are worth stating plainly:
double, and handed to the SimObject. The only check applied is on the number of components in a vector value, never on its size or its dimension.Because units live in the library, that is where you have to look:
If you are writing a SimObject, document the unit of every parameter, every input port and every output port. Nothing else in the system will.
Positions, velocities and forces are written in the input file as comma-separated lists of components:
The rules are the same everywhere a vector value appears — connection constants, SimObject parameters and initial conditions:
<OBJECTS>, <INTERCONNECTIONS> and <INITIALIZATION>, each component is additionally passed through the arithmetic evaluator after $Variable substitution, so "0,0,-$Depth/2" is legal. See Arithmetic in attribute values.The visualisation assumes a right-handed world frame with Z up and X–Y horizontal. The camera is the place this is visible: its orbit control takes a bearing and an elevation about a look-at point, computes the horizontal offset from the bearing in the X and Y axes, and raises the camera along Z with the elevation. Camera yaw is applied as a rotation about the world Z axis.
So if you want your model to look right in FhVis or FhSimUI — ground plane flat, gravity pointing down the screen — put your horizontal plane in X–Y and your vertical axis along Z.
For the scene controls themselves, see 3D scene navigation.
A line such as
is a downward force (negative Z, given the Z-up convention above) whose magnitude cannot be read off the page. 9810 is consistent with more than one self-consistent unit system — for example a 1000-unit mass under an acceleration of 9.81, or a 1-unit mass under an acceleration of 9810 — and FhSim will integrate either interpretation without complaint. Which one it is depends entirely on how the library that provides mass defines Mass and Force.
The habit that avoids this: state the unit system in a comment at the top of every scenario file, and never mix libraries whose comments disagree.