modelLevel2b

General System Dynamics level with two outflows

Information

This is the general continuous Level model of the System Dynamics methodology with a single inflow and two outflows. It computes the level by integrating over the difference between inflow and outflow rates.

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.

Parameters

TypeNameDefaultDescription
Realm01Initial mass
Modelica.SIunits.EnergyE01Initial energy
RealR00Specific enthalpy of dissipation
Realh0E0/m0Initial enthalpy

Connectors

TypeNameDefaultDescription
BondLib.Interfaces.BondConBondCon1Mass and power inflow
BondLib.Interfaces.BondConBondCon2First mass and power outflow
BondLib.Interfaces.BondConBondCon3Second mass and power outflow
Modelica.Blocks.Interfaces.RealOutputyMass
Modelica.Blocks.Interfaces.RealOutputy1Mass
Modelica.Blocks.Interfaces.RealOutputy2Mass
Modelica.Blocks.Interfaces.RealOutputy3Mass

Components

TypeNameDefaultDescription
ReallevelMass
Modelica.SIunits.EnergyEEnergy
Bonds.eBondB1
Utilities.CmC1Mass storage
BondLib.Junctions.J0p4j0p4_1
Junctions.J1p3j1p3_1
Bonds.eBondB2
Bonds.eBondB3
Passive.RR1