36-8 Handbook of Dynamic System Modeling
The first two lines state that pressure p and specific enthalpy h in the connection point are identical. Since
all other intensive quantities of a multiphase fluid (e.g., density, or specific entropy) can be computed from
p and h, the medium state is uniquely defined. The third and fourth equations state the mass and energy
balance for an infinitesimal small control volume in the connection point. Together with the remaining
equations for port.H_flow in the components, a linear system of equations is present to compute the
mixing enthalpy A.port.h =B.port.h =C.port.h in the connection point. It has the solution:
A.port.h = -( (if A.port.m_flow > 0 then 0 else A.port.m_flow*A.h)+
(if B.port.m_flow > 0 then 0 else B.port.m_flow*B.h)+
(if C.port.m_flow > 0 then 0 else C.port.m_flow*C.h) )
/( (if A.port.m_flow > 0 then A.port.m_flow else 0)+
(if B.port.m_flow > 0 then B.port.m_flow else 0)+
(if C.port.m_flow > 0 then C.port.m_flow else 0) )
Therefore, independently of the flow directions in the three ports, the mixing enthalpy is always uniquely
computed, provided at least one mass flow rate does not vanish (see Elmqvist et al., 2003 for details how
to handle the case if all mass flow rates vanish). From the mixing enthalpy and the port pressure, all other
mixing quantities can be computed, such as mixing temperature.
In the Modelica standard library (see below), elementary connectors for all important technical domains
are provided. The definition of these connectors is summarized in the Table 36.1.
Column “type” is the physical domain, column “potential” defines the variables in the connector that
have no “flow” prefix, column “flow” defines the variables with a “flow” prefix, column “connector name”
defines the connector class name where the definition is present and column “icon” is a screenshot of the
connector icon.
For three-dimensional mechanical systems, the position vector r[3] from the origin of the world frame to
the origin of the connector frame, the transformation matrix T[3,3] from the world to the connector frame,
as well as the cut-force vector f[3] and the cut-torque vector t[3] are utilized. The transformation matrix
T[3,3] contains a redundant set of variables. In Otter et al. (2003) it is described how the information about
the constraint equations of T is defined in Modelica, and how a tool can automatically remove connection
restrictions due to this redundancy based on this additional information. In Modelica, array dimensions
are declared with square brackets, e.g., A[3,4] is a two-dimensional array where the first dimension has
size 3 and the second size 4. A dimension size specified as “:”, e.g., Xi[:], defines an unknown dimension
that can be defined when using the array.
Type “thermal” refers to heat transfer. Note, in bond graph methodology temperature and entropy flow
rate are used as connector variables, because the product of these two variables is the energy flow through
the port. The definition in the Modelica Standard Library with temperature and heat flow rate also fulfills
the energy balance in a connection point. It has the additional advantage that lumped elements, such as a
thermal conductor, a thermal capacitor or the “fully isolated boundary condition” lead to linear equations
in the connector variables, whereas the bond graph approach leads to nonlinear equations.
Type “thermo-fluid pipe flow” refers to one-dimensional thermo-fluid flow in pipe networks with
incompressible or compressible media that may have one or multiple (homogenous) phases and/or one
or multiple substances. The potential variables in the connector are pressure p, specific mixing enthalpy h,
and the vector of independent mixture mass fractions Xi[:]. The flow variables are mass flow rate
m
flow
, enthalpy flow rate H
flow
and the vector of the independent substance mass flow rates mXi
flow
[:].
When only one substance is present, vectors Xi and mXi
flow
have dimensions zero and are therefore not
present. More detailed information of this connector is available in Elmqvist et al. (2003) and in the
Modelica.Fluid.UsersGuide.
Besides physical connectors, also a set of signal connectors are provided, especially for block diagrams
and for hierarchical state machines. Type “signal bus” characterizes an empty connector that has the
additional prefix “expandable.” This connector type is used to define a hierarchical collection of named
signals where the full connector definition (containing all signal definitions) is defined implicitly by the