Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses

Package with base classes for Buildings.Fluid.HeatExchangers.CoolingTowers

Information

This package contains base classes that are used to construct the models in Buildings.Fluid.HeatExchangers.CoolingTowers.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.CoolingTower CoolingTower Base class for cooling towers
Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.CoolingTowerVariableSpeed CoolingTowerVariableSpeed Base class for cooling towers with variable speed fan
Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Merkel Merkel Model for thermal performance of Merkel cooling tower
Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Characteristics Characteristics Functions for fan characteristics
Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Functions Functions  

Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.CoolingTower Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.CoolingTower

Base class for cooling towers

Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.CoolingTower

Information

Base class for a steady-state cooling tower. The variable TAirHT is used to compute the heat transfer with the water side of the cooling tower. For a dry cooling tower, this is equal to the dry-bulb temperature. For a wet cooling tower, this is equal to the wet-bulb temperature.

Extends from Buildings.Fluid.Interfaces.TwoPortHeatMassExchanger (Partial model transporting one fluid stream with storing mass or energy).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
PressureDifferencedp_nominal Pressure difference [Pa]
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal
Advanced
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Flow resistance
Booleanfrom_dpfalse= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistancefalse= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM0.1Fraction of nominal flow rate where flow transitions to laminar
Dynamics
Nominal condition
Timetau30Time constant at nominal flow (if energyDynamics <> SteadyState) [s]
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
DynamicsmassDynamicsenergyDynamicsType of mass balance: dynamic (3 initialization options) or steady state
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
TemperatureT_startMedium.T_defaultStart value of temperature [K]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
output RealOutputTLvgLeaving water temperature [K]

Modelica definition

partial model CoolingTower "Base class for cooling towers" extends Buildings.Fluid.Interfaces.TwoPortHeatMassExchanger( redeclare final Buildings.Fluid.MixingVolumes.MixingVolume vol); Modelica.Blocks.Interfaces.RealOutput TLvg( final unit="K", displayUnit="degC") "Leaving water temperature"; Modelica.SIunits.HeatFlowRate Q_flow = preHea.Q_flow "Heat input into water circuit"; protected Modelica.Thermal.HeatTransfer.Sources.PrescribedHeatFlow preHea "Prescribed heat flow"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor TVol "Water temperature in volume, leaving at port_b"; equation connect(preHea.port, vol.heatPort); connect(TVol.port, vol.heatPort); connect(TVol.T, TLvg); end CoolingTower;

Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.CoolingTowerVariableSpeed Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.CoolingTowerVariableSpeed

Base class for cooling towers with variable speed fan

Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.CoolingTowerVariableSpeed

Information

Base model for a steady-state or dynamic cooling tower with a variable speed fan. This base model is used for both the Merkel and York calculation.

Extends from Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.CoolingTower (Base class for cooling towers).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
PressureDifferencedp_nominal Pressure difference [Pa]
Heat transfer
TemperatureTAirInWB_nominal273.15 + 25.55Nominal outdoor (air inlet) wetbulb temperature [K]
TemperatureTWatIn_nominal Nominal water inlet temperature [K]
TemperatureTWatOut_nominal Nominal water outlet temperature [K]
RealfraFreCon0.125Fraction of tower capacity in free convection regime [1]
Fan
RealfraPFan_nominal275/0.15Fan power divided by water mass flow rate at design condition [W/(kg/s)]
PowerPFan_nominalfraPFan_nominal*m_flow_nominalFan power [W]
RealyMin0.3Minimum control signal until fan is switched off (used for smoothing between forced and free convection regime) [1]
fanfanRelPowfanRelPow(r_V={0,0.1,0.3,0.6...Fan relative power consumption as a function of control signal, fanRelPow=P(y)/P(y=1)
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal
Advanced
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Flow resistance
Booleanfrom_dpfalse= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistancefalse= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM0.1Fraction of nominal flow rate where flow transitions to laminar
Dynamics
Nominal condition
Timetau30Time constant at nominal flow (if energyDynamics <> SteadyState) [s]
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
DynamicsmassDynamicsenergyDynamicsType of mass balance: dynamic (3 initialization options) or steady state
Initialization
AbsolutePressurep_startMedium.p_defaultStart value of pressure [Pa]
TemperatureT_startMedium.T_defaultStart value of temperature [K]
MassFractionX_start[Medium.nX]Medium.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC_start[Medium.nC]fill(0, Medium.nC)Start value of trace substances

Connectors

TypeNameDescription
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
output RealOutputTLvgLeaving water temperature [K]
input RealInputTAirEntering air wet bulb temperature [K]
input RealInputyFan control signal [1]
output RealOutputPFanElectric power consumed by fan [W]

Modelica definition

model CoolingTowerVariableSpeed "Base class for cooling towers with variable speed fan" extends Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.CoolingTower; import cha = Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Characteristics; parameter Modelica.SIunits.Temperature TAirInWB_nominal = 273.15 + 25.55 "Nominal outdoor (air inlet) wetbulb temperature"; parameter Modelica.SIunits.Temperature TWatIn_nominal "Nominal water inlet temperature"; parameter Modelica.SIunits.Temperature TWatOut_nominal "Nominal water outlet temperature"; parameter Real fraFreCon(min=0, max=1, final unit="1") = 0.125 "Fraction of tower capacity in free convection regime"; parameter Real fraPFan_nominal(unit="W/(kg/s)") = 275/0.15 "Fan power divided by water mass flow rate at design condition"; parameter Modelica.SIunits.Power PFan_nominal = fraPFan_nominal*m_flow_nominal "Fan power"; parameter Real yMin(min=0.01, max=1, final unit="1") = 0.3 "Minimum control signal until fan is switched off (used for smoothing between forced and free convection regime)"; replaceable parameter cha.fan fanRelPow( r_V = {0, 0.1, 0.3, 0.6, 1}, r_P = {0, 0.1^3, 0.3^3, 0.6^3, 1}) constrainedby cha.fan "Fan relative power consumption as a function of control signal, fanRelPow=P(y)/P(y=1)"; Modelica.Blocks.Interfaces.RealInput TAir( final min=0, final unit="K", displayUnit="degC") "Entering air wet bulb temperature"; Modelica.Blocks.Interfaces.RealInput y(unit="1") "Fan control signal"; Modelica.Blocks.Interfaces.RealOutput PFan( final quantity="Power", final unit="W")= Buildings.Utilities.Math.Functions.spliceFunction( pos=cha.normalizedPower(per=fanRelPow, r_V=y, d=fanRelPowDer) * PFan_nominal, neg=0, x=y-yMin+yMin/20, deltax=yMin/20) "Electric power consumed by fan"; protected parameter Real fanRelPowDer[size(fanRelPow.r_V,1)] "Coefficients for fan relative power consumption as a function of control signal"; initial equation // Check validity of relative fan power consumption at y=yMin and y=1 assert(cha.normalizedPower(per=fanRelPow, r_V=yMin, d=fanRelPowDer) > -1E-4, "The fan relative power consumption must be non-negative for y=0." + "\n Obtained fanRelPow(0) = " + String(cha.normalizedPower(per=fanRelPow, r_V=yMin, d=fanRelPowDer)) + "\n You need to choose different values for the parameter fanRelPow."); assert(abs(1-cha.normalizedPower(per=fanRelPow, r_V=1, d=fanRelPowDer))<1E-4, "The fan relative power consumption must be one for y=1." + "\n Obtained fanRelPow(1) = " + String(cha.normalizedPower(per=fanRelPow, r_V=1, d=fanRelPowDer)) + "\n You need to choose different values for the parameter fanRelPow." + "\n To increase the fan power, change fraPFan_nominal or PFan_nominal."); end CoolingTowerVariableSpeed;

Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Merkel Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Merkel

Model for thermal performance of Merkel cooling tower

Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Merkel

Information

Model for the thermal peformance of the Merkel cooling tower.

For the documentation, see Buildings.Fluid.HeatExchangers.CoolingTowers.Merkel.

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Medium in the component
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate of water [kg/s]
RealratWatAir_nominal Water-to-air mass flow rate ratio at design condition [1]
Heat transfer
TemperatureTAirInWB_nominal Nominal outdoor (air inlet) wetbulb temperature [K]
TemperatureTWatIn_nominal Nominal water inlet temperature [K]
TemperatureTWatOut_nominal Nominal water outlet temperature [K]
RealfraFreCon Fraction of tower capacity in free convection regime [1]
UAMerkelUACorredeclare parameter Building...Coefficients for UA correction
Fan
RealyMin Minimum control signal until fan is switched off (used for smoothing between forced and free convection regime) [1]

Connectors

TypeNameDescription
replaceable package MediumMedium in the component
input RealInputyFan control signal [1]
input RealInputm_flowWater mass flow rate [kg/s]
input RealInputTWatInInlet water temperature [K]
input RealInputTAirEntering air wet bulb temperature [K]
output RealOutputQ_flowHeat removed from water

Modelica definition

block Merkel "Model for thermal performance of Merkel cooling tower" extends Modelica.Blocks.Icons.Block; replaceable package Medium = Modelica.Media.Interfaces.PartialMedium "Medium in the component"; parameter Modelica.SIunits.MassFlowRate m_flow_nominal "Nominal mass flow rate of water"; final parameter Modelica.SIunits.MassFlowRate mAir_flow_nominal= m_flow_nominal/ratWatAir_nominal "Nominal mass flow rate of air"; parameter Real ratWatAir_nominal(min=0, unit="1") "Water-to-air mass flow rate ratio at design condition"; parameter Modelica.SIunits.Temperature TAirInWB_nominal "Nominal outdoor (air inlet) wetbulb temperature"; parameter Modelica.SIunits.Temperature TWatIn_nominal "Nominal water inlet temperature"; parameter Modelica.SIunits.Temperature TWatOut_nominal "Nominal water outlet temperature"; parameter Real fraFreCon(min=0, max=1, final unit="1") "Fraction of tower capacity in free convection regime"; replaceable parameter Buildings.Fluid.HeatExchangers.CoolingTowers.Data.UAMerkel UACor constrainedby Buildings.Fluid.HeatExchangers.CoolingTowers.Data.UAMerkel "Coefficients for UA correction"; parameter Real yMin(min=0.01, max=1, final unit="1") "Minimum control signal until fan is switched off (used for smoothing between forced and free convection regime)"; final parameter Modelica.SIunits.HeatFlowRate Q_flow_nominal(max=0)= -m_flow_nominal*cpWat_nominal*(TWatIn_nominal-TWatOut_nominal) "Nominal heat transfer, (negative)"; final parameter Modelica.SIunits.ThermalConductance UA_nominal= NTU_nominal*CMin_flow_nominal "Thermal conductance at nominal flow, used to compute heat capacity"; final parameter Real eps_nominal= Q_flow_nominal/((TAirInWB_nominal - TWatIn_nominal) * CMin_flow_nominal) "Nominal heat transfer effectiveness"; final parameter Real NTU_nominal(min=0)= Buildings.Fluid.HeatExchangers.BaseClasses.ntu_epsilonZ( eps=min(1, max(0, eps_nominal)), Z=Z_nominal, flowRegime=Integer(Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow)) "Nominal number of transfer units"; Modelica.Blocks.Interfaces.RealInput y(unit="1") "Fan control signal"; Modelica.Blocks.Interfaces.RealInput m_flow(final unit="kg/s") "Water mass flow rate"; Modelica.Blocks.Interfaces.RealInput TWatIn( final min=0, final unit="K", displayUnit="degC") "Inlet water temperature"; Modelica.Blocks.Interfaces.RealInput TAir( final min=0, final unit="K", displayUnit="degC") "Entering air wet bulb temperature"; Modelica.SIunits.Temperature TAirOut( displayUnit="degC") "Outlet air temperature"; Modelica.SIunits.MassFlowRate mAir_flow "Air mass flow rate"; Modelica.SIunits.MassFraction FRWat "Ratio actual over design water mass flow ratio"; Modelica.SIunits.MassFraction FRAir "Ratio actual over design air mass flow ratio"; Real eps(min=0, max=1, unit="1") "Heat exchanger effectiveness"; Modelica.SIunits.SpecificHeatCapacity cpWat "Heat capacity of water"; Modelica.SIunits.ThermalConductance CAir_flow "Heat capacity flow rate of air"; Modelica.SIunits.ThermalConductance CWat_flow "Heat capacity flow rate of water"; Modelica.SIunits.ThermalConductance CMin_flow(min=0) "Minimum heat capacity flow rate"; Modelica.SIunits.HeatFlowRate QMax_flow "Maximum heat flow rate into air"; Modelica.SIunits.ThermalConductance UAe(min=0) "Thermal conductance for equivalent fluid"; Modelica.SIunits.ThermalConductance UA "Thermal conductance"; Modelica.Blocks.Interfaces.RealOutput Q_flow "Heat removed from water"; protected final package Air = Buildings.Media.Air "Package of medium air"; final parameter Air.ThermodynamicState staAir_default=Air.setState_pTX( T=TAirInWB_nominal, p=Air.p_default, X=Air.X_default[1:Air.nXi]) "Default state for air"; final parameter Medium.ThermodynamicState staWat_default=Medium.setState_pTX( T=TWatIn_nominal, p=Medium.p_default, X=Medium.X_default[1:Medium.nXi]) "Default state for water"; parameter Real delta=1E-3 "Parameter used for smoothing"; parameter Modelica.SIunits.SpecificHeatCapacity cpe_nominal= Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Functions.equivalentHeatCapacity( TIn = TAirInWB_nominal, TOut = TAirOutWB_nominal) "Specific heat capacity of the equivalent medium on medium 1 side"; parameter Modelica.SIunits.SpecificHeatCapacity cpAir_nominal= Air.specificHeatCapacityCp(staAir_default) "Specific heat capacity of air at nominal condition"; parameter Modelica.SIunits.SpecificHeatCapacity cpWat_nominal= Medium.specificHeatCapacityCp(staWat_default) "Specific heat capacity of water at nominal condition"; parameter Modelica.SIunits.ThermalConductance CAir_flow_nominal= mAir_flow_nominal*cpe_nominal "Nominal capacity flow rate of air"; parameter Modelica.SIunits.ThermalConductance CWat_flow_nominal= m_flow_nominal*cpWat_nominal "Nominal capacity flow rate of water"; parameter Modelica.SIunits.ThermalConductance CMin_flow_nominal= min(CAir_flow_nominal, CWat_flow_nominal) "Minimal capacity flow rate at nominal condition"; parameter Modelica.SIunits.ThermalConductance CMax_flow_nominal= max(CAir_flow_nominal, CWat_flow_nominal) "Maximum capacity flow rate at nominal condition"; parameter Real Z_nominal( min=0, max=1) = CMin_flow_nominal/CMax_flow_nominal "Ratio of capacity flow rate at nominal condition"; parameter Modelica.SIunits.Temperature TAirOutWB_nominal(fixed=false) "Nominal leaving air wetbulb temperature"; Real UA_FAir "UA correction factor as function of air flow ratio"; Real UA_FWat "UA correction factor as function of water flow ratio"; Real UA_DifWB "UA correction factor as function of differential wetbulb temperature"; Real corFac_FAir "Smooth factor as function of air flow ratio"; Real corFac_FWat "Smooth factor as function of water flow ratio"; Modelica.SIunits.SpecificHeatCapacity cpEqu "Specific heat capacity of the equivalent fluid"; initial equation // Heat transferred from air to water at nominal condition Q_flow_nominal = mAir_flow_nominal*cpe_nominal*(TAirInWB_nominal - TAirOutWB_nominal); assert(eps_nominal > 0 and eps_nominal < 1, "eps_nominal out of bounds, eps_nominal = " + String(eps_nominal) + "\n To achieve the required heat transfer rate at epsilon=0.8, set |TAirInWB_nominal-TWatIn_nominal| = " + String(abs(Q_flow_nominal/0.8*CMin_flow_nominal)) + "\n or increase flow rates. The current parameters result in " + "\n CMin_flow_nominal = " + String(CMin_flow_nominal) + "\n CMax_flow_nominal = " + String(CMax_flow_nominal)); equation // For cp water, we use the inlet temperatures because the effect is small // for actual water temperature differences, and in case of Buildings.Media.Water, // cp is constant. cpWat = Medium.specificHeatCapacityCp(Medium.setState_pTX( p=Medium.p_default, T=TWatIn, X=Medium.X_default)); // Determine the airflow based on fan speed signal mAir_flow = Buildings.Utilities.Math.Functions.spliceFunction( pos=y*mAir_flow_nominal, neg=fraFreCon*mAir_flow_nominal, x=y - yMin + yMin/20, deltax=yMin/20); FRAir = mAir_flow/mAir_flow_nominal; FRWat = m_flow/m_flow_nominal; // UA for equivalent fluid // Adjust UA UA_FAir =Buildings.Fluid.Utilities.extendedPolynomial( x=FRAir, c=UACor.cAirFra, xMin=UACor.FRAirMin, xMax=UACor.FRAirMax) "UA correction factor as function of air flow fraction"; UA_FWat =Buildings.Fluid.Utilities.extendedPolynomial( x=FRWat, c=UACor.cWatFra, xMin=UACor.FRWatMin, xMax=UACor.FRWatMax) "UA correction factor as function of water flow fraction"; UA_DifWB =Buildings.Fluid.Utilities.extendedPolynomial( x=TAirInWB_nominal - TAir, c=UACor.cDifWB, xMin=UACor.TDiffWBMin, xMax=UACor.TDiffWBMax) "UA correction factor as function of differential wet bulb temperature"; corFac_FAir =Buildings.Utilities.Math.Functions.smoothHeaviside( x=FRAir - UACor.FRAirMin/4, delta=UACor.FRAirMin/4); corFac_FWat =Buildings.Utilities.Math.Functions.smoothHeaviside( x=FRWat - UACor.FRWatMin/4, delta=UACor.FRWatMin/4); UA = UA_nominal*UA_FAir*UA_FWat*UA_DifWB*corFac_FAir*corFac_FWat; UAe = UA*cpEqu/Buildings.Utilities.Psychrometrics.Constants.cpAir; // Capacity for air and water CAir_flow =abs(mAir_flow)*cpEqu; CWat_flow =abs(m_flow)*cpWat; CMin_flow =Buildings.Utilities.Math.Functions.smoothMin( CAir_flow, CWat_flow, delta*CMin_flow_nominal); // Calculate epsilon eps = Buildings.Fluid.HeatExchangers.BaseClasses.epsilon_C( UA=UAe, C1_flow=CAir_flow, C2_flow=CWat_flow, flowRegime=Integer(Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow), CMin_flow_nominal=CMin_flow_nominal, CMax_flow_nominal=CMax_flow_nominal, delta=delta); // QMax_flow is maximum heat transfer into medium air: positive means heating QMax_flow = CMin_flow*(TWatIn - TAir); eps*QMax_flow =CAir_flow*(TAirOut - TAir); cpEqu = Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Functions.equivalentHeatCapacity( TIn=TAir, TOut=TAirOut); Q_flow = -eps * QMax_flow; end Merkel;