Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Functions

Information

This package contains functions for calculations used in the cooling tower models.

Package Content

Name Description
Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Functions.equivalentHeatCapacity equivalentHeatCapacity Computes equivalent specific heat of moist air
Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Functions.Validation Validation Collection of models that validate the cooling tower base functions

Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Functions.equivalentHeatCapacity Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.Functions.equivalentHeatCapacity

Computes equivalent specific heat of moist air

Information

This function computes the equivalent specific heat of moist air as the ratio of change in enthalpy relative to the change in temperature of the air entering and leaving the tower.

Extends from Modelica.Icons.Function (Icon for functions).

Inputs

TypeNameDefaultDescription
TemperatureTIn Inlet temperature [K]
TemperatureTOut Outlet temperature [K]

Outputs

TypeNameDescription
SpecificHeatCapacityequivalentHeatCapacityEquivalent specific heat capacity [J/(kg.K)]

Modelica definition

function equivalentHeatCapacity "Computes equivalent specific heat of moist air" extends Modelica.Icons.Function; input Modelica.Units.SI.Temperature TIn "Inlet temperature"; input Modelica.Units.SI.Temperature TOut "Outlet temperature"; output Modelica.Units.SI.SpecificHeatCapacity equivalentHeatCapacity "Equivalent specific heat capacity"; protected constant Modelica.Units.SI.TemperatureDifference deltaT=0.01 "Small temperature difference, used for regularization"; Modelica.Units.SI.Temperature TOutEps "Outlet temperature, bounded away from TIn"; Modelica.Units.SI.MassFraction XIn_w "Water vapor mass fraction per unit mass total air"; Modelica.Units.SI.MassFraction XOut_w "Water vapor mass fraction per unit mass total air"; Modelica.Units.SI.SpecificEnthalpy hIn "Inlet specific enthalpy"; Modelica.Units.SI.SpecificEnthalpy hOut "Outlet specific enthalpy"; algorithm TOutEps :=Buildings.Utilities.Math.Functions.smoothMax( x1=TOut, x2=TIn + deltaT, deltaX=deltaT/2); XIn_w := Buildings.Utilities.Psychrometrics.Functions.X_pTphi( p = 101325, T = TIn, phi=1); XOut_w := Buildings.Utilities.Psychrometrics.Functions.X_pTphi( p = 101325, T = TOutEps, phi=1); hIn := Buildings.Media.Air.specificEnthalpy_pTX( p=101325, T=TIn, X={XIn_w, 1-XIn_w}); hOut := Buildings.Media.Air.specificEnthalpy_pTX( p=101325, T=TOutEps, X={XOut_w, 1-XOut_w}); equivalentHeatCapacity := (hIn-hOut)/(TIn-TOutEps); end equivalentHeatCapacity;