This component transports fluid between its two ports, without storing mass or energy. It is based on Modelica.Fluid.Interfaces.PartialTwoPortTransport but it does use a different implementation for handling reverse flow because in this component, mass flow rate can be added or removed from the medium.
If dp_nominal > Modelica.Constants.eps
, this component computes
pressure drop due to flow friction.
The pressure drop is defined by a quadratic function that goes through
the point (m_flow_nominal, dp_nominal)
. At |m_flow| < deltaM * m_flow_nominal
,
the pressure drop vs. flow relation is linearized.
If the parameter linearizeFlowResistance
is set to true,
then the whole pressure drop vs. flow resistance curve is linearized.
Q_flow
, which is the sensible and latent heat flow rate added to the medium.
mWat_flow
, which is the moisture mass flow rate added to the medium.
Set the constant sensibleOnly=true
if the model that extends
or instantiates this model sets mWat_flow = 0
.
To increase the numerical robustness of the model, the constant
prescribedHeatFlowRate
can be set.
Use the following settings:
prescribedHeatFlowRate=true
if the only means of heat transfer
at the heatPort
is a prescribed heat flow rate that
is not a function of the temperature difference
between the medium and an ambient temperature. Examples include an ideal electrical heater,
a pump that rejects heat into the fluid stream, or a chiller that removes heat based on a performance curve.
If the heatPort
is not connected, then set prescribedHeatFlowRate=true
as
in this case, heatPort.Q_flow=0
.
prescribedHeatFlowRate=false
if there is heat flow at the heatPort
computed as K * (T-heatPort.T), for some temperature T and some conductance K,
which may itself be a function of temperature or mass flow rate.prescribedHeatFlowRate=false
.
If prescribedHeatFlow=true
, then energy and mass balance
equations are formulated to guard against numerical problems near
zero flow that can occur if Q_flow
or m_flow
are the results of an iterative solver.
homotopyInitialization
to a constant.Q_flow
includes latent heat flow rate.use_dh
is no longer a parameter in the pressure drop model.sensibleOnly
in bal1
and bal2
as this constant has been removed in
Buildings.Fluid.Interfaces.StaticTwoPortHeatMassExchanger.
showDesignFlowDirection
in extends
statement.
This is for
#349.
port_a
if allowFlowReversal=false
and
updated documentation.
See
issue 281 for a discussion.
use_safeDivision
into
prescribedHeatFlowRate
.
See
issue 282 for a discussion.
homotopyInitialization
as
it has been removed in the base class.
show_V_flow
to pressure drop calculation, as this model no longer has
that parameter.
mXi_flow[Medium.nXi]
to a scalar input connector mWat_flow
.
The reason is that mXi_flow
does not allow
to compute the other components in mX_flow
and
therefore leads to an ambiguous use of the model.
By only requesting mWat_flow
, the mass balance
and species balance can be implemented correctly.
COut
,
and added min and max attributes for XiOut
.
hOut
, XiOut
and
COut
to no longer declare that it is continuous.
The declaration of continuity, i.e, the
smooth(0, if (port_a.m_flow >= 0) then ...)
declaration,
was required for Dymola 2012 to simulate, but it is no longer needed
for Dymola 2012 FD01.
hOut
, XiOut
and
COut
to declare that it is not differentiable.
m_flow=0
.
homotopy
operator.
port_b
was multiplied with the mass flow rate at
port_a
. The old implementation led to small errors that were proportional
to the amount of moisture change. For example, if the moisture added by the component
was 0.005 kg/kg
, then the error was 0.5%
.
Also, the results for forward flow and reverse flow differed by this amount.
With the new implementation, the energy and moisture balance is exact.
sensibleOnly
to
simplify species balance equation.