modelStaticFourPortHeatMassExchanger

Partial model transporting two fluid streams between four ports without storing mass or energy

Extends from Buildings.Fluid.Interfaces.PartialFourPortInterface (Partial model with four ports and declaration of quantities that are used by many models), Buildings.Fluid.Interfaces.FourPortFlowResistanceParameters (Parameters for flow resistance for models with four ports).

Information

This component transports two fluid streams between four ports, without storing mass or energy. It is similar to Buildings.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.

Implementation

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.

Parameters

TypeNameDefaultDescription
BooleanprescribedHeatFlowRate1falseSet to true if the heat flow rate into fluid 1 is not a function of the component temperature
BooleanprescribedHeatFlowRate2falseSet to true if the heat flow rate into fluid 2 is not a function of the component temperature
BooleanhomotopyInitializationtrue= true, use homotopy method
BooleansensibleOnly1Set to true if sensible exchange only for medium 1
BooleansensibleOnly2Set to true if sensible exchange only for medium 2
Assumptions
BooleanallowFlowReversal1 (from PartialFourPort)true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2 (from PartialFourPort)true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Nominal condition
Modelica.Units.SI.MassFlowRatem1_flow_nominal (from PartialFourPortInterface)Nominal mass flow rate
Modelica.Units.SI.MassFlowRatem2_flow_nominal (from PartialFourPortInterface)Nominal mass flow rate
Modelica.Units.SI.PressureDifferencedp1_nominal (from FourPortFlowResistanceParameters)Pressure difference
Modelica.Units.SI.PressureDifferencedp2_nominal (from FourPortFlowResistanceParameters)Pressure difference
Advanced
Medium1.MassFlowRatem1_flow_small (from PartialFourPortInterface)1E-4*abs(m1_flow_nominal)Small mass flow rate for regularization of zero flow
Medium2.MassFlowRatem2_flow_small (from PartialFourPortInterface)1E-4*abs(m2_flow_nominal)Small mass flow rate for regularization of zero flow
Advanced › Diagnostics
Booleanshow_T (from PartialFourPortInterface)false= true, if actual temperature at port is computed
Flow resistance › Medium 1
BooleancomputeFlowResistance1 (from FourPortFlowResistanceParameters)true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp1 (from FourPortFlowResistanceParameters)false= true, use m_flow = f(dp) else dp = f(m_flow)
Realn1 (from FourPortFlowResistanceParameters)2Flow exponent for side 1, n=1 for laminar, n=2 for turbulent
BooleanlinearizeFlowResistance1 (from FourPortFlowResistanceParameters)false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM1 (from FourPortFlowResistanceParameters)0.1Fraction of nominal flow rate where flow transitions to laminar
Flow resistance › Medium 2
BooleancomputeFlowResistance2 (from FourPortFlowResistanceParameters)true=true, compute flow resistance. Set to false to assume no friction
Booleanfrom_dp2 (from FourPortFlowResistanceParameters)false= true, use m_flow = f(dp) else dp = f(m_flow)
Realn2 (from FourPortFlowResistanceParameters)2Flow exponent for side 2, n=1 for laminar, n=2 for turbulent
BooleanlinearizeFlowResistance2 (from FourPortFlowResistanceParameters)false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM2 (from FourPortFlowResistanceParameters)0.1Fraction of nominal flow rate where flow transitions to laminar

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPort_aport_a1 (from PartialFourPort)Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
Modelica.Fluid.Interfaces.FluidPort_bport_b1 (from PartialFourPort)Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
Modelica.Fluid.Interfaces.FluidPort_aport_a2 (from PartialFourPort)Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
Modelica.Fluid.Interfaces.FluidPort_bport_b2 (from PartialFourPort)Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)

Components

TypeNameDefaultDescription
Medium1.MassFlowRatem1_flow (from PartialFourPortInterface)port_a1.m_flowMass flow rate from port_a1 to port_b1 (m1_flow > 0 is design flow direction)
Modelica.Units.SI.PressureDifferencedp1 (from PartialFourPortInterface)port_a1.p - port_b1.pPressure difference between port_a1 and port_b1
Medium2.MassFlowRatem2_flow (from PartialFourPortInterface)port_a2.m_flowMass flow rate from port_a2 to port_b2 (m2_flow > 0 is design flow direction)
Modelica.Units.SI.PressureDifferencedp2 (from PartialFourPortInterface)port_a2.p - port_b2.pPressure difference between port_a2 and port_b2
Medium1.ThermodynamicStatesta_a1 (from PartialFourPortInterface)if allowFlowReversal1 then Medium1.setState_phX(port_a1.p, noEvent(actualStream(port_a1.h_outflow)), noEvent(actualStream(port_a1.Xi_outflow))) else Medium1.setState_phX(port_a1.p, inStream(port_a1.h_outflow), inStream(port_a1.Xi_outflow))Medium properties in port_a1
Medium1.ThermodynamicStatesta_b1 (from PartialFourPortInterface)if allowFlowReversal1 then Medium1.setState_phX(port_b1.p, noEvent(actualStream(port_b1.h_outflow)), noEvent(actualStream(port_b1.Xi_outflow))) else Medium1.setState_phX(port_b1.p, port_b1.h_outflow, port_b1.Xi_outflow)Medium properties in port_b1
Medium2.ThermodynamicStatesta_a2 (from PartialFourPortInterface)if allowFlowReversal2 then Medium2.setState_phX(port_a2.p, noEvent(actualStream(port_a2.h_outflow)), noEvent(actualStream(port_a2.Xi_outflow))) else Medium2.setState_phX(port_a2.p, inStream(port_a2.h_outflow), inStream(port_a2.Xi_outflow))Medium properties in port_a2
Medium2.ThermodynamicStatesta_b2 (from PartialFourPortInterface)if allowFlowReversal2 then Medium2.setState_phX(port_b2.p, noEvent(actualStream(port_b2.h_outflow)), noEvent(actualStream(port_b2.Xi_outflow))) else Medium2.setState_phX(port_b2.p, port_b2.h_outflow, port_b2.Xi_outflow)Medium properties in port_b2
Modelica.Units.SI.HeatFlowRateQ1_flowHeat transferred into the medium 1
Medium1.MassFlowRatemWat1_flowMoisture mass flow rate added to the medium 1
Modelica.Units.SI.HeatFlowRateQ2_flowHeat transferred into the medium 2
Medium2.MassFlowRatemWat2_flowMoisture mass flow rate added to the medium 2

Revisions

  • April 14, 2020, by Michael Wetter:
    Changed homotopyInitialization to a constant.
    This is for IBPSA, #1341.
  • April 11, 2017, by Michael Wetter:
    Updated documentation to make clear that Q1_flow and Q2_flow include latent heat flow rate.
    This is for issue Buildings #704.
  • January 22, 2016 by Michael Wetter:
    Removed assignment of sensibleOnly in bal1 and bal2 as this constant has been removed in Buildings.Fluid.Interfaces.StaticTwoPortHeatMassExchanger.
  • November 13, 2013 by Michael Wetter:
    Added parameter homotopyInitialization as it has been removed in the base class.
  • November 13, 2013, by Michael Wetter:
    Removed import Modelica.Constants; statement.
  • October 8, 2013, by Michael Wetter:
    Removed parameter show_V_flow.
  • July 30, 2013 by Michael Wetter:
    Changed connector 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.
  • March 29, 2011, by Michael Wetter:
    Changed energy and mass balance to avoid a division by zero if m_flow=0.
  • March 27, 2011, by Michael Wetter:
    Added homotopy operator.
  • August 19, 2010, by Michael Wetter:
    Fixed bug in energy and moisture balance that affected results if a component adds or removes moisture to the air stream. In the old implementation, the enthalpy and species outflow at 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.
  • March 22, 2010, by Michael Wetter:
    Added constants sensibleOnly1 and sensibleOnly2 to simplify species balance equations.
  • April 13, 2009, by Michael Wetter:
    Added model to compute flow friction.
  • March 25, 2008, by Michael Wetter:
    First implementation.