First of all we recommend to study the example models provided in
Examples.
For basic directional flows
The library is designed to avoid a favourable structure of the equation system so
that non-linear systems are confined to their components. In order to enable this
the modeller shall follow the following rules:
-
Streams shall start at a source and end at a sink. Do not leave outlets unconnected.
Volume elements may act as source and/or sink.
-
Compose your topology using splitters and junctions from package
Topology. Splitting directly
using the connector is only recommended for the use of sensors.
-
Break cyclic loops by using volume elements. Each cyclic flow must be broken by at
least one volume element. Mere bypasses are not cyclic flows and do not need to be
torn apart.
That's it. Simply memorize these simple rules and check the structure of your
equation system to be sure.
Noteworthy comments
-
Some classes implement asserts. Most of them represent checks that when not
fulfilled result in a non-physical, but well behaved (numerically stable)
simulation (e.g. reversed flow conditions for directed components), and some result
in stopping of the simulation (e.g. zero/negative mass in a volume). While
asserts for the latter always are done with AssertionLevel.error, the assertion
level for the former can be set in the
DropOfCommons globally.
So if the simulation stops because one of the former asserts is violated, insert
a DropOfCommons model and set the assertionLevel to warning.
-
Many models rely on mass-flow normalization for zero or small mass-flow.
The normalization-mass-flow used in the components is set globally in the
DropOfCommons.
Always make sure it is between one and two orders of magnitude smaller than the
typical mass-flows of your system.
For undirected flows
There is a special sub-package
if the flow direction is unknown. Basically the rules
are the same but please be aware that without knowledge of the flow-direction, loops
are more likely to occur. Hence, only use these components when needed.
(c) 2020-2021, DLR, Institute of System Dynamics and Control
Generated at 2024-11-22T19:25:38Z
by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos