This component transports two fluid streams between four ports, without storing mass or energy. It is similar to BuildingSystems.Fluid.Interfaces.StaticTwoPortHeatMassExchanger, but it has four ports instead of two.
If dpN_nominal > Modelica.Constants.eps
,
where N
denotes the fluid 1 or 2,
then the model computes
pressure drop due to flow friction in the respective fluid stream.
The pressure drop is defined by a quadratic function that goes through
the point (mN_flow_nominal, dpN_nominal)
.
At |mN_flow| < deltaMN * mN_flow_nominal
,
the pressure drop vs. flow relation is linearized.
If the parameter linearizeFlowResistanceN
is set to true,
then the whole pressure drop vs. flow resistance curve is linearized.
This model uses inputs and constants that need to be set by models
that extend or instantiate this model.
The following inputs need to be assigned, where N
denotes 1
or
2
:
QN_flow
, which is the sensible and latent heat flow rate added to the medium N.
mWatN_flow
, which is the moisture mass flow rate added to the medium N.
Set the constant sensibleOnlyN=true
if the model that extends
or instantiates this model sets mWatN_flow = 0
.
Note that the model does not implement 0 = Q1_flow + Q2_flow
or
0 = mXi1_flow + mXi2_flow
. If there is no heat or mass transfer
with the environment, then a model that extends this model needs to provide these
equations.
homotopyInitialization
to a constant.Q1_flow
and Q2_flow
include latent heat flow rate.sensibleOnly
in bal1
and bal2
as this constant has been removed in
BuildingSystems.Fluid.Interfaces.StaticTwoPortHeatMassExchanger.
homotopyInitialization
as
it has been removed in the base class.
import Modelica.Constants;
statement.
show_V_flow
.
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.
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.
sensibleOnly1
and
sensibleOnly2
to
simplify species balance equations.