modelWetCoilCounterFlow

Counterflow coil with discretization along the flow paths and humidity condensation

Extends from Buildings.Fluid.HeatExchangers.DryCoilCounterFlow (Counterflow coil with discretization along the flow paths and without humidity condensation).

Information

Model of a discretized coil with water vapor condensation. The coil consists of two flow paths which are, at the design flow direction, in opposite direction to model a counterflow heat exchanger. The flow paths are discretized into nEle elements. Each element is modeled by an instance of Buildings.Fluid.HeatExchangers.BaseClasses.HexElementLatent. Each element has a state variable for the metal.

The convective heat transfer coefficients can, for each fluid individually, be computed as a function of the flow rate and/or the temperature, or assigned to a constant. This computation is done using an instance of Buildings.Fluid.HeatExchangers.BaseClasses.HADryCoil.

In this model, the water (or liquid) flow path needs to be connected to port_a1 and port_b1, and the air flow path needs to be connected to the other two ports.

The mass transfer from the fluid 2 to the metal is computed using a similarity law between heat and mass transfer, as implemented by the model Buildings.Fluid.HeatExchangers.BaseClasses.MassExchange.

This model can only be used with medium models that implement the function enthalpyOfLiquid and that contain an integer variable Water whose value is the element number where the water vapor is stored in the species concentration vector. Examples for such media are Buildings.Media.Air and Modelica.Media.Air.MoistAir.

To model this coil for conditions without humidity condensation, use the model Buildings.Fluid.HeatExchangers.DryCoilCounterFlow instead of this model.

Parameters

TypeNameDefaultDescription
Booleansimplify_mWat_flowtrueSet to true to cause port_a.m_flow + port_b.m_flow = 0 even if mWat_flow is non-zero. Used only if Medium.nX > 1
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
General › Nominal condition
Modelica.Units.SI.ThermalConductanceUA_nominal (from DryCoilCounterFlow)Thermal conductance at nominal flow, used to compute heat capacity
Geometry
IntegernEle (from DryCoilCounterFlow)4Number of pipe segments used for discretization
Dynamics › Conservation equations
Modelica.Fluid.Types.DynamicsenergyDynamics (from DryCoilCounterFlow)Modelica.Fluid.Types.Dynamics.DynamicFreeInitialFormulation of energy balance
Modelica.Units.SI.Timetau1 (from DryCoilCounterFlow)10Time constant at nominal flow for medium 1
Modelica.Units.SI.Timetau2 (from DryCoilCounterFlow)2Time constant at nominal flow for medium 2
Modelica.Units.SI.Timetau_m (from DryCoilCounterFlow)5Time constant of metal at nominal UA value
Heat transfer
BooleanwaterSideFlowDependent (from DryCoilCounterFlow)trueSet to false to make water-side hA independent of mass flow rate
BooleanairSideFlowDependent (from DryCoilCounterFlow)trueSet to false to make air-side hA independent of mass flow rate
BooleanwaterSideTemperatureDependent (from DryCoilCounterFlow)falseSet to false to make water-side hA independent of temperature
BooleanairSideTemperatureDependent (from DryCoilCounterFlow)falseSet to false to make air-side hA independent of temperature
Realn_w (from DryCoilCounterFlow)0.85Water-side exponent for convective heat transfer coefficient, h~m_flow^n_w
Realn_a (from DryCoilCounterFlow)0.8Air-side exponent for convective heat transfer coefficient, h~m_flow^n_a
Heat transfer › Nominal condition
Realr_nominal (from DryCoilCounterFlow)2/3Ratio between air-side and water-side convective heat transfer coefficient
Experimental
Modelica.Units.SI.ThermalConductanceGDif (from DryCoilCounterFlow)1E-2*UA_nominal/max(1, (nEle - 1))Thermal conductance to approximate diffusion (which improves model at near-zero flow rates)

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_flow (from DryCoilCounterFlow)sum(ele[i].Q1_flow for i in 1:nEle)Heat transferred from solid into medium 1
Modelica.Units.SI.HeatFlowRateQ2_flow (from DryCoilCounterFlow)sum(ele[i].Q2_flow for i in 1:nEle)Heat transferred from solid into medium 2
Modelica.Units.SI.Temperature[nEle]T1 (from DryCoilCounterFlow)ele[:].vol1.TWater temperature
Modelica.Units.SI.Temperature[nEle]T2 (from DryCoilCounterFlow)ele[:].vol2.TAir temperature
Modelica.Units.SI.Temperature[nEle]T_m (from DryCoilCounterFlow)ele[:].con1.solid.TMetal temperature
BaseClasses.HADryCoilhA (from DryCoilCounterFlow)Model for convective heat transfer coefficient
Modelica.Units.SI.HeatFlowRateQSen2_flowQ2_flow - QLat2_flowSensible heat input into air stream (negative if air is cooled)
Modelica.Units.SI.HeatFlowRateQLat2_flowBuildings.Utilities.Psychrometrics.Constants.h_fg*mWat_flowLatent heat input into air (negative if air is dehumidified)
RealSHRQSen2_flow/noEvent(if (Q2_flow > 1E-6 or Q2_flow < -1E-6) then Q2_flow else 1)Sensible to total heat ratio
Modelica.Units.SI.MassFlowRatemWat_flowsum(ele[i].vol2.mWat_flow for i in 1:nEle)Water flow rate

Revisions

  • June 22, 2026, by Michael Wetter:
    Updated Dialog annotations, and revised heat exchanger models to consistently expose parameters r_nominal, n_w and n_a.
    This is for #4620.
  • July 5, 2022, by Antoine Gautier:
    Restored the addition of heat to mas.T in Buildings.Fluid.HeatExchangers.BaseClasses.HexElementLatent.
    This is for #3065.
  • May 26, 2022, by Michael Wetter:
    Removed addition of heat to mas.T in Buildings.Fluid.HeatExchangers.BaseClasses.HexElementLatent to correct latent heat exchange calculation.
    This is for #3027.
  • March 12, 2021, by Michael Wetter:
    Removed final declaration in redeclaration.
    This is for #2392.
  • May 1, 2020, by Michael Wetter:
    Added constant simplify_mWat_flow.
    This is for #1920.
  • October 19, 2018, by Kino:
    Changed model to use a replaceable model as this allows translation in OpenModelica.
    This is for #1258.
  • April 14, 2017, by David Blum:
    Added heat of condensation to coil surface heat balance and removed it from the air stream. This gives higher coil surface temperature and avoids overestimating the latent heat ratio that was observed in the previous implementation. The code change was in Buildings.Fluid.HeatExchangers.BaseClasses.HexElementLatent.
    This is for #711.
  • April 11, 2017, by Michael Wetter:
    Changed computation of QLat_flow to be consistent with how it is computed in Buildings.Fluid.HeatExchangers.BaseClasses.HexElementLatent.
    Moved variable assignments out of equation section to avoid mixing textual and graphical modeling in equation section.
  • November 8, 2016, by Michael Wetter:
    Removed wrong usage of each keyword.
  • July 29, 2016, by Michael Wetter:
    Redeclared Medium2 to be Modelica.Media.Interfaces.PartialCondensingGases because it is used in vol2 and because the model calls Medium2.enthalpyOfCondensingGas, which requires the medium to extend from this subclass.
    This is for issue 547.
  • February 2, 2012, by Michael Wetter:
    Corrected error in assignment of dp2_nominal in the base class. The previous assignment caused a pressure drop in all except one element, instead of the opposite. This caused too high a flow resistance of the heat exchanger.
  • May 27, 2010, by Michael Wetter:
    First implementation.