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 |
CoolingTower
|
Base class for cooling towers |
CoolingTowerVariableSpeed
|
Base class for cooling towers with variable speed fan |
Merkel
|
Model for thermal performance of Merkel cooling tower |
Characteristics
|
Functions for fan characteristics |
Functions
|
|
Base class for cooling towers
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
Type | Name | Default | Description |
replaceable package Medium | PartialMedium | Medium in the component |
Nominal condition |
MassFlowRate | m_flow_nominal | | Nominal mass flow rate [kg/s] |
PressureDifference | dp_nominal | | Pressure difference [Pa] |
Assumptions |
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Advanced |
MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics |
Boolean | show_T | false | = true, if actual temperature at port is computed |
Flow resistance |
Boolean | from_dp | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
Boolean | linearizeFlowResistance | false | = true, use linear relation between m_flow and dp for any flow rate |
Real | deltaM | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
Dynamics |
Nominal condition |
Time | tau | 30 | Time constant at nominal flow (if energyDynamics <> SteadyState) [s] |
Conservation equations |
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Initialization |
AbsolutePressure | p_start | Medium.p_default | Start value of pressure [Pa] |
Temperature | T_start | Medium.T_default | Start value of temperature [K] |
MassFraction | X_start[Medium.nX] | Medium.X_default | Start value of mass fractions m_i/m [kg/kg] |
ExtraProperty | C_start[Medium.nC] | fill(0, Medium.nC) | Start value of trace substances |
Connectors
Type | Name | Description |
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
output RealOutput | TLvg | Leaving water temperature [K] |
Modelica definition
Base class for cooling towers with variable speed fan
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
Type | Name | Default | Description |
replaceable package Medium | PartialMedium | Medium in the component |
Nominal condition |
MassFlowRate | m_flow_nominal | | Nominal mass flow rate [kg/s] |
PressureDifference | dp_nominal | | Pressure difference [Pa] |
Heat transfer |
Temperature | TAirInWB_nominal | 273.15 + 25.55 | Nominal outdoor (air inlet) wetbulb temperature [K] |
Temperature | TWatIn_nominal | | Nominal water inlet temperature [K] |
Temperature | TWatOut_nominal | | Nominal water outlet temperature [K] |
Real | fraFreCon | 0.125 | Fraction of tower capacity in free convection regime [1] |
Fan |
Real | fraPFan_nominal | 275/0.15 | Fan power divided by water mass flow rate at design condition [W/(kg/s)] |
Power | PFan_nominal | fraPFan_nominal*m_flow_nominal | Fan power [W] |
Real | yMin | 0.3 | Minimum control signal until fan is switched off (used for smoothing
between forced and free convection regime) [1] |
fan | fanRelPow | fanRelPow(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 |
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Advanced |
MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics |
Boolean | show_T | false | = true, if actual temperature at port is computed |
Flow resistance |
Boolean | from_dp | false | = true, use m_flow = f(dp) else dp = f(m_flow) |
Boolean | linearizeFlowResistance | false | = true, use linear relation between m_flow and dp for any flow rate |
Real | deltaM | 0.1 | Fraction of nominal flow rate where flow transitions to laminar |
Dynamics |
Nominal condition |
Time | tau | 30 | Time constant at nominal flow (if energyDynamics <> SteadyState) [s] |
Conservation equations |
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Initialization |
AbsolutePressure | p_start | Medium.p_default | Start value of pressure [Pa] |
Temperature | T_start | Medium.T_default | Start value of temperature [K] |
MassFraction | X_start[Medium.nX] | Medium.X_default | Start value of mass fractions m_i/m [kg/kg] |
ExtraProperty | C_start[Medium.nC] | fill(0, Medium.nC) | Start value of trace substances |
Connectors
Type | Name | Description |
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
output RealOutput | TLvg | Leaving water temperature [K] |
input RealInput | TAir | Entering air wet bulb temperature [K] |
input RealInput | y | Fan control signal [1] |
output RealOutput | PFan | Electric power consumed by fan [W] |
Modelica definition
model CoolingTowerVariableSpeed
extends Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.CoolingTower;
import cha =
Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Characteristics;
parameter Modelica.Units.SI.Temperature TAirInWB_nominal=273.15 + 25.55
;
parameter Modelica.Units.SI.Temperature TWatIn_nominal
;
parameter Modelica.Units.SI.Temperature TWatOut_nominal
;
parameter Real fraFreCon(min=0, max=1,
final unit="1") = 0.125
;
parameter Real fraPFan_nominal(unit="W/(kg/s)") = 275/0.15
;
parameter Modelica.Units.SI.Power PFan_nominal=fraPFan_nominal*m_flow_nominal
;
parameter Real yMin(min=0.01, max=1,
final unit="1") = 0.3
;
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
;
Modelica.Blocks.Interfaces.RealInput TAir(
final min=0,
final unit="K",
displayUnit="degC")
;
Modelica.Blocks.Interfaces.RealInput y(unit="1") ;
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)
;
protected
parameter Real fanRelPowDer[
size(fanRelPow.r_V,1)]
;
initial equation
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;
Model for thermal performance of Merkel cooling tower
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
Type | Name | Default | Description |
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium in the component |
Nominal condition |
MassFlowRate | m_flow_nominal | | Nominal mass flow rate of water [kg/s] |
Real | ratWatAir_nominal | | Water-to-air mass flow rate ratio at design condition [1] |
Heat transfer |
Temperature | TAirInWB_nominal | | Nominal outdoor (air inlet) wetbulb temperature [K] |
Temperature | TWatIn_nominal | | Nominal water inlet temperature [K] |
Temperature | TWatOut_nominal | | Nominal water outlet temperature [K] |
Real | fraFreCon | | Fraction of tower capacity in free convection regime [1] |
UAMerkel | UACor | redeclare parameter Building... | Coefficients for UA correction |
Fan |
Real | yMin | | Minimum control signal until fan is switched off (used for smoothing
between forced and free convection regime) [1] |
Connectors
Type | Name | Description |
replaceable package Medium | Medium in the component |
input RealInput | y | Fan control signal [1] |
input RealInput | m_flow | Water mass flow rate [kg/s] |
input RealInput | TWatIn | Inlet water temperature [K] |
input RealInput | TAir | Entering air wet bulb temperature [K] |
output RealOutput | Q_flow | Heat removed from water |
Modelica definition
block Merkel
extends Modelica.Blocks.Icons.Block;
replaceable package Medium =
Modelica.Media.Interfaces.PartialMedium ;
parameter Modelica.Units.SI.MassFlowRate m_flow_nominal
;
final parameter Modelica.Units.SI.MassFlowRate mAir_flow_nominal=
m_flow_nominal/ratWatAir_nominal ;
parameter Real ratWatAir_nominal(min=0, unit="1")
;
parameter Modelica.Units.SI.Temperature TAirInWB_nominal
;
parameter Modelica.Units.SI.Temperature TWatIn_nominal
;
parameter Modelica.Units.SI.Temperature TWatOut_nominal
;
parameter Real fraFreCon(min=0, max=1,
final unit="1")
;
replaceable parameter Buildings.Fluid.HeatExchangers.CoolingTowers.Data.UAMerkel
UACor
constrainedby Buildings.Fluid.HeatExchangers.CoolingTowers.Data.UAMerkel
;
parameter Real yMin(min=0.01, max=1,
final unit="1")
;
final parameter Modelica.Units.SI.HeatFlowRate Q_flow_nominal(max=0) = -
m_flow_nominal*cpWat_nominal*(TWatIn_nominal - TWatOut_nominal)
;
final parameter Modelica.Units.SI.ThermalConductance UA_nominal=NTU_nominal*
CMin_flow_nominal
;
final parameter Real eps_nominal=
Q_flow_nominal/((TAirInWB_nominal - TWatIn_nominal) * CMin_flow_nominal)
;
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))
;
Modelica.Blocks.Interfaces.RealInput y(unit="1") ;
Modelica.Blocks.Interfaces.RealInput m_flow(
final unit="kg/s")
;
Modelica.Blocks.Interfaces.RealInput TWatIn(
final min=0,
final unit="K",
displayUnit="degC")
;
Modelica.Blocks.Interfaces.RealInput TAir(
final min=0,
final unit="K",
displayUnit="degC")
;
Modelica.Units.SI.Temperature TAirOut(displayUnit="degC")
;
Modelica.Units.SI.MassFlowRate mAir_flow ;
Modelica.Units.SI.MassFraction FRWat
;
Modelica.Units.SI.MassFraction FRAir
;
Real eps(min=0, max=1, unit="1") ;
Modelica.Units.SI.SpecificHeatCapacity cpWat ;
Modelica.Units.SI.ThermalConductance CAir_flow
;
Modelica.Units.SI.ThermalConductance CWat_flow
;
Modelica.Units.SI.ThermalConductance CMin_flow(min=0)
;
Modelica.Units.SI.HeatFlowRate QMax_flow ;
Modelica.Units.SI.ThermalConductance UAe(min=0)
;
Modelica.Units.SI.ThermalConductance UA ;
Modelica.Blocks.Interfaces.RealOutput Q_flow ;
protected
final package Air =
Buildings.Media.Air ;
final parameter Air.ThermodynamicState staAir_default=
Air.setState_pTX(
T=TAirInWB_nominal,
p=Air.p_default,
X=Air.X_default[1:Air.nXi]) ;
final parameter Medium.ThermodynamicState
staWat_default=
Medium.setState_pTX(
T=TWatIn_nominal,
p=Medium.p_default,
X=Medium.X_default[1:Medium.nXi]) ;
parameter Real delta=1E-3 ;
parameter Modelica.Units.SI.SpecificHeatCapacity cpe_nominal=
Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Functions.equivalentHeatCapacity(
TIn=TAirInWB_nominal, TOut=TAirOutWB_nominal)
;
parameter Modelica.Units.SI.SpecificHeatCapacity cpAir_nominal=
Air.specificHeatCapacityCp(staAir_default)
;
parameter Modelica.Units.SI.SpecificHeatCapacity cpWat_nominal=
Medium.specificHeatCapacityCp(staWat_default)
;
parameter Modelica.Units.SI.ThermalConductance CAir_flow_nominal=
mAir_flow_nominal*cpe_nominal ;
parameter Modelica.Units.SI.ThermalConductance CWat_flow_nominal=
m_flow_nominal*cpWat_nominal ;
parameter Modelica.Units.SI.ThermalConductance CMin_flow_nominal=
min(
CAir_flow_nominal, CWat_flow_nominal)
;
parameter Modelica.Units.SI.ThermalConductance CMax_flow_nominal=
max(
CAir_flow_nominal, CWat_flow_nominal)
;
parameter Real Z_nominal(
min=0,
max=1) = CMin_flow_nominal/CMax_flow_nominal
;
parameter Modelica.Units.SI.Temperature TAirOutWB_nominal(fixed=false)
;
Real UA_FAir ;
Real UA_FWat ;
Real UA_DifWB
;
Real corFac_FAir ;
Real corFac_FWat ;
Modelica.Units.SI.SpecificHeatCapacity cpEqu
;
initial equation
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
cpWat =
Medium.specificHeatCapacityCp(
Medium.setState_pTX(
p=Medium.p_default,
T=TWatIn,
X=Medium.X_default));
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_FAir =
Buildings.Fluid.Utilities.extendedPolynomial(
x=FRAir,
c=UACor.cAirFra,
xMin=UACor.FRAirMin,
xMax=UACor.FRAirMax)
;
UA_FWat =
Buildings.Fluid.Utilities.extendedPolynomial(
x=FRWat,
c=UACor.cWatFra,
xMin=UACor.FRWatMin,
xMax=UACor.FRWatMax)
;
UA_DifWB =
Buildings.Fluid.Utilities.extendedPolynomial(
x=TAirInWB_nominal - TAir,
c=UACor.cDifWB,
xMin=UACor.TDiffWBMin,
xMax=UACor.TDiffWBMax)
;
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;
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);
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 = 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;