This model transports fluid between its two ports, without storing mass or energy. It implements a steady-state conservation equation for energy and mass fractions. The model has zero pressure drop between its ports.
Set the parameter use_mWat_flow_in=true
to enable an
input connector for mWat_flow
.
Otherwise, the model uses mWat_flow = 0
.
If the constant simplify_mWat_flow = true
, which is its default value,
then the equation
port_a.m_flow + port_b.m_flow = - mWat_flow;
is simplified as
port_a.m_flow + port_b.m_flow = 0;
This causes an error in the mass balance of about 0.5%, but generally leads to simpler equations because the pressure drop equations are then decoupled from the mass exchange in this component.
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.
Input connectors of the model are
Q_flow
, which is the sensible plus latent heat flow rate added to the medium,
mWat_flow
, which is the moisture mass flow rate added to the medium, and
C_flow
, which is the trace substance mass flow rate added to the medium.
The model can only be used as a steady-state model with two fluid ports. For a model with a dynamic balance, and more fluid ports, use Annex60.Fluid.Interfaces.ConservationEquation.
regStep
instead of spliceFunction
.
This is for
#247
and for
#300.
mFlow_inv_b
.
This is for
#247.
constant sensibleOnly
as this is no longer used because
the model uses use_mWat_flow
.m_flowInv
needs to be
computed because the change from January 20 introduced an error in
Annex60.Fluid.MassExchangers.Examples.ConstantEffectiveness.
sensibleOnly
since this is no longer needed to simplify the equations.
This is for
#372.
use_C_flow
and converted C_flow
to a conditionally removed connector.
This is for
#372.
C_flow
to allow for PPM.
C_flow
and code for handling trace substance insertions.
November 19, 2015, by Michael Wetter:showDesignFlowDirection
in extends
statement.
This is for
#349.
simplify_mWat_flow
to remove dependencies of the pressure drop
calculation on the moisture balance.
port_a
if allowFlowReversal=false
and
updated documentation.
See
issue 281 for a discussion.
prescribedHeatFlowRate
to MixingVolume
instances.
Renamed use_safeDivision
into prescribedHeatFlowRate
.
See #282
for a discussion.
Q_flow
input.
use_safeDivision=false
and sensibleOnly=true
.
This only affects internal numerical tests, but not any examples in the library
as the constant use_safeDivision
is set to true
by default.
hOut
.
i_w
.
for
loops for species balance and trace substance balance,
as they cause the error Error: Operand port_a.Xi_outflow[1] to operator inStream is not a stream variable.
in OpenModelica.
COut
,
and added min and max attributes for XiOut
.
m_flowInv
to use port_a.m_flow * ...
if use_safeDivision=false
. This avoids a division by zero if
port_a.m_flow=0
.
Annex60.Fluid.Interfaces
.
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.