modelDryCoilCounterFlow

Counterflow coil with discretization along the flow paths and without humidity condensation

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

Model of a discretized coil without 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.HexElementSensible. 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.

To model humidity condensation, use the model Buildings.Fluid.HeatExchangers.WetCoilCounterFlow instead of this model, as this model computes only sensible heat transfer.

Implementation

At very small flow rates, which may be caused when the fan is off but there is wind pressure on the building that entrains outside air through the HVAC system, large temperature differences could occur if diffusion were neglected. This model therefore approximates a small diffusion between the elements to have more uniform medium temperatures if the flow is near zero. The approximation is done using the heat conductors heaCon1 and heaCon2. As this is a rough approximation, neighboring elements are connected through these heat conduction elements, ignoring the actual geometrical configuration. Also, radiation between the coil surfaces on the air side is not modelled explicitly, but rather may be considered as approximated by these heat conductors.

Parameters

TypeNameDefaultDescription
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_nominalThermal conductance at nominal flow, used to compute heat capacity
Geometry
IntegernEle4Number of pipe segments used for discretization
Dynamics › Conservation equations
Modelica.Fluid.Types.DynamicsenergyDynamicsModelica.Fluid.Types.Dynamics.DynamicFreeInitialFormulation of energy balance
Modelica.Units.SI.Timetau110Time constant at nominal flow for medium 1
Modelica.Units.SI.Timetau22Time constant at nominal flow for medium 2
Modelica.Units.SI.Timetau_m5Time constant of metal at nominal UA value
Heat transfer
BooleanwaterSideFlowDependenttrueSet to false to make water-side hA independent of mass flow rate
BooleanairSideFlowDependenttrueSet to false to make air-side hA independent of mass flow rate
BooleanwaterSideTemperatureDependentfalseSet to false to make water-side hA independent of temperature
BooleanairSideTemperatureDependentfalseSet to false to make air-side hA independent of temperature
Realn_w0.85Water-side exponent for convective heat transfer coefficient, h~m_flow^n_w
Realn_a0.8Air-side exponent for convective heat transfer coefficient, h~m_flow^n_a
Heat transfer › Nominal condition
Realr_nominal2/3Ratio between air-side and water-side convective heat transfer coefficient
Experimental
Modelica.Units.SI.ThermalConductanceGDif1E-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_flowsum(ele[i].Q1_flow for i in 1:nEle)Heat transferred from solid into medium 1
Modelica.Units.SI.HeatFlowRateQ2_flowsum(ele[i].Q2_flow for i in 1:nEle)Heat transferred from solid into medium 2
Modelica.Units.SI.Temperature[nEle]T1ele[:].vol1.TWater temperature
Modelica.Units.SI.Temperature[nEle]T2ele[:].vol2.TAir temperature
Modelica.Units.SI.Temperature[nEle]T_mele[:].con1.solid.TMetal temperature
BaseClasses.HADryCoilhAModel for convective heat transfer coefficient

Contents

NameDescription
HexElementprotectedModel for a heat exchanger element

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.
  • October 19, 2018, by Kino:
    Changed model to use a replaceable model as this allows translation in OpenModelica.
    This is for #1258.
  • November 12, 2017, by Michael wetter:
    Changed time constant to more reasonable values, which also makes closed loop control tuning easier.
  • November 4, 2017, by Michael wetter:
    Added approximation of diffusion.
    This is for Buildings, #1038.
  • September 8, 2017, by Michael Wetter:
    Changed computation of temperature used for hA calculation to avoid a state variable with small time constant for some model parameterizations.
    This is for Buildings, #678.
  • September 12, 2014, by Michael Wetter:
    Changed assignment of T_m to avoid using the conditionally enabled model ele[:].mas.T, which is only valid in a connect statement. Moved assignments of Q1_flow, Q2_flow, T1, T2 and T_m outside of equation section to avoid mixing graphical and textual modeling within the same model.
  • July 3, 2014, by Michael Wetter:
    Added parameters initialize_p1 and initialize_p2. This is required to enable the coil models to initialize the pressure in the first volume, but not in the downstream volumes. Otherwise, the initial equations will be overdetermined, but consistent. This change was done to avoid a long information message that appears when translating models.
  • June 26, 2014, by Michael Wetter:
    Removed parameters energyDynamics1 and energyDynamics2, and used instead of these two parameters the new parameter energyDynamics. This was done as this complexity is not required.
  • February 2, 2012, by Michael Wetter:
    Corrected error in assignment of dp2_nominal. 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.
  • October 8, 2011, by Michael Wetter:
    Set show_T=false to avoid state events near zero flow.
  • May 27, 2010, by Michael Wetter:
    First implementation.