.BondLib.SystemDynamics.Levels.Reverse_Level

Information

This is a time-reversible continuous Level model of the System Dynamics methodology.

Given the following state-space model:

der(x) = f(x,t);

Time reversal can be achieved by placing a minus sign in front of each state equation:

der(x) = -f(x,t);

The Reverse_Level model contains a modulating variable dir that determines the direction of time flow:

der(x) = dir*f(x,t);

Contrary to the model used in the separate (not bong-graph based) SystemDynamics library, this model includes not only mass flows, but also energy flows. If you are not interested in energy flow modeling, simply set the initial energy of all levels to a value that is numerically equal to the mass.

Since the initial enthalpy is computed as the quotient of energy and mass:

h0 = E0/m0

you will get a division by zero if you attempt a simulation with zero initial mass. You thus need to set the initial mass to a small value that doesn't falsify the simulation results.

The model also contains a dissipative loss of enthalpy (but not mass) to the environment. Mass is always conserved. By attaching an R element to a 1 junction, we guarantee that the mass flow is not affected at all by the dissipative term. Only enthalpy is being dissipated.


Generated at 2024-12-21T19:25:56Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos