Buildings.Fluid.HeatExchangers.Validation

Collection of models that validate the heat exchanger models

Information

This package contains models that validate the heat exchanger models. The examples plot various outputs, which have been verified against analytical solutions. These model outputs are stored as reference data to allow continuous validation whenever models in the library change.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.Fluid.HeatExchangers.Validation.ConstantEffectiveness ConstantEffectiveness Model that demonstrates use of a heat exchanger with constant effectiveness
Buildings.Fluid.HeatExchangers.Validation.DryCoilEffectivenessNTU DryCoilEffectivenessNTU Model that demonstrates use of a heat exchanger without condensation that uses the epsilon-NTU relation
Buildings.Fluid.HeatExchangers.Validation.EvaporatorCondenser EvaporatorCondenser Test model for the evaporator or condenser model
Buildings.Fluid.HeatExchangers.Validation.HeaterCooler_u HeaterCooler_u Model that demonstrates the ideal heater model
Buildings.Fluid.HeatExchangers.Validation.PrescribedOutlet PrescribedOutlet Model that demonstrates the ideal heater/cooler model for a prescribed outlet temperature, configured as steady-state
Buildings.Fluid.HeatExchangers.Validation.PrescribedOutlet_dynamic PrescribedOutlet_dynamic Model that demonstrates the ideal heater/cooler model for a prescribed outlet temperature, configured as dynamic
Buildings.Fluid.HeatExchangers.Validation.WetCoilCounterFlowLowWaterFlowRate WetCoilCounterFlowLowWaterFlowRate Model that tests a heat exchanger with prescribed boundary conditions, in terms of properties of inlet water and inlet air
Buildings.Fluid.HeatExchangers.Validation.WetCoilDiscretizedInitialization WetCoilDiscretizedInitialization Model that demonstrates use of a finite volume model of a heat exchanger with condensation
Buildings.Fluid.HeatExchangers.Validation.WetCoilDiscretizedInitializationPerfectGases WetCoilDiscretizedInitializationPerfectGases Model that demonstrates use of a finite volume model of a heat exchanger with condensation
Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTU WetCoilEffectivenessNTU Model that validates the wet coil effectiveness-NTU model
Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTUCounterFlow WetCoilEffectivenessNTUCounterFlow Model that validates the wet coil effectiveness-NTU model
Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTUHeating WetCoilEffectivenessNTUHeating Model that validates the wet coil effectiveness-NTU model in heating conditions

Buildings.Fluid.HeatExchangers.Validation.ConstantEffectiveness Buildings.Fluid.HeatExchangers.Validation.ConstantEffectiveness

Model that demonstrates use of a heat exchanger with constant effectiveness

Buildings.Fluid.HeatExchangers.Validation.ConstantEffectiveness

Information

This model tests Buildings.Fluid.HeatExchangers.ConstantEffectiveness for different inlet conditions.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Modelica definition

model ConstantEffectiveness "Model that demonstrates use of a heat exchanger with constant effectiveness" extends Modelica.Icons.Example; package Medium1 = Buildings.Media.Water "Medium model"; package Medium2 = Buildings.Media.Air "Medium model"; Buildings.Fluid.Sources.Boundary_pT sin_2( redeclare package Medium = Medium2, use_p_in=true, nPorts=1, T=273.15 + 10, X={0.001,0.999}) "Boundary condition"; Modelica.Blocks.Sources.Ramp PIn( height=200, duration=60, offset=101325, startTime=50) "Ramp signal for pressure"; Buildings.Fluid.Sources.Boundary_pT sou_2( redeclare package Medium = Medium2, T=273.15 + 5, use_p_in=true, use_T_in=true, nPorts=1) "Boundary condition"; Modelica.Blocks.Sources.Ramp TWat( height=10, duration=60, offset=273.15 + 30, startTime=60) "Water temperature"; Modelica.Blocks.Sources.Constant TDb(k=293.15) "Drybulb temperature"; Modelica.Blocks.Sources.Constant POut(k=101325) "Pressure"; Buildings.Fluid.Sources.Boundary_pT sin_1( redeclare package Medium = Medium1, use_p_in=true, nPorts=1, p=300000, T=273.15 + 25) "Boundary condition"; Buildings.Fluid.Sources.Boundary_pT sou_1( redeclare package Medium = Medium1, p=300000 + 5000, T=273.15 + 50, use_T_in=true, nPorts=1) "Boundary condition"; Buildings.Fluid.HeatExchangers.ConstantEffectiveness hex( redeclare package Medium1 = Medium1, redeclare package Medium2 = Medium2, show_T=true, m1_flow_nominal=5, m2_flow_nominal=5, dp1_nominal=500, dp2_nominal=10) "Heat exchanger"; Modelica.Blocks.Sources.Trapezoid trapezoid( amplitude=5000, rising=10, width=100, falling=10, period=3600, offset=300000) "Signal for pressure boundary condition"; equation connect(PIn.y,sou_2. p_in); connect(TDb.y, sou_2.T_in); connect(TWat.y, sou_1.T_in); connect(sou_1.ports[1], hex.port_a1); connect(hex.port_a2, sou_2.ports[1]); connect(POut.y, sin_2.p_in); connect(hex.port_b1, sin_1.ports[1]); connect(sin_2.ports[1], hex.port_b2); connect(trapezoid.y, sin_1.p_in); end ConstantEffectiveness;

Buildings.Fluid.HeatExchangers.Validation.DryCoilEffectivenessNTU Buildings.Fluid.HeatExchangers.Validation.DryCoilEffectivenessNTU

Model that demonstrates use of a heat exchanger without condensation that uses the epsilon-NTU relation

Buildings.Fluid.HeatExchangers.Validation.DryCoilEffectivenessNTU

Information

This model tests Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU for different inlet conditions.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
SpecificHeatCapacitycp1Medium1.specificHeatCapacity...Specific heat capacity of medium 2 [J/(kg.K)]
SpecificHeatCapacitycp2Medium2.specificHeatCapacity...Specific heat capacity of medium 2 [J/(kg.K)]
MassFlowRatem1_flow5Nominal mass flow rate medium 1 [kg/s]
MassFlowRatem2_flowm1_flow*cp1/cp2Nominal mass flow rate medium 2 [kg/s]

Modelica definition

model DryCoilEffectivenessNTU "Model that demonstrates use of a heat exchanger without condensation that uses the epsilon-NTU relation" extends Modelica.Icons.Example; package Medium1 = Buildings.Media.Water; package Medium2 = Buildings.Media.Air; parameter Modelica.Units.SI.SpecificHeatCapacity cp1= Medium1.specificHeatCapacityCp(Medium1.setState_pTX( Medium1.p_default, Medium1.T_default, Medium1.X_default)) "Specific heat capacity of medium 2"; parameter Modelica.Units.SI.SpecificHeatCapacity cp2= Medium2.specificHeatCapacityCp(Medium2.setState_pTX( Medium2.p_default, Medium2.T_default, Medium2.X_default)) "Specific heat capacity of medium 2"; parameter Modelica.Units.SI.MassFlowRate m1_flow=5 "Nominal mass flow rate medium 1"; parameter Modelica.Units.SI.MassFlowRate m2_flow=m1_flow*cp1/cp2 "Nominal mass flow rate medium 2"; Buildings.Fluid.Sources.Boundary_pT sin_2( redeclare package Medium = Medium2, use_p_in=true, nPorts=5, T=273.15 + 10) "Boundary condition"; Modelica.Blocks.Sources.Ramp PIn( height=200, duration=60, offset=101325, startTime=100) "Pressure boundary condition"; Buildings.Fluid.Sources.Boundary_pT sou_2( redeclare package Medium = Medium2, T=273.15 + 5, use_p_in=true, use_T_in=true, nPorts=5) "Boundary condition"; Modelica.Blocks.Sources.Ramp TWat( height=10, duration=60, offset=273.15 + 30, startTime=60) "Water temperature"; Modelica.Blocks.Sources.Constant TDb(k=293.15) "Drybulb temperature"; Modelica.Blocks.Sources.Constant POut(k=101325); Buildings.Fluid.Sources.Boundary_pT sin_1( redeclare package Medium = Medium1, use_p_in=true, nPorts=5, p=300000, T=273.15 + 25) "Boundary condition"; Buildings.Fluid.Sources.Boundary_pT sou_1( redeclare package Medium = Medium1, p=300000 + 5000, T=273.15 + 50, use_T_in=true, nPorts=5) "Boundary condition"; Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU hexPar( redeclare package Medium1 = Medium1, redeclare package Medium2 = Medium2, dp1_nominal=500, dp2_nominal=10, m1_flow_nominal=m1_flow, m2_flow_nominal=m2_flow, Q_flow_nominal=m2_flow*cp2*(24 - 20), configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.ParallelFlow, show_T=true, T_a1_nominal=303.15, T_a2_nominal=293.15) "Heat exchanger"; Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU hexCou( redeclare package Medium1 = Medium1, redeclare package Medium2 = Medium2, dp1_nominal=500, dp2_nominal=10, m1_flow_nominal=m1_flow, m2_flow_nominal=m2_flow, Q_flow_nominal=m2_flow*cp2*(24 - 20), configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow, show_T=true, T_a1_nominal=303.15, T_a2_nominal=293.15) "Heat exchanger"; Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU hexCroC1Mix( redeclare package Medium1 = Medium1, redeclare package Medium2 = Medium2, dp1_nominal=500, dp2_nominal=10, m1_flow_nominal=m1_flow, m2_flow_nominal=m2_flow, Q_flow_nominal=m2_flow*cp2*(24 - 20), configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CrossFlowStream1MixedStream2Unmixed, show_T=true, T_a1_nominal=303.15, T_a2_nominal=293.15) "Heat exchanger"; Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU hexCroC1Unm( redeclare package Medium1 = Medium1, redeclare package Medium2 = Medium2, dp1_nominal=500, dp2_nominal=10, m1_flow_nominal=m1_flow, m2_flow_nominal=m2_flow, Q_flow_nominal=m2_flow*cp2*(24 - 20), configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CrossFlowStream1UnmixedStream2Mixed, show_T=true, T_a1_nominal=303.15, T_a2_nominal=293.15) "Heat exchanger"; Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU hexCroUnm( redeclare package Medium1 = Medium1, redeclare package Medium2 = Medium2, dp1_nominal=500, dp2_nominal=10, m1_flow_nominal=m1_flow, m2_flow_nominal=m2_flow, Q_flow_nominal=m2_flow*cp2*(24 - 20), configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CrossFlowUnmixed, show_T=true, T_a1_nominal=303.15, T_a2_nominal=293.15) "Heat exchanger"; Modelica.Blocks.Sources.Trapezoid trapezoid( amplitude=5000, rising=10, width=100, falling=10, period=3600, offset=300000) "Pressure boundary condition"; equation connect(PIn.y,sou_2. p_in); connect(TDb.y, sou_2.T_in); connect(TWat.y, sou_1.T_in); connect(sou_1.ports[1], hexPar.port_a1); connect(hexPar.port_a2, sou_2.ports[1]); connect(POut.y, sin_2.p_in); connect(hexPar.port_b1, sin_1.ports[1]); connect(sin_2.ports[1], hexPar.port_b2); connect(hexCou.port_a1, sou_1.ports[2]); connect(hexCroC1Mix.port_a1, sou_1.ports[3]); connect(hexCroC1Unm.port_a1, sou_1.ports[4]); connect(hexCou.port_b2, sin_2.ports[2]); connect(hexCroC1Mix.port_b2, sin_2.ports[3]); connect(hexCroC1Unm.port_b2, sin_2.ports[4]); connect(hexCou.port_b1, sin_1.ports[2]); connect(hexCroC1Mix.port_b1, sin_1.ports[3]); connect(hexCroC1Unm.port_b1, sin_1.ports[4]); connect(hexCou.port_a2, sou_2.ports[2]); connect(hexCroC1Mix.port_a2, sou_2.ports[3]); connect(hexCroC1Unm.port_a2, sou_2.ports[4]); connect(hexCroUnm.port_a1, sou_1.ports[5]); connect(hexCroUnm.port_b2, sin_2.ports[5]); connect(hexCroUnm.port_b1, sin_1.ports[5]); connect(hexCroUnm.port_a2, sou_2.ports[5]); connect(trapezoid.y, sin_1.p_in); end DryCoilEffectivenessNTU;

Buildings.Fluid.HeatExchangers.Validation.EvaporatorCondenser Buildings.Fluid.HeatExchangers.Validation.EvaporatorCondenser

Test model for the evaporator or condenser model

Buildings.Fluid.HeatExchangers.Validation.EvaporatorCondenser

Information

Model that demonstrates the use of the Buildings.Fluid.HeatExchangers.EvaporatorCondenser model.

The fluid flow rate is increased from ṁ = 0.01 kg/s to ṁ = 0.10 kg/s over 100 seconds. As a result, the heat exchanger effectiveness and the fluid temperature difference in the heat exchanger decrease.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
MassFlowRatem_flow_nominal0.01Nominal mass flow rate [kg/s]

Modelica definition

model EvaporatorCondenser "Test model for the evaporator or condenser model" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water "Medium model"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=0.01 "Nominal mass flow rate"; Buildings.HeatTransfer.Sources.FixedTemperature ref(T=283.15) "Refrigerant temperature"; Modelica.Thermal.HeatTransfer.Sensors.HeatFlowSensor heaFlo "Heat flow rate sensor"; Modelica.Fluid.Sources.MassFlowSource_T sou( nPorts=1, redeclare package Medium = Medium, m_flow=0.1, use_m_flow_in=true, T=323.15) "Flow source"; Modelica.Fluid.Sources.FixedBoundary sin( redeclare package Medium = Medium, p=0, nPorts=1) "Sink"; Buildings.Fluid.HeatExchangers.EvaporatorCondenser eva( redeclare package Medium = Medium, m_flow(start=0.1), dp(start=10), UA=100, dp_nominal=0, tau=5, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, m_flow_nominal=m_flow_nominal) "Evaporator"; Modelica.Blocks.Sources.Ramp m_flow( duration=100, height=9*m_flow_nominal, offset=m_flow_nominal) "Mass flow rate"; Buildings.Fluid.Sensors.TemperatureTwoPort senTem( m_flow_nominal=m_flow_nominal, redeclare package Medium = Medium, tau=0.01, initType=Modelica.Blocks.Types.Init.SteadyState) "Temperature sensor"; equation connect(ref.port, heaFlo.port_a); connect(heaFlo.port_b, eva.port_ref); connect(sou.ports[1], eva.port_a); connect(m_flow.y, sou.m_flow_in); connect(eva.port_b, senTem.port_a); connect(senTem.port_b, sin.ports[1]); end EvaporatorCondenser;

Buildings.Fluid.HeatExchangers.Validation.HeaterCooler_u Buildings.Fluid.HeatExchangers.Validation.HeaterCooler_u

Model that demonstrates the ideal heater model

Buildings.Fluid.HeatExchangers.Validation.HeaterCooler_u

Information

Model that demonstrates the use of an ideal heater. Both heater models are identical, except that one model is configured as a steady-state model, whereas the other is configured as a dynamic model. Both heaters add heat to the medium to track a set-point for the outlet temperature.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
MassFlowRatem_flow_nominal3000/1000/20Nominal mass flow rate [kg/s]

Modelica definition

model HeaterCooler_u "Model that demonstrates the ideal heater model" extends Modelica.Icons.Example; package Medium = Buildings.Media.Air; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=3000/1000/20 "Nominal mass flow rate"; Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, use_T_in=false, p(displayUnit="Pa"), T=293.15, nPorts=2) "Sink"; Buildings.Fluid.HeatExchangers.HeaterCooler_u heaSte( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, dp_nominal=6000, Q_flow_nominal=3000, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) "Steady-state model of the heater"; Buildings.Fluid.Sensors.TemperatureTwoPort senTem1( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal) "Temperature sensor"; Modelica.Blocks.Sources.TimeTable TSet(table=[0, 273.15 + 20; 120, 273.15 +20; 120, 273.15 + 30; 1200, 273.15 + 30]) "Setpoint"; Buildings.Controls.Continuous.LimPID con1( Td=1, k=1, Ti=10) "Controller"; Buildings.Fluid.HeatExchangers.HeaterCooler_u heaDyn( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, dp_nominal=6000, Q_flow_nominal=3000, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyStateInitial) "Dynamic model of the heater"; Buildings.Fluid.Sensors.TemperatureTwoPort senTem2( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal) "Temperature sensor"; Buildings.Controls.Continuous.LimPID con2( Td=1, Ti=10, k=0.1) "Controller"; Buildings.Fluid.Sources.MassFlowSource_T sou( redeclare package Medium = Medium, use_T_in=false, nPorts=2, m_flow=2*m_flow_nominal, T=293.15) "Source"; equation connect(senTem1.T, con1.u_m); connect(TSet.y, con1.u_s); connect(con1.y, heaSte.u); connect(heaSte.port_b, senTem1.port_a); connect(senTem2.T, con2.u_m); connect(TSet.y, con2.u_s); connect(con2.y, heaDyn.u); connect(heaDyn.port_b, senTem2.port_a); connect(heaSte.port_a, sou.ports[1]); connect(sou.ports[2], heaDyn.port_a); connect(senTem2.port_b, sin.ports[1]); connect(senTem1.port_b, sin.ports[2]); end HeaterCooler_u;

Buildings.Fluid.HeatExchangers.Validation.PrescribedOutlet Buildings.Fluid.HeatExchangers.Validation.PrescribedOutlet

Model that demonstrates the ideal heater/cooler model for a prescribed outlet temperature, configured as steady-state

Buildings.Fluid.HeatExchangers.Validation.PrescribedOutlet

Information

Model that demonstrates the use of an ideal heater and an ideal cooler.

The heater model has a capacity of Q_flow_max = 1.0e4 Watts and the cooler model has a capacitiy of Q_flow_min = -1000 Watts. Hence, both only track their set point of the outlet temperature during certain times. There is also a heater and cooler with unlimited capacity.

At t=1000 second, the flow reverses its direction.

Each flow leg has the same mass flow rate. There are three mass flow sources as using one source only would yield a nonlinear system of equations that needs to be solved to determine the mass flow rate distribution.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
MassFlowRatem_flow_nominal0.1Nominal mass flow rate [kg/s]

Modelica definition

model PrescribedOutlet "Model that demonstrates the ideal heater/cooler model for a prescribed outlet temperature, configured as steady-state" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=0.1 "Nominal mass flow rate"; Buildings.Fluid.Sources.Boundary_pT sin( redeclare package Medium = Medium, use_T_in=false, p(displayUnit="Pa"), T=293.15, nPorts=3) "Sink"; Buildings.Fluid.HeatExchangers.PrescribedOutlet heaHigPow( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, dp_nominal=6000, QMax_flow=1e4, use_X_wSet=false) "Steady-state model of the heater with high capacity"; Buildings.Fluid.Sensors.TemperatureTwoPort heaHigPowOut( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal) "Temperature sensor"; Modelica.Blocks.Sources.TimeTable TSetHeat(table=[0,273.15 + 20.0; 120,273.15 + 20.0; 120,273.15 + 60.0; 500,273.15 + 60.0; 500,273.15 + 30.0; 1200,273.15 + 30.0]) "Setpoint heating"; Buildings.Fluid.Sensors.TemperatureTwoPort cooLimPowOut( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal) "Temperature sensor"; Buildings.Fluid.HeatExchangers.PrescribedOutlet cooLimPow( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, dp_nominal=6000, QMin_flow=-1000, use_X_wSet=false) "Steady-state model of the cooler with limited capacity"; Modelica.Blocks.Sources.TimeTable TSetCool(table=[0,273.15 + 20.0; 120,273.15 + 20.0; 120,273.15 + 15.0; 500,273.15 + 15.0; 500,273.15 + 10.0; 1200,273.15 + 10.0]) "Setpoint cooling"; Buildings.Fluid.HeatExchangers.PrescribedOutlet heaCooUnl( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal, dp_nominal=6000, use_X_wSet=false) "Steady-state model of the heater or cooler with unlimited capacity"; Modelica.Blocks.Sources.TimeTable TSetCoolHeat(table=[0,273.15 + 20.0; 120,273.15 + 20.0; 120,273.15 + 15.0; 500,273.15 + 15.0; 500,273.15 + 30.0; 1200,273.15 + 30.0]) "Setpoint cooling"; Buildings.Fluid.Sensors.TemperatureTwoPort heaCooUnlOut( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal) "Temperature sensor"; Modelica.Blocks.Sources.Ramp m_flow( height=-2*m_flow_nominal, duration=100, offset=m_flow_nominal, startTime=1000) "Mass flow rate"; Buildings.Fluid.Sensors.TemperatureTwoPort heaHigPowIn( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal) "Temperature sensor"; Buildings.Fluid.Sensors.TemperatureTwoPort cooLimPowIn( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal) "Temperature sensor"; Buildings.Fluid.Sensors.TemperatureTwoPort heaCooUnlIn( redeclare package Medium = Medium, m_flow_nominal=m_flow_nominal) "Temperature sensor"; Sources.MassFlowSource_T sou1( redeclare package Medium = Medium, use_m_flow_in=true, nPorts=1, T=293.15) "Flow source"; Sources.MassFlowSource_T sou2( redeclare package Medium = Medium, use_m_flow_in=true, nPorts=1, T=293.15) "Flow source"; Sources.MassFlowSource_T sou3( redeclare package Medium = Medium, use_m_flow_in=true, nPorts=1, T=293.15) "Flow source"; equation connect(heaHigPow.port_b, heaHigPowOut.port_a); connect(TSetHeat.y, heaHigPow.TSet); connect(cooLimPow.port_b, cooLimPowOut.port_a); connect(TSetCool.y, cooLimPow.TSet); connect(heaCooUnl.port_b, heaCooUnlOut.port_a); connect(TSetCoolHeat.y, heaCooUnl.TSet); connect(heaHigPowIn.port_b, heaHigPow.port_a); connect(cooLimPowIn.port_b, cooLimPow.port_a); connect(heaCooUnlIn.port_b, heaCooUnl.port_a); connect(heaCooUnlOut.port_b, sin.ports[1]); connect(cooLimPowOut.port_b, sin.ports[2]); connect(heaHigPowOut.port_b, sin.ports[3]); connect(m_flow.y, sou1.m_flow_in); connect(sou1.ports[1], heaHigPowIn.port_a); connect(m_flow.y, sou2.m_flow_in); connect(m_flow.y, sou3.m_flow_in); connect(sou2.ports[1], cooLimPowIn.port_a); connect(sou3.ports[1], heaCooUnlIn.port_a); end PrescribedOutlet;

Buildings.Fluid.HeatExchangers.Validation.PrescribedOutlet_dynamic Buildings.Fluid.HeatExchangers.Validation.PrescribedOutlet_dynamic

Model that demonstrates the ideal heater/cooler model for a prescribed outlet temperature, configured as dynamic

Buildings.Fluid.HeatExchangers.Validation.PrescribedOutlet_dynamic

Information

Model that demonstrates the use of an ideal heater and an ideal cooler, configured as dynamic models.

This example is identical to Buildings.Fluid.HeatExchangers.Validation.PrescribedOutlet except that the heater and cooler models are configured to have a time constant of 60 seconds at nominal flow rate. At lower flow rate, the time constant increases proportional to the mass flow rate.

Extends from Buildings.Fluid.HeatExchangers.Validation.PrescribedOutlet (Model that demonstrates the ideal heater/cooler model for a prescribed outlet temperature, configured as steady-state).

Parameters

TypeNameDefaultDescription
MassFlowRatem_flow_nominal0.1Nominal mass flow rate [kg/s]

Modelica definition

model PrescribedOutlet_dynamic "Model that demonstrates the ideal heater/cooler model for a prescribed outlet temperature, configured as dynamic" extends Buildings.Fluid.HeatExchangers.Validation.PrescribedOutlet( heaHigPow(energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial), cooLimPow(energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial), heaCooUnl(energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)); end PrescribedOutlet_dynamic;

Buildings.Fluid.HeatExchangers.Validation.WetCoilCounterFlowLowWaterFlowRate Buildings.Fluid.HeatExchangers.Validation.WetCoilCounterFlowLowWaterFlowRate

Model that tests a heat exchanger with prescribed boundary conditions, in terms of properties of inlet water and inlet air

Buildings.Fluid.HeatExchangers.Validation.WetCoilCounterFlowLowWaterFlowRate

Information

This is a validation case in which the air flow rate is about a third of the design flow rate, and the water mass flow rate is ramped to zero. The validation verifies that the outlet temperatures approach the inlet temperature of the air.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
MassFlowRatemWat_flow_nominal0.44732114Nominal mass flow rate [kg/s]
MassFlowRatemAir_flow_nominal0.65844Nominal mass flow rate [kg/s]

Modelica definition

model WetCoilCounterFlowLowWaterFlowRate "Model that tests a heat exchanger with prescribed boundary conditions, in terms of properties of inlet water and inlet air" extends Modelica.Icons.Example; package Medium1 = Buildings.Media.Water "Medium model for water"; package Medium2 = Buildings.Media.Air "Medium model for air"; parameter Modelica.Units.SI.MassFlowRate mWat_flow_nominal=0.44732114 "Nominal mass flow rate"; parameter Modelica.Units.SI.MassFlowRate mAir_flow_nominal=0.65844 "Nominal mass flow rate"; Buildings.Fluid.HeatExchangers.WetCoilCounterFlow hex( redeclare package Medium1 = Medium1, redeclare package Medium2 = Medium2, m1_flow_nominal=mWat_flow_nominal, m2_flow_nominal=mAir_flow_nominal, dp2_nominal(displayUnit="Pa") = 200, dp1_nominal(displayUnit="Pa") = 3000, UA_nominal=mWat_flow_nominal*4200*10/30, show_T=true, nEle=1, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Cooling coil"; Buildings.Fluid.Sources.MassFlowSource_T sou_w( redeclare package Medium = Medium1, use_Xi_in=false, m_flow=1E-4*mWat_flow_nominal, use_T_in=false, T=282.15, nPorts=1, use_m_flow_in=true) "Source for water"; Buildings.Fluid.Sources.Boundary_pT sin_w( redeclare package Medium = Medium1, use_p_in=false, T=293.15, nPorts=1) "sink for water"; Buildings.Fluid.Sources.MassFlowSource_T sou_a( use_Xi_in=false, X={0.0086,1 - 0.0086}, m_flow=mAir_flow_nominal, use_T_in=false, T=285.15, nPorts=1, redeclare package Medium = Medium2, use_m_flow_in=false) "Source for air"; Buildings.Fluid.Sources.Boundary_pT sin_a( redeclare package Medium = Medium2, use_p_in=false, T=293.15, nPorts=1) "sink for air"; Controls.OBC.CDL.Reals.Sources.Ramp ram( height=-mWat_flow_nominal, duration=1800, offset=mWat_flow_nominal, startTime=900); Sensors.TemperatureTwoPort senTemWatIn( redeclare package Medium = Medium1, allowFlowReversal=false, m_flow_nominal=mWat_flow_nominal, tau=0) "Temperature sensor"; Sensors.TemperatureTwoPort senTemWatOut( redeclare package Medium = Medium1, allowFlowReversal=false, m_flow_nominal=mWat_flow_nominal, tau=0) "Temperature sensor"; Sensors.TemperatureTwoPort senTemAirIn( redeclare package Medium = Medium2, allowFlowReversal=false, m_flow_nominal=mAir_flow_nominal, tau=0) "Temperature sensor"; Sensors.TemperatureTwoPort senTemAirOut( redeclare package Medium = Medium2, allowFlowReversal=false, m_flow_nominal=mAir_flow_nominal, tau=0) "Temperature sensor"; equation connect(sou_w.m_flow_in, ram.y); connect(sou_w.ports[1], senTemWatIn.port_a); connect(senTemWatIn.port_b, hex.port_a1); connect(sin_w.ports[1], senTemWatOut.port_b); connect(senTemWatOut.port_a, hex.port_b1); connect(sou_a.ports[1], senTemAirIn.port_a); connect(senTemAirIn.port_b, hex.port_a2); connect(sin_a.ports[1], senTemAirOut.port_b); connect(senTemAirOut.port_a, hex.port_b2); end WetCoilCounterFlowLowWaterFlowRate;

Buildings.Fluid.HeatExchangers.Validation.WetCoilDiscretizedInitialization Buildings.Fluid.HeatExchangers.Validation.WetCoilDiscretizedInitialization

Model that demonstrates use of a finite volume model of a heat exchanger with condensation

Buildings.Fluid.HeatExchangers.Validation.WetCoilDiscretizedInitialization

Information

This model is used to test the initialization of the coil model. There are three instances of the coil model, each having different settings for the initial conditions. Each of the coil uses for the medium Buildings.Media.Air.

Extends from Buildings.Fluid.HeatExchangers.Examples.BaseClasses.WetCoilDiscretized (Model that demonstrates use of a finite volume model of a heat exchanger with condensation), Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
replaceable package Medium2PartialMediumMedium for air-side
TemperatureT_a1_nominal5 + 273.15Water inlet temperature [K]
TemperatureT_b1_nominal10 + 273.15Water outlet temperature [K]
TemperatureT_a2_nominal30 + 273.15Air inlet temperature [K]
TemperatureT_b2_nominal10 + 273.15Air inlet temperature [K]
MassFlowRatem1_flow_nominal5Nominal mass flow rate water-side [kg/s]
MassFlowRatem2_flow_nominalm1_flow_nominal*4200/1000*(T...Nominal mass flow rate air-side [kg/s]

Connectors

TypeNameDescription
replaceable package Medium2Medium for air-side

Modelica definition

model WetCoilDiscretizedInitialization "Model that demonstrates use of a finite volume model of a heat exchanger with condensation" extends Buildings.Fluid.HeatExchangers.Examples.BaseClasses.WetCoilDiscretized ( redeclare package Medium2 = Buildings.Media.Air); extends Modelica.Icons.Example; end WetCoilDiscretizedInitialization;

Buildings.Fluid.HeatExchangers.Validation.WetCoilDiscretizedInitializationPerfectGases Buildings.Fluid.HeatExchangers.Validation.WetCoilDiscretizedInitializationPerfectGases

Model that demonstrates use of a finite volume model of a heat exchanger with condensation

Buildings.Fluid.HeatExchangers.Validation.WetCoilDiscretizedInitializationPerfectGases

Information

This model is used to test the initialization of the coil model. There are three instances of the coil model, each having different settings for the initial conditions. Each of the coil uses for the medium Buildings.Media.Air.

Extends from Buildings.Fluid.HeatExchangers.Examples.BaseClasses.WetCoilDiscretized (Model that demonstrates use of a finite volume model of a heat exchanger with condensation), Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
replaceable package Medium2PartialMediumMedium for air-side
TemperatureT_a1_nominal5 + 273.15Water inlet temperature [K]
TemperatureT_b1_nominal10 + 273.15Water outlet temperature [K]
TemperatureT_a2_nominal30 + 273.15Air inlet temperature [K]
TemperatureT_b2_nominal10 + 273.15Air inlet temperature [K]
MassFlowRatem1_flow_nominal5Nominal mass flow rate water-side [kg/s]
MassFlowRatem2_flow_nominalm1_flow_nominal*4200/1000*(T...Nominal mass flow rate air-side [kg/s]

Connectors

TypeNameDescription
replaceable package Medium2Medium for air-side

Modelica definition

model WetCoilDiscretizedInitializationPerfectGases "Model that demonstrates use of a finite volume model of a heat exchanger with condensation" extends Buildings.Fluid.HeatExchangers.Examples.BaseClasses.WetCoilDiscretized ( redeclare package Medium2 = Buildings.Media.Air); extends Modelica.Icons.Example; end WetCoilDiscretizedInitializationPerfectGases;

Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTU Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTU

Model that validates the wet coil effectiveness-NTU model

Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTU

Information

This model duplicates an example from Mitchell and Braun 2012, example SM-2-1 (Mitchell and Braun 2012) to validate a single case for the Buildings.Fluid.HeatExchangers.WetCoilEffectivenessNTU model.

Validation

The example simulates a wet coil with constant air and water inlet temperature and mass flow rate, and an increasing air inlet humidity which triggers the transition from a fully-dry to a fully-wet regime. The reference used for validation is the published experimental data.

Note that the outlet air relative humidity may slightly exceed 100% when using the epsilon-NTU model.

References

Mitchell, John W., and James E. Braun. 2012. "Supplementary Material Chapter 2: Heat Exchangers for Cooling Applications". Excerpt from Principles of heating, ventilation, and air conditioning in buildings. Hoboken, N.J.: Wiley. Available online: http://bcs.wiley.com/he-bcs/Books?action=index&itemId=0470624574&bcsId=7185

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
TemperatureT_a1_nominalModelica.Units.Conversions.f...Inlet water temperature [K]
TemperatureT_a2_nominalModelica.Units.Conversions.f...Inlet air temperature [K]
TemperatureT_b1_nominal273.15 + 11.0678Outlet water temperature in fully wet conditions [K]
TemperatureT_b2_nominal273.15 + 13.5805Outlet air temperature in fully wet conditions [K]
RealX_w_a2_nominal0.0173Inlet water mass fraction in fully wet conditions
ThermalConductanceUA_nominal4748Total thermal conductance at nominal flow, from textbook [W/K]
MassFlowRatem1_flow_nominal3.78Nominal mass flow rate of water [kg/s]
MassFlowRatem2_flow_nominal2.646Nominal mass flow rate of air [kg/s]
HeatExchangerConfigurationhexConTypes.HeatExchangerConfigura...Heat exchanger configuration

Modelica definition

model WetCoilEffectivenessNTU "Model that validates the wet coil effectiveness-NTU model" extends Modelica.Icons.Example; package Medium_W = Buildings.Media.Water; package Medium_A = Buildings.Media.Air; constant Modelica.Units.SI.AbsolutePressure pAtm=101325 "Atmospheric pressure"; parameter Modelica.Units.SI.Temperature T_a1_nominal= Modelica.Units.Conversions.from_degF(42) "Inlet water temperature"; parameter Modelica.Units.SI.Temperature T_a2_nominal= Modelica.Units.Conversions.from_degF(80) "Inlet air temperature"; parameter Modelica.Units.SI.Temperature T_b1_nominal=273.15 + 11.0678 "Outlet water temperature in fully wet conditions"; parameter Modelica.Units.SI.Temperature T_b2_nominal=273.15 + 13.5805 "Outlet air temperature in fully wet conditions"; final parameter Modelica.Units.SI.HeatFlowRate Q_flow_nominal=m1_flow_nominal *4186*(T_a1_nominal - T_b1_nominal); parameter Real X_w_a2_nominal = 0.0173 "Inlet water mass fraction in fully wet conditions"; parameter Modelica.Units.SI.ThermalConductance UA_nominal=4748 "Total thermal conductance at nominal flow, from textbook"; parameter Modelica.Units.SI.MassFlowRate m1_flow_nominal=3.78 "Nominal mass flow rate of water"; parameter Modelica.Units.SI.MassFlowRate m2_flow_nominal=2.646 "Nominal mass flow rate of air"; parameter Types.HeatExchangerConfiguration hexCon= Types.HeatExchangerConfiguration.CounterFlow "Heat exchanger configuration"; Buildings.Fluid.Sources.Boundary_pT sinAir( redeclare package Medium = Medium_A, use_p_in=false, nPorts=2) "Air sink"; Sources.MassFlowSource_T souAir( redeclare package Medium = Medium_A, m_flow=m2_flow_nominal, T=T_a2_nominal, use_Xi_in=true, nPorts=1) "Air source"; Buildings.Fluid.Sources.Boundary_pT sinWat( redeclare package Medium = Medium_W, nPorts=2) "Sink for water"; Buildings.Utilities.Psychrometrics.ToTotalAir conversion; Sensors.RelativeHumidityTwoPort relHumIn(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Inlet relative humidity"; Sensors.TemperatureTwoPort TDryBulIn(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Inlet dry bulb temperature"; Modelica.Blocks.Sources.RealExpression pAir(y=pAtm) "Air pressure"; Buildings.Utilities.Psychrometrics.TWetBul_TDryBulXi wetBulIn(redeclare package Medium = Medium_A) "Computation of wet bulb temperature"; Sensors.MassFractionTwoPort senMasFraIn(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Water mass fraction of entering air"; Sensors.MassFractionTwoPort senMasFraOut(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Water mass fraction of leaving air"; Sensors.TemperatureTwoPort TDryBulOut(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Dry bulb temperature of leaving air"; Buildings.Utilities.Psychrometrics.TWetBul_TDryBulXi wetBulOut(redeclare package Medium = Medium_A) "Computation of wet bulb temperature"; Modelica.Blocks.Sources.RealExpression pAir1(y=pAtm) "Air pressure"; Buildings.Fluid.HeatExchangers.WetCoilEffectivenessNTU hexWetNTU( redeclare package Medium1 = Medium_W, redeclare package Medium2 = Medium_A, UA_nominal=UA_nominal, m1_flow_nominal=m1_flow_nominal, m2_flow_nominal=m2_flow_nominal, dp2_nominal=0, dp1_nominal=0, configuration=hexCon, show_T=true) "Effectiveness-NTU coil model (parameterized with nominal UA)"; Sources.MassFlowSource_T souWat1( redeclare package Medium = Medium_W, m_flow=m1_flow_nominal, T=T_a1_nominal, nPorts=1) "Source for water"; Sensors.RelativeHumidityTwoPort relHumOut_eps(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Outlet relative humidity"; Buildings.Fluid.HeatExchangers.WetCoilEffectivenessNTU hexWetNTU_TX( redeclare package Medium1 = Medium_W, redeclare package Medium2 = Medium_A, use_Q_flow_nominal=true, Q_flow_nominal=Q_flow_nominal, T_a2_nominal=T_a2_nominal, w_a2_nominal=X_w_a2_nominal/(1 - X_w_a2_nominal), T_a1_nominal=T_a1_nominal, m1_flow_nominal=m1_flow_nominal, m2_flow_nominal=m2_flow_nominal, dp2_nominal=0, dp1_nominal=0, configuration=hexCon, show_T=true) "Effectiveness-NTU coil model (parameterized with nominal T and X)"; Sources.MassFlowSource_T souAir1( redeclare package Medium = Medium_A, m_flow=m2_flow_nominal, T=T_a2_nominal, use_Xi_in=true, nPorts=1) "Air source"; Sources.MassFlowSource_T souWat2( redeclare package Medium = Medium_W, m_flow=m1_flow_nominal, T=T_a1_nominal, nPorts=1) "Source for water"; Modelica.Blocks.Sources.CombiTimeTable w_a2(table=[0,0.0035383; 1,0.01765], timeScale=1000) "Absolute humidity of entering air"; equation connect(pAir.y, wetBulIn.p); connect(pAir1.y, wetBulOut.p); connect(senMasFraOut.port_b, sinAir.ports[1]); connect(TDryBulOut.T, wetBulOut.TDryBul); connect(senMasFraOut.X, wetBulOut.Xi[1]); connect(souAir.ports[1], senMasFraIn.port_a); connect(senMasFraIn.port_b, TDryBulIn.port_a); connect(senMasFraIn.X, wetBulIn.Xi[1]); connect(TDryBulIn.T, wetBulIn.TDryBul); connect(TDryBulIn.port_b, relHumIn.port_a); connect(souWat1.ports[1], hexWetNTU.port_a1); connect(hexWetNTU.port_b1, sinWat.ports[1]); connect(hexWetNTU.port_b2, TDryBulOut.port_a); connect(hexWetNTU.port_a2, relHumIn.port_b); connect(TDryBulOut.port_b, relHumOut_eps.port_a); connect(relHumOut_eps.port_b, senMasFraOut.port_a); connect(hexWetNTU_TX.port_b1, sinWat.ports[2]); connect(souAir1.ports[1], hexWetNTU_TX.port_a2); connect(sinAir.ports[2], hexWetNTU_TX.port_b2); connect(souWat2.ports[1], hexWetNTU_TX.port_a1); connect(w_a2.y[1], conversion.XiDry); connect(conversion.XiTotalAir, souAir.Xi_in[1]); connect(conversion.XiTotalAir, souAir1.Xi_in[1]); end WetCoilEffectivenessNTU;

Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTUCounterFlow Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTUCounterFlow

Model that validates the wet coil effectiveness-NTU model

Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTUCounterFlow

Information

This model is similar to Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTU, except that a discretized wet coil model is also simulated for comparison. To provide an accurate reference, the latter model is configured with 30 elements. Under steady-state modeling assumptions, this creates a large system of non-linear equations. To alleviate this effect, dynamics are considered but the simulation time is increased to 1000 s to reproduce quasi steady-state conditions.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
TemperatureT_a1_nominalModelica.Units.Conversions.f...Inlet water temperature [K]
TemperatureT_a2_nominalModelica.Units.Conversions.f...Inlet air temperature [K]
TemperatureT_b1_nominal273.15 + 11.0678Outlet water temperature in fully wet conditions [K]
TemperatureT_b2_nominal273.15 + 13.5805Outlet air temperature in fully wet conditions [K]
RealX_w_a2_nominal0.0173Inlet water mass fraction in fully wet conditions
ThermalConductanceUA_nominal4748Total thermal conductance at nominal flow, from textbook [W/K]
MassFlowRatem1_flow_nominal3.78Nominal mass flow rate of water [kg/s]
MassFlowRatem2_flow_nominal2.646Nominal mass flow rate of air [kg/s]
HeatExchangerConfigurationhexConTypes.HeatExchangerConfigura...Heat exchanger configuration

Modelica definition

model WetCoilEffectivenessNTUCounterFlow "Model that validates the wet coil effectiveness-NTU model" extends Modelica.Icons.Example; package Medium_W = Buildings.Media.Water; package Medium_A = Buildings.Media.Air; constant Modelica.Units.SI.AbsolutePressure pAtm=101325 "Atmospheric pressure"; parameter Modelica.Units.SI.Temperature T_a1_nominal= Modelica.Units.Conversions.from_degF(42) "Inlet water temperature"; parameter Modelica.Units.SI.Temperature T_a2_nominal= Modelica.Units.Conversions.from_degF(80) "Inlet air temperature"; parameter Modelica.Units.SI.Temperature T_b1_nominal=273.15 + 11.0678 "Outlet water temperature in fully wet conditions"; parameter Modelica.Units.SI.Temperature T_b2_nominal=273.15 + 13.5805 "Outlet air temperature in fully wet conditions"; final parameter Modelica.Units.SI.HeatFlowRate Q_flow_nominal=m1_flow_nominal *4186*(T_a1_nominal - T_b1_nominal); parameter Real X_w_a2_nominal = 0.0173 "Inlet water mass fraction in fully wet conditions"; parameter Modelica.Units.SI.ThermalConductance UA_nominal=4748 "Total thermal conductance at nominal flow, from textbook"; parameter Modelica.Units.SI.MassFlowRate m1_flow_nominal=3.78 "Nominal mass flow rate of water"; parameter Modelica.Units.SI.MassFlowRate m2_flow_nominal=2.646 "Nominal mass flow rate of air"; parameter Types.HeatExchangerConfiguration hexCon= Types.HeatExchangerConfiguration.CounterFlow "Heat exchanger configuration"; Buildings.Fluid.Sources.Boundary_pT sinAir( redeclare package Medium = Medium_A, use_p_in=false, nPorts=3) "Air sink"; Sources.MassFlowSource_T souAir( redeclare package Medium = Medium_A, m_flow=m2_flow_nominal, T=T_a2_nominal, use_Xi_in=true, nPorts=1) "Air source"; Buildings.Fluid.Sources.Boundary_pT sinWat( redeclare package Medium = Medium_W, nPorts=3) "Sink for water"; Buildings.Utilities.Psychrometrics.ToTotalAir conversion; Sensors.RelativeHumidityTwoPort relHumIn(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Inlet relative humidity"; Sensors.TemperatureTwoPort TDryBulIn(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Inlet dry bulb temperature"; Modelica.Blocks.Sources.RealExpression pAir(y=pAtm) "Air pressure"; Buildings.Utilities.Psychrometrics.TWetBul_TDryBulXi wetBulIn(redeclare package Medium = Medium_A) "Computation of wet bulb temperature"; Sensors.MassFractionTwoPort senMasFraIn(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Water mass fraction of entering air"; Sensors.MassFractionTwoPort senMasFraOut(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Water mass fraction of leaving air"; Sensors.TemperatureTwoPort TDryBulOut(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Dry bulb temperature of leaving air"; Buildings.Utilities.Psychrometrics.TWetBul_TDryBulXi wetBulOut(redeclare package Medium = Medium_A) "Computation of wet bulb temperature"; Modelica.Blocks.Sources.RealExpression pAir1(y=pAtm) "Air pressure"; Buildings.Fluid.HeatExchangers.WetCoilEffectivenessNTU hexWetNTU( redeclare package Medium1 = Medium_W, redeclare package Medium2 = Medium_A, UA_nominal=UA_nominal, m1_flow_nominal=m1_flow_nominal, m2_flow_nominal=m2_flow_nominal, dp2_nominal=0, dp1_nominal=0, configuration=hexCon, show_T=true) "Effectiveness-NTU coil model (parameterized with nominal UA)"; Sources.MassFlowSource_T souWat1( redeclare package Medium = Medium_W, m_flow=m1_flow_nominal, T=T_a1_nominal, nPorts=1) "Source for water"; WetCoilCounterFlow hexDis( redeclare package Medium1 = Medium_W, redeclare package Medium2 = Medium_A, m1_flow_nominal=m1_flow_nominal, m2_flow_nominal=m2_flow_nominal, dp2_nominal=0, allowFlowReversal1=false, allowFlowReversal2=false, dp1_nominal=0, UA_nominal=UA_nominal, show_T=true, nEle=30, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, tau1=0.1, tau2=0.1, tau_m=0.1) "Discretized coil model"; Sources.MassFlowSource_T souWat( redeclare package Medium = Medium_W, m_flow=m1_flow_nominal, T=T_a1_nominal, nPorts=1) "Source for water"; Sources.MassFlowSource_T souAir2( redeclare package Medium = Medium_A, m_flow=m2_flow_nominal, T=T_a2_nominal, use_Xi_in=true, nPorts=1) "Air source"; Sensors.MassFractionTwoPort senMasFraOut1(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Water mass fraction of leaving air"; Sensors.TemperatureTwoPort TDryBulOut1(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Dry bulb temperature of leaving air"; Sensors.RelativeHumidityTwoPort relHumOut_eps(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Outlet relative humidity"; Sensors.RelativeHumidityTwoPort relHumOut_dis(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Outlet relative humidity"; Buildings.Fluid.HeatExchangers.WetCoilEffectivenessNTU hexWetNTU_TX( redeclare package Medium1 = Medium_W, redeclare package Medium2 = Medium_A, use_Q_flow_nominal=true, Q_flow_nominal=Q_flow_nominal, T_a2_nominal=T_a2_nominal, w_a2_nominal=X_w_a2_nominal/(1 - X_w_a2_nominal), T_a1_nominal=T_a1_nominal, m1_flow_nominal=m1_flow_nominal, m2_flow_nominal=m2_flow_nominal, dp2_nominal=0, dp1_nominal=0, configuration=hexCon, show_T=true) "Effectiveness-NTU coil model (parameterized with nominal T and X)"; Sources.MassFlowSource_T souAir1( redeclare package Medium = Medium_A, m_flow=m2_flow_nominal, T=T_a2_nominal, use_Xi_in=true, nPorts=1) "Air source"; Sources.MassFlowSource_T souWat2( redeclare package Medium = Medium_W, m_flow=m1_flow_nominal, T=T_a1_nominal, nPorts=1) "Source for water"; Modelica.Blocks.Sources.CombiTimeTable w_a2(table=[0,0.0035383; 1,0.01765], timeScale=1000) "Absolute humidity of entering air"; equation connect(pAir.y, wetBulIn.p); connect(pAir1.y, wetBulOut.p); connect(senMasFraOut.port_b, sinAir.ports[1]); connect(TDryBulOut.T, wetBulOut.TDryBul); connect(senMasFraOut.X, wetBulOut.Xi[1]); connect(souAir.ports[1], senMasFraIn.port_a); connect(senMasFraIn.port_b, TDryBulIn.port_a); connect(senMasFraIn.X, wetBulIn.Xi[1]); connect(TDryBulIn.T, wetBulIn.TDryBul); connect(TDryBulIn.port_b, relHumIn.port_a); connect(souWat1.ports[1], hexWetNTU.port_a1); connect(hexWetNTU.port_b1, sinWat.ports[1]); connect(souWat.ports[1], hexDis.port_a1); connect(hexDis.port_b1, sinWat.ports[2]); connect(souAir2.ports[1], hexDis.port_a2); connect(hexWetNTU.port_b2, TDryBulOut.port_a); connect(hexWetNTU.port_a2, relHumIn.port_b); connect(hexDis.port_b2, TDryBulOut1.port_a); connect(senMasFraOut1.port_b, sinAir.ports[2]); connect(TDryBulOut.port_b, relHumOut_eps.port_a); connect(relHumOut_eps.port_b, senMasFraOut.port_a); connect(TDryBulOut1.port_b, relHumOut_dis.port_a); connect(relHumOut_dis.port_b, senMasFraOut1.port_a); connect(hexWetNTU_TX.port_b1, sinWat.ports[3]); connect(souAir1.ports[1], hexWetNTU_TX.port_a2); connect(sinAir.ports[3], hexWetNTU_TX.port_b2); connect(souWat2.ports[1], hexWetNTU_TX.port_a1); connect(w_a2.y[1], conversion.XiDry); connect(conversion.XiTotalAir, souAir.Xi_in[1]); connect(conversion.XiTotalAir, souAir1.Xi_in[1]); connect(conversion.XiTotalAir, souAir2.Xi_in[1]); end WetCoilEffectivenessNTUCounterFlow;

Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTUHeating Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTUHeating

Model that validates the wet coil effectiveness-NTU model in heating conditions

Buildings.Fluid.HeatExchangers.Validation.WetCoilEffectivenessNTUHeating

Information

This model simulates various coil models in heating conditions, with

To provide an accurate reference, the instance of Buildings.Fluid.HeatExchangers.DryCoilCounterFlow is configured with 30 elements. Under steady-state modeling assumptions, this creates a large system of non-linear equations. To alleviate this effect, dynamics are considered but the simulation time is increased to 1000 s to reproduce quasi steady-state conditions.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
TemperatureT_a1_nominal50 + 273.15Inlet water temperature [K]
TemperatureT_b1_nominal45 + 273.15Outlet water temperature [K]
TemperatureT_a2_nominal273.15Inlet air temperature [K]
ThermalConductanceUA_nominalBuildings.Fluid.HeatExchange...Total thermal conductance at nominal flow [W/K]
MassFlowRatem1_flow_nominal3.78Nominal mass flow rate of water [kg/s]
MassFlowRatem2_flow_nominal2.646Nominal mass flow rate of air [kg/s]
HeatExchangerConfigurationhexConTypes.HeatExchangerConfigura...Heat exchanger configuration

Modelica definition

model WetCoilEffectivenessNTUHeating "Model that validates the wet coil effectiveness-NTU model in heating conditions" extends Modelica.Icons.Example; package Medium_W = Buildings.Media.Water; package Medium_A = Buildings.Media.Air; constant Modelica.Units.SI.AbsolutePressure pAtm=101325 "Atmospheric pressure"; parameter Modelica.Units.SI.Temperature T_a1_nominal=50 + 273.15 "Inlet water temperature"; parameter Modelica.Units.SI.Temperature T_b1_nominal=45 + 273.15 "Outlet water temperature"; parameter Modelica.Units.SI.Temperature T_a2_nominal=273.15 "Inlet air temperature"; final parameter Modelica.Units.SI.Temperature T_b2_nominal=T_a2_nominal + Q_flow_nominal/m2_flow_nominal/1010 "Outlet air temperature"; final parameter Modelica.Units.SI.ThermalConductance CMin_flow_nominal=min( m1_flow_nominal*4186, m2_flow_nominal*1010) "Minimal capacity flow rate at nominal condition"; final parameter Modelica.Units.SI.ThermalConductance CMax_flow_nominal=max( m1_flow_nominal*4186, m2_flow_nominal*1010) "Minimal capacity flow rate at nominal condition"; final parameter Modelica.Units.SI.HeatFlowRate Q_flow_nominal=m1_flow_nominal *4186*(T_a1_nominal - T_b1_nominal); final parameter Real eps_nominal= abs(Q_flow_nominal/((T_a1_nominal - T_a2_nominal) * CMin_flow_nominal)) "Nominal effectiveness"; parameter Modelica.Units.SI.ThermalConductance UA_nominal= Buildings.Fluid.HeatExchangers.BaseClasses.ntu_epsilonZ( eps=eps_nominal, Z=CMin_flow_nominal/CMax_flow_nominal, flowRegime=Integer(hexCon))*CMin_flow_nominal "Total thermal conductance at nominal flow"; parameter Modelica.Units.SI.MassFlowRate m1_flow_nominal=3.78 "Nominal mass flow rate of water"; parameter Modelica.Units.SI.MassFlowRate m2_flow_nominal=2.646 "Nominal mass flow rate of air"; parameter Types.HeatExchangerConfiguration hexCon= Types.HeatExchangerConfiguration.CounterFlow "Heat exchanger configuration"; Buildings.Fluid.Sources.Boundary_pT sinAir( redeclare package Medium = Medium_A, use_p_in=false, nPorts=3) "Air sink"; Sources.MassFlowSource_T souAir( redeclare package Medium = Medium_A, m_flow=m2_flow_nominal, use_T_in=true, T=T_a2_nominal, nPorts=1) "Air source"; Buildings.Fluid.Sources.Boundary_pT sinWat( redeclare package Medium = Medium_W, nPorts=3) "Sink for water"; Sensors.RelativeHumidityTwoPort relHumIn(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Inlet relative humidity"; Sensors.TemperatureTwoPort TDryBulIn(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Inlet dry bulb temperature"; Sensors.MassFractionTwoPort senMasFraIn(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Water mass fraction of entering air"; Sensors.MassFractionTwoPort senMasFraOut(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Water mass fraction of leaving air"; Sensors.TemperatureTwoPort TDryBulOut(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Dry bulb temperature of leaving air"; Sources.MassFlowSource_T souWat1( redeclare package Medium = Medium_W, m_flow=m1_flow_nominal, T=T_a1_nominal, nPorts=1) "Source for water"; DryCoilCounterFlow hexDis( redeclare package Medium1 = Medium_W, redeclare package Medium2 = Medium_A, m1_flow_nominal=m1_flow_nominal, m2_flow_nominal=m2_flow_nominal, dp2_nominal=0, allowFlowReversal1=false, allowFlowReversal2=false, dp1_nominal=0, UA_nominal=UA_nominal, show_T=true, nEle=30, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, tau1=0.1, tau2=0.1, tau_m=0.1) "Discretized coil model"; Sources.MassFlowSource_T souWat( redeclare package Medium = Medium_W, m_flow=m1_flow_nominal, T=T_a1_nominal, nPorts=1) "Source for water"; Sources.MassFlowSource_T souAir2( redeclare package Medium = Medium_A, m_flow=m2_flow_nominal, use_T_in=true, T=T_a2_nominal, nPorts=1) "Air source"; Sensors.MassFractionTwoPort senMasFraOut1(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Water mass fraction of leaving air"; Sensors.TemperatureTwoPort TDryBulOut1(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Dry bulb temperature of leaving air"; Sensors.RelativeHumidityTwoPort relHumOut_eps(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Outlet relative humidity"; Sensors.RelativeHumidityTwoPort relHumOut_dis(redeclare package Medium = Medium_A, m_flow_nominal=m2_flow_nominal) "Outlet relative humidity"; Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU hexDryNTU_T( redeclare package Medium1 = Medium_W, redeclare package Medium2 = Medium_A, Q_flow_nominal=Q_flow_nominal, T_a2_nominal=T_a2_nominal, T_a1_nominal=T_a1_nominal, m1_flow_nominal=m1_flow_nominal, m2_flow_nominal=m2_flow_nominal, dp2_nominal=0, dp1_nominal=0, configuration=hexCon, show_T=true) "Effectiveness-NTU coil model (parameterized with nominal T and X)"; Sources.MassFlowSource_T souAir1( redeclare package Medium = Medium_A, m_flow=m2_flow_nominal, use_T_in=true, T=T_a2_nominal, nPorts=1) "Air source"; Sources.MassFlowSource_T souWat2( redeclare package Medium = Medium_W, m_flow=m1_flow_nominal, T=T_a1_nominal, nPorts=1) "Source for water"; Controls.OBC.CDL.Reals.Sources.Ramp T_a2( height=15, duration=1000, offset=273.15) "Air inlet temperature"; Buildings.Fluid.HeatExchangers.WetCoilEffectivenessNTU hexWetNTU_TX( redeclare package Medium1 = Medium_W, redeclare package Medium2 = Medium_A, use_Q_flow_nominal=true, Q_flow_nominal=Q_flow_nominal, T_a2_nominal=T_a2_nominal, w_a2_nominal=0.001, T_a1_nominal=T_a1_nominal, m1_flow_nominal=m1_flow_nominal, m2_flow_nominal=m2_flow_nominal, dp2_nominal=0, dp1_nominal=0, configuration=hexCon, show_T=true) "Effectiveness-NTU coil model (parameterized with nominal T and X)"; equation connect(senMasFraOut.port_b, sinAir.ports[1]); connect(souAir.ports[1], senMasFraIn.port_a); connect(senMasFraIn.port_b, TDryBulIn.port_a); connect(TDryBulIn.port_b, relHumIn.port_a); connect(souWat.ports[1], hexDis.port_a1); connect(hexDis.port_b1, sinWat.ports[1]); connect(souAir2.ports[1], hexDis.port_a2); connect(hexDis.port_b2, TDryBulOut1.port_a); connect(senMasFraOut1.port_b, sinAir.ports[2]); connect(TDryBulOut.port_b, relHumOut_eps.port_a); connect(relHumOut_eps.port_b, senMasFraOut.port_a); connect(TDryBulOut1.port_b, relHumOut_dis.port_a); connect(relHumOut_dis.port_b, senMasFraOut1.port_a); connect(hexDryNTU_T.port_b1, sinWat.ports[2]); connect(souAir1.ports[1], hexDryNTU_T.port_a2); connect(sinAir.ports[3], hexDryNTU_T.port_b2); connect(souWat2.ports[1], hexDryNTU_T.port_a1); connect(T_a2.y, souAir2.T_in); connect(T_a2.y, souAir.T_in); connect(T_a2.y, souAir1.T_in); connect(souWat1.ports[1], hexWetNTU_TX.port_a1); connect(hexWetNTU_TX.port_b1, sinWat.ports[3]); connect(relHumIn.port_b, hexWetNTU_TX.port_a2); connect(hexWetNTU_TX.port_b2, TDryBulOut.port_a); end WetCoilEffectivenessNTUHeating;