Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses

Package with base classes for DX cooling coil model

Information

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

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

Package Content

Name Description
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.ApparatusDewPoint ApparatusDewPoint Calculates air properties at apparatus dew point
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.ApparatusDryPoint ApparatusDryPoint Calculates air properties at dry coil surface
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Condensation Condensation Calculates rate of condensation
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.CoolingCapacityAirCooled CoolingCapacityAirCooled Calculates cooling capacity at given temperature and flow fraction for air-cooled coils
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.CoolingCapacityWaterCooled CoolingCapacityWaterCooled Calculates cooling capacity at given temperature and flow fraction for water-cooled DX coils
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DXCooling DXCooling DX cooling coil operation
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DryCoil DryCoil Calculates dry coil condition
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DryWetSelector DryWetSelector Selects results from dry or wet coil
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.EssentialParameters EssentialParameters A partial block for essential parameters
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Evaporation Evaporation Model that computes evaporation of water that accumulated on the coil surface
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.InputPower InputPower Electrical power consumed by the unit
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoilCondition PartialCoilCondition Partial block for dry and wet coil conditions
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoilInterface PartialCoilInterface Partial block for DX coil
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoolingCapacity PartialCoolingCapacity Calculates performance curve value at given temperature and mass flow rate
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialDXCoil PartialDXCoil Partial model for DX coil
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialSurfaceCondition PartialSurfaceCondition Partial block for apparatus dew and dry point calculation
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialWaterCooledDXCoil PartialWaterCooledDXCoil Base class for water-cooled DX coils
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.SensibleHeatRatio SensibleHeatRatio Calculates the sensible heat ratio
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.SpeedSelect SpeedSelect Selects the lower specified speed ratio for multispeed model
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.SpeedShift SpeedShift Interpolates values between speeds
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.UACp UACp Calculates UA/Cp of the coil
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.WetCoil WetCoil Calculates wet coil condition
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.NominalCondition NominalCondition Calculates inlet and outlet fluid parameters at nominal condition
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Functions Functions Package with functions
Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Examples Examples Package with examples of base class components for DX cooling coil model

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.ApparatusDewPoint Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.ApparatusDewPoint

Calculates air properties at apparatus dew point

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.ApparatusDewPoint

Information

This blocks outputs the state of the moist air at the dew point of the coil. The bypass factor of the coil and the resulting enthalpy difference is computed by its base class Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialSurfaceCondition.

Extends from Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialSurfaceCondition (Partial block for apparatus dew and dry point calculation).

Parameters

TypeNameDefaultDescription
DXCoildatCoiredeclare parameter Building...Performance data
replaceable package MediumPartialCondensingGasesMedium model
BooleanvariableSpeedCoil Flag, set to true to interpolate data
Initialization
Realbypass.start0.25Bypass factor

Connectors

TypeNameDescription
input RealInputspeRatSpeed index
input RealInputQ_flowCooling capacity of the coil [W]
input RealInputm_flowEvaporator air mass flow rate [kg/s]
input RealInputpEvaporator air static pressure [Pa]
input RealInputXEvaInEvaporator inlet air mass fraction
input RealInputhEvaInEvaporator air inlet specific enthalpy [J/kg]
input IntegerInputstageStage of coil, or 0/1 for variable-speed coil
output RealOutputhADPSpecific enthalpy of air at apparatus dew point [J/kg]
output RealOutputXADPHumidity mass fraction of air at apparatus dew point
output RealOutputTADPDry bulb temperature of air at apparatus dew point [K]

Modelica definition

block ApparatusDewPoint "Calculates air properties at apparatus dew point" extends Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialSurfaceCondition; Modelica.Blocks.Interfaces.RealOutput hADP( nominal=40000, quantity="SpecificEnergy", unit="J/kg") "Specific enthalpy of air at apparatus dew point"; Modelica.Blocks.Interfaces.RealOutput XADP( min=0, max=1.0) "Humidity mass fraction of air at apparatus dew point"; Modelica.Blocks.Interfaces.RealOutput TADP( quantity="ThermodynamicTemperature", unit="K", displayUnit="degC", min=233.15, max=373.15) "Dry bulb temperature of air at apparatus dew point"; protected parameter Modelica.SIunits.Temperature TSatMin = 273.15+3 "Minimum apparatus saturation temperature"; parameter Modelica.SIunits.MassFraction XSatMin = 0.004667 "Mass fraction at saturation of coil inlet conditions"; parameter Modelica.SIunits.SpecificEnthalpy hMin(fixed=false) "Minimum enthalpy of apparatus dew point"; initial equation /* XSatMin = Medium.Xsaturation( Medium.setState_pTX(p=p, T=273.15+3, X=cat(1,{XSatMin},{1-sum({XSatMin})}))); */ hMin = Medium.specificEnthalpy_pTX( p = Medium.p_default, T = TSatMin, X = cat(1,{XSatMin},{1-sum({XSatMin})})); equation hADP = Buildings.Utilities.Math.Functions.smoothMin( x1 = Buildings.Utilities.Math.Functions.smoothMax( x1=hEvaIn - delta_h, x2=hMin, deltaX=10), x2 = hEvaIn+100, deltaX=10); XADP = Buildings.Utilities.Psychrometrics.Functions.X_pW(p_w=Medium.saturationPressure(TADP), p=p); TADP= Medium.temperature(Medium.setState_phX(p=p, h=hADP, X=cat(1,{XADP},{1-sum({XADP})}))); end ApparatusDewPoint;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.ApparatusDryPoint Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.ApparatusDryPoint

Calculates air properties at dry coil surface

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.ApparatusDryPoint

Information

This blocks outputs the state of the moist air at of the coil, assuming no condensation occurs. The bypass factor of the coil and the resulting enthalpy difference is computed by its base class Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialSurfaceCondition.

Extends from Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialSurfaceCondition (Partial block for apparatus dew and dry point calculation).

Parameters

TypeNameDefaultDescription
DXCoildatCoiredeclare parameter Building...Performance data
replaceable package MediumPartialCondensingGasesMedium model
BooleanvariableSpeedCoil Flag, set to true to interpolate data
Initialization
Realbypass.start0.25Bypass factor

Connectors

TypeNameDescription
input RealInputspeRatSpeed index
input RealInputQ_flowCooling capacity of the coil [W]
input RealInputm_flowEvaporator air mass flow rate [kg/s]
input RealInputpEvaporator air static pressure [Pa]
input RealInputXEvaInEvaporator inlet air mass fraction
input RealInputhEvaInEvaporator air inlet specific enthalpy [J/kg]
input IntegerInputstageStage of coil, or 0/1 for variable-speed coil
output RealOutputTDryDry bulb temperature of air at dry coil condition [K]

Modelica definition

block ApparatusDryPoint "Calculates air properties at dry coil surface" extends Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialSurfaceCondition; Modelica.Blocks.Interfaces.RealOutput TDry( quantity="ThermodynamicTemperature", unit="K", displayUnit="degC", min=253.15, max=373.15) "Dry bulb temperature of air at dry coil condition"; output Modelica.SIunits.SpecificEnthalpy hDry "Enthalpy of air at coil surface"; protected Modelica.SIunits.MassFraction XEvaInVec[Medium.nX] "Mass fraction of air inlet condition"; Modelica.SIunits.Temperature TADP(start=283.15) "Apparatus dew point temperature"; Modelica.SIunits.SpecificEnthalpy hMin "Minimum enthalpy of apparatus dew point"; equation XEvaInVec =cat(1,{XEvaIn},{1-sum({XEvaIn})}); XEvaIn = Buildings.Utilities.Psychrometrics.Functions.X_pW( p_w=Buildings.Utilities.Psychrometrics.Functions.saturationPressureLiquid(TADP), p=p); hMin = Medium.specificEnthalpy(Medium.setState_pTX(p=p, T=TADP, X=XEvaInVec)); hDry = Buildings.Utilities.Math.Functions.smoothMin( x1 = Buildings.Utilities.Math.Functions.smoothMax( x1=hEvaIn - delta_h, x2=hMin, deltaX=10), x2 = hEvaIn+100, deltaX=10); TDry= Medium.temperature(Medium.setState_phX(p=p, h=hDry, X=XEvaInVec)) "XEvaIn=XDry assumption for dry coil"; end ApparatusDryPoint;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Condensation Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Condensation

Calculates rate of condensation

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Condensation

Information

This block computes the water mass flow rate that condenses.

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

Connectors

TypeNameDescription
input RealInputQ_flowHeat flow [W]
input RealInputSHRSensible heat ratio
output RealOutputmWat_flowMass flow rate of water condensed at cooling coil [kg/s]

Modelica definition

block Condensation "Calculates rate of condensation" extends Modelica.Blocks.Icons.Block; Modelica.Blocks.Interfaces.RealInput Q_flow( max=0, unit="W") "Heat flow"; Modelica.Blocks.Interfaces.RealInput SHR( min=0, max=1) "Sensible heat ratio"; Modelica.Blocks.Interfaces.RealOutput mWat_flow( quantity="MassFlowRate", unit="kg/s") "Mass flow rate of water condensed at cooling coil"; equation mWat_flow = (1-SHR)*Q_flow/Buildings.Utilities.Psychrometrics.Constants.h_fg; end Condensation;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.CoolingCapacityAirCooled Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.CoolingCapacityAirCooled

Calculates cooling capacity at given temperature and flow fraction for air-cooled coils

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.CoolingCapacityAirCooled

Information

This model calculates cooling capacity and EIR for air-cooled DX coils in off-designed conditions based on performance modifers calculated in partial model Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoolingCapacity.

Cooling capacity

The cooling capacity modifiers are multiplied with nominal cooling capacity to obtain the cooling capacity of the coil at given inlet temperatures and mass flow rate as

Q̇(θe,in, θc,in, ff) = capθe,in, θc,in) capFF(ff) Q̇nom,

where θe,in is the evaporator inlet temperature and θc,in is the condenser inlet temperature in degrees Celsius. θe,in is the dry-bulb temperature if the coil is dry, or the wet-bulb temperature if the coil is wet. capθe,in, θc,in) is cooling capacity modifier as a function of temperature. capFF(ff) is cooling capacity modifier as a function of nomalized mass flowrate at the evaporator.

Energy Input Ratio (EIR)

The Energy Input Ratio (EIR) is the inverse of the Coefficient of Performance (COP). Similar to the cooling rate, the EIR of the coil is the product of a function that takes into account changes in condenser and evaporator inlet temperatures, and changes in mass flow rate. The EIR is computed as

EIR(θe,in, θc,in, ff) = EIRθe,in, θc,in) EIRFF(ff) ⁄ COPnominal

Extends from Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoolingCapacity (Calculates performance curve value at given temperature and mass flow rate).

Parameters

TypeNameDefaultDescription
Booleanuse_mCon_flowfalseSet to true to enable connector for the condenser mass flow rate
IntegernSta Number of coil stages (not counting the off stage)
Initialization
Realcap_T.start[nSta]1Cooling capacity modification factor as a function of temperature
Realcap_FF.start[nSta]1Cooling capacity modification factor as a function of flow fraction
RealEIR_T.start[nSta]1EIR modification factor as a function of temperature
RealEIR_FF.start[nSta]1EIR modification factor as a function of flow fraction
RealcorFac.start[nSta]1Correction factor that is one inside the valid flow fraction, and attains zero below the valid flow fraction

Connectors

TypeNameDescription
input IntegerInputstageStage of coil, or 0/1 for variable-speed coil
input RealInputTConInTemperature of air entering the condenser coil [K]
input RealInputm_flowAir mass flow rate at the evaporator [kg/s]
input RealInputTEvaInTemperature of air entering the evaporator (wet bulb for wet coil and dry bulb for dry coil) [K]
input RealInputmCon_flowWater mass flow rate at the condenser [kg/s]
output RealOutputQ_flow[nSta]Total cooling capacity [W]
output RealOutputEIR[nSta]Energy Input Ratio

Modelica definition

block CoolingCapacityAirCooled "Calculates cooling capacity at given temperature and flow fraction for air-cooled coils" extends Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoolingCapacity ( redeclare replaceable Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.BaseClasses.Stage sta[nSta], use_mCon_flow=false); equation if stage > 0 then for iSta in 1:nSta loop Q_flow[iSta] = corFac[iSta]*cap_T[iSta]*cap_FF[iSta]*sta[iSta].nomVal.Q_flow_nominal; EIR[iSta] = corFac[iSta]*EIR_T[iSta]*EIR_FF[iSta]/sta[iSta].nomVal.COP_nominal; end for; else //cooling coil off Q_flow = fill(0, nSta); EIR = fill(0, nSta); end if; end CoolingCapacityAirCooled;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.CoolingCapacityWaterCooled Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.CoolingCapacityWaterCooled

Calculates cooling capacity at given temperature and flow fraction for water-cooled DX coils

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.CoolingCapacityWaterCooled

Information

This model calculates cooling capacity and EIR at off-designed conditions for water-cooled DX coils. The difference between air-cooled and water-cooled DX coils is that water-cooled DX coils require two additional modifer curves for total cooling capacity and EIR as a function of water mass flowrate at the condensers.

Total Cooling Capacity

The total cooling capacity at off-designed conditions for water-cooled DX coils is calculated as:

Q̇(θe,in, θc,in, ff) = capθe,in, θc,in) capFF(ff) capFFCon(ffCon) Q̇nom

where capFFCon(ffCon) is the additional modifier for cooling capacity, and calculated as:

capConFFCon(ffCon) = b1 + b2 ffCon + b3 ffCon2 + b4ffCon3 + ...

where the variable ffCon is the nomalized mass flow rate at the condenser, and calculated as:

ffCon = ṁCon ⁄ ṁConnom

where ṁCon is the mass flow rate at the condenser and ṁConnom is the nominal mass flow rate at the condenser.

Energy Input Ratio (EIR)

The Energy Input Ratio (EIR) is the inverse of the Coefficient of Performance (COP). Similar to the cooling capacity modifiers, the change in EIR due to change in water mass flow rate at the condenser is

EIRFFCon(ffCon) = b1 + b2 ffCon + b3 ffCon2 + b4ffCon3 + ...

where the six coefficients are obtained from the coil performance data record. See Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoolingCapacity for more information.

Extends from Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoolingCapacity (Calculates performance curve value at given temperature and mass flow rate).

Parameters

TypeNameDefaultDescription
Booleanuse_mCon_flowtrueSet to true to enable connector for the condenser mass flow rate
IntegernSta Number of coil stages (not counting the off stage)
Initialization
Realcap_T.start[nSta]1Cooling capacity modification factor as a function of temperature
Realcap_FF.start[nSta]1Cooling capacity modification factor as a function of flow fraction
RealEIR_T.start[nSta]1EIR modification factor as a function of temperature
RealEIR_FF.start[nSta]1EIR modification factor as a function of flow fraction
RealcorFac.start[nSta]1Correction factor that is one inside the valid flow fraction, and attains zero below the valid flow fraction

Connectors

TypeNameDescription
input IntegerInputstageStage of coil, or 0/1 for variable-speed coil
input RealInputTConInTemperature of air entering the condenser coil [K]
input RealInputm_flowAir mass flow rate at the evaporator [kg/s]
input RealInputTEvaInTemperature of air entering the evaporator (wet bulb for wet coil and dry bulb for dry coil) [K]
input RealInputmCon_flowWater mass flow rate at the condenser [kg/s]
output RealOutputQ_flow[nSta]Total cooling capacity [W]
output RealOutputEIR[nSta]Energy Input Ratio

Modelica definition

block CoolingCapacityWaterCooled "Calculates cooling capacity at given temperature and flow fraction for water-cooled DX coils" extends Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoolingCapacity ( final use_mCon_flow=true, redeclare Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.Stage sta[nSta]); protected Real[nSta] ffCon(each min=0) "Water flow fraction: ratio of actual water flow rate by rated mass flow rate at the condenser"; Real cap_FFCon[nSta](each min=0, each nominal=1, each start=1) "Cooling capacity modification factor as a function of water flow fraction at the condenser"; Real EIR_FFCon[nSta](each min=0, each nominal=1, each start=1) "EIR modification factor as a function of water flow fraction at the condenser"; Real corFacCon[nSta](each min=0, each max=1, each nominal=1, each start=1) "Correction factor that is one inside the valid water flow fraction, and attains zero below the valid water flow fraction at the condenser"; Modelica.Blocks.Interfaces.RealInput mCon_flow_internal "Internal connector, needed as mCon_flow can be conditionally removed"; initial algorithm // Verify correctness of performance curves, and write warning if error is bigger than 10% for iSta in 1:nSta loop Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Functions.warnIfPerformanceOutOfBounds( Buildings.Fluid.Utilities.extendedPolynomial( x=1, c=sta[iSta].perCur.capFunFFCon, xMin=sta[iSta].perCur.ffConMin, xMax=sta[iSta].perCur.ffConMin), msg="Capacity as a function of normalized water mass flow rate at the condenser", curveName="sta[" + String(iSta) + "].perCur.capFunFFCon"); Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Functions.warnIfPerformanceOutOfBounds( Buildings.Fluid.Utilities.extendedPolynomial( x=1, c=sta[iSta].perCur.EIRFunFF, xMin=sta[iSta].perCur.ffConMin, xMax=sta[iSta].perCur.ffConMin), msg="EIR as a function of normalized water mass flow rate at the condenser", curveName="sta[" + String(iSta) + "].perCur.EIRFunFFCon"); end for; equation if use_mCon_flow then connect(mCon_flow_internal, mCon_flow); else mCon_flow_internal = 0; end if; // Modelica requires to evaluate the when() block for each element in iSta=1...nSta. // But we only want to check the stage that is currently running. // Hence, the test starts with stage == iSta. if stage > 0 then for iSta in 1:nSta loop // Compute performance ffCon[iSta]=Buildings.Utilities.Math.Functions.smoothMax( x1=mCon_flow_internal, x2=m_flow_small, deltaX=m_flow_small/10)/sta[iSta].nomVal.mCon_flow_nominal; //-------------------------Cooling capacity modifiers----------------------------// cap_FFCon[iSta] = Buildings.Fluid.Utilities.extendedPolynomial( x=ff[iSta], c=sta[iSta].perCur.capFunFFCon, xMin=sta[iSta].perCur.ffConMin, xMax=sta[iSta].perCur.ffConMin); //-----------------------Energy Input Ratio modifiers--------------------------// EIR_FFCon[iSta] = Buildings.Fluid.Utilities.extendedPolynomial( x=ff[iSta], c=sta[iSta].perCur.EIRFunFFCon, xMin=sta[iSta].perCur.ffConMin, xMax=sta[iSta].perCur.ffConMin) "Cooling capacity modification factor as function of flow fraction"; //------------ Correction factor for flow rate outside of validity of data ---// corFacCon[iSta] =Buildings.Utilities.Math.Functions.smoothHeaviside( x=ffCon[iSta] - sta[iSta].perCur.ffConMin/4, delta=max(Modelica.Constants.eps, sta[iSta].perCur.ffConMin/4)); Q_flow[iSta] = corFac[iSta]*corFacCon[iSta]*cap_T[iSta]*cap_FF[iSta]*cap_FFCon[iSta]*sta[iSta].nomVal.Q_flow_nominal; EIR[iSta] = corFac[iSta]*corFacCon[iSta]*EIR_T[iSta]*EIR_FF[iSta]*EIR_FFCon[iSta]/sta[iSta].nomVal.COP_nominal; end for; else //cooling coil off ffCon = fill(0, nSta); cap_FFCon = fill(0, nSta); EIR_FFCon = fill(0, nSta); corFacCon = fill(0, nSta); Q_flow = fill(0, nSta); EIR = fill(0, nSta); end if; end CoolingCapacityWaterCooled;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DXCooling Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DXCooling

DX cooling coil operation

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DXCooling

Information

This block combines the models for the dry coil and the wet coil. Output of the block is the coil performance which, depending on the mass fraction at the apparatus dew point temperature and the mass fraction of the coil inlet air, may be from the dry coil, the wet coil, or a weighted average of the two.

Extends from Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoilInterface (Partial block for DX coil).

Parameters

TypeNameDefaultDescription
DXCoildatCoiredeclare parameter Building...Performance data
Booleanuse_mCon_flow Set to true to enable connector for the condenser mass flow rate
replaceable package MediumModelica.Media.Interfaces.Pa...Medium model
BooleanvariableSpeedCoil Flag, set to true for coil with variable speed

Connectors

TypeNameDescription
input IntegerInputstageStage of coil, or 0/1 for variable-speed coil
input RealInputspeRatSpeed ratio
input RealInputm_flowAir mass flow rate
input RealInputTEvaInTemperature of air entering the cooling coil
input RealInputTConInOutside air dry bulb temperature for an air cooled condenser or wetbulb temperature for an evaporative cooled condenser [K]
output RealOutputEIREnergy Input Ratio
output RealOutputQ_flowTotal cooling capacity [W]
input RealInputmCon_flowWater mass flow rate at condensers for water-cooled DX units
replaceable package MediumMedium model
output RealOutputmWat_flowMass flow rate of water condensed at cooling coil [kg/s]
output RealOutputSHRSensible Heat Ratio: Ratio of sensible heat load to total heat load
input RealInputXEvaInInlet air mass fraction
input RealInputpPressure at inlet of coil
input RealInputhEvaInSpecific enthalpy of air entering the coil

Modelica definition

model DXCooling "DX cooling coil operation " extends Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoilInterface; replaceable package Medium = Modelica.Media.Interfaces.PartialCondensingGases "Medium model"; constant Boolean variableSpeedCoil "Flag, set to true for coil with variable speed"; WetCoil wetCoi( redeclare final package Medium = Medium, final variableSpeedCoil = variableSpeedCoil, datCoi=datCoi, use_mCon_flow=use_mCon_flow) "Wet coil condition"; DryCoil dryCoi( redeclare final package Medium = Medium, final variableSpeedCoil = variableSpeedCoil, datCoi=datCoi, use_mCon_flow=use_mCon_flow) "Dry coil condition"; Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DryWetSelector dryWet "Actual coil condition"; Modelica.Blocks.Interfaces.RealOutput mWat_flow( quantity="MassFlowRate", unit="kg/s") "Mass flow rate of water condensed at cooling coil"; Modelica.Blocks.Interfaces.RealOutput SHR( min=0, max=1.0) "Sensible Heat Ratio: Ratio of sensible heat load to total heat load"; Modelica.Blocks.Interfaces.RealInput XEvaIn "Inlet air mass fraction"; Modelica.Blocks.Interfaces.RealInput p "Pressure at inlet of coil"; Modelica.Blocks.Interfaces.RealInput hEvaIn "Specific enthalpy of air entering the coil"; equation connect(TConIn, wetCoi.TConIn); connect(TConIn, dryCoi.TConIn); connect(m_flow, wetCoi.m_flow); connect(m_flow, dryCoi.m_flow); connect(TEvaIn, wetCoi.TEvaIn); connect(TEvaIn, dryCoi.TEvaIn); connect(p, wetCoi.p); connect(XEvaIn, wetCoi.XEvaIn); connect(hEvaIn, wetCoi.hEvaIn); connect(speRat, wetCoi.speRat); connect(speRat, dryCoi.speRat); connect(XEvaIn, dryWet.XEvaIn); connect(stage, dryCoi.stage); connect(stage, wetCoi.stage); connect(dryWet.EIRWet, wetCoi.EIR); connect(wetCoi.Q_flow, dryWet.QWet_flow); connect(wetCoi.SHR, dryWet.SHRWet); connect(wetCoi.mWat_flow, dryWet.mWetWat_flow); connect(dryCoi.EIR, dryWet.EIRDry); connect(dryCoi.Q_flow, dryWet.QDry_flow); connect(dryWet.EIR, EIR); connect(dryWet.Q_flow, Q_flow); connect(dryWet.SHR, SHR); connect(dryWet.mWat_flow, mWat_flow); connect(wetCoi.XADP, dryWet.XADP); connect(mCon_flow, wetCoi.mCon_flow); connect(mCon_flow, dryCoi.mCon_flow); end DXCooling;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DryCoil Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DryCoil

Calculates dry coil condition

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DryCoil

Information

This block calculates the rate of cooling and the coil surface condition under the assumption that the coil is dry.

The wet coil conditions are computed in Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.WetCoil. See Buildings.Fluid.HeatExchangers.DXCoils.UsersGuide for an explanation of the model.

Extends from Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoilCondition (Partial block for dry and wet coil conditions).

Parameters

TypeNameDefaultDescription
DXCoildatCoiredeclare parameter Building...Performance data
Booleanuse_mCon_flow Set to true to enable connector for the condenser mass flow rate
BooleanvariableSpeedCoil Flag, set to true for coil with variable speed
CoolingCapacityAirCooledcooCapredeclare Buildings.Fluid.He...Performance data
replaceable package MediumModelica.Media.Interfaces.Pa...Medium model

Connectors

TypeNameDescription
input IntegerInputstageStage of coil, or 0/1 for variable-speed coil
input RealInputspeRatSpeed ratio
input RealInputm_flowAir mass flow rate
input RealInputTEvaInTemperature of air entering the cooling coil
input RealInputTConInOutside air dry bulb temperature for an air cooled condenser or wetbulb temperature for an evaporative cooled condenser [K]
output RealOutputEIREnergy Input Ratio
output RealOutputQ_flowTotal cooling capacity [W]
input RealInputmCon_flowWater mass flow rate at condensers for water-cooled DX units
replaceable package MediumMedium model

Modelica definition

model DryCoil "Calculates dry coil condition" extends Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoilCondition; replaceable package Medium = Modelica.Media.Interfaces.PartialCondensingGases "Medium model"; equation connect(TEvaIn, cooCap.TEvaIn); connect(mCon_flow, cooCap.mCon_flow); end DryCoil;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DryWetSelector Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DryWetSelector

Selects results from dry or wet coil

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DryWetSelector

Information

This block smoothly transitions the results from the dry coil and the wet coil computation. The independent variable for the transition is the difference between the water mass fractions at the apparatus dew point, as computed by the wet coil model, and the coil inlet mass fraction.

Connectors

TypeNameDescription
input RealInputXEvaInInlet air mass fraction
input RealInputXADPMass fraction at ADP
input RealInputEIRWetEnergy Input Ratio
input RealInputQWet_flowTotal cooling capacity [W]
input RealInputSHRWetSensible Heat Ratio: Ratio of sensible heat load to total heat load
input RealInputmWetWat_flowMass flow rate of water condensed at cooling coil [kg/s]
input RealInputEIRDryEnergy Input Ratio
input RealInputQDry_flowTotal cooling capacity [W]
output RealOutputEIREnergy Input Ratio
output RealOutputQ_flowTotal cooling capacity [W]
output RealOutputSHRSensible Heat Ratio: Ratio of sensible heat load to total heat load
output RealOutputmWat_flowMass flow rate of water condensed at cooling coil [kg/s]

Modelica definition

block DryWetSelector "Selects results from dry or wet coil" constant Modelica.SIunits.MassFraction deltaX=0.0001 "Range of x where transition between dry and wet coil occurs"; Modelica.Blocks.Interfaces.RealInput XEvaIn "Inlet air mass fraction"; Modelica.Blocks.Interfaces.RealInput XADP "Mass fraction at ADP"; Modelica.Blocks.Interfaces.RealInput EIRWet "Energy Input Ratio"; Modelica.Blocks.Interfaces.RealInput QWet_flow( max=0, unit="W") "Total cooling capacity"; Modelica.Blocks.Interfaces.RealInput SHRWet( min=0, max=1.0) "Sensible Heat Ratio: Ratio of sensible heat load to total heat load"; Modelica.Blocks.Interfaces.RealInput mWetWat_flow( quantity="MassFlowRate", unit="kg/s") "Mass flow rate of water condensed at cooling coil"; Modelica.Blocks.Interfaces.RealInput EIRDry "Energy Input Ratio"; Modelica.Blocks.Interfaces.RealInput QDry_flow(max=0, unit="W") "Total cooling capacity"; Modelica.Blocks.Interfaces.RealOutput EIR "Energy Input Ratio"; Modelica.Blocks.Interfaces.RealOutput Q_flow( max=0, unit="W") "Total cooling capacity"; Modelica.Blocks.Interfaces.RealOutput SHR( min=0, max=1.0) "Sensible Heat Ratio: Ratio of sensible heat load to total heat load"; Modelica.Blocks.Interfaces.RealOutput mWat_flow( quantity="MassFlowRate", unit="kg/s") "Mass flow rate of water condensed at cooling coil"; output Real fraDry(min=0, max=1) "Fraction of results that are taken from the dry coil model"; output Real fraWet(min=0, max=1) "Fraction of results that are taken from the wet coil model"; protected output Modelica.SIunits.MassFraction dX(min=-1, max=1) "Difference between apparatus dew point mass fraction of wet coil and inlet air mass fraction"; equation dX = XADP-XEvaIn; fraDry=Buildings.Utilities.Math.Functions.spliceFunction( pos=+1, neg=0, x= dX+deltaX, deltax= deltaX); fraWet=1-fraDry; EIR = fraDry * EIRDry + fraWet * EIRWet; Q_flow = fraDry * QDry_flow + fraWet * QWet_flow; SHR = fraDry + fraWet * SHRWet; mWat_flow = fraWet * mWetWat_flow; end DryWetSelector;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.EssentialParameters

A partial block for essential parameters

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.EssentialParameters

Information

This partial block declares parameters that are required by most classes in the package Buildings.Fluid.HeatExchangers.DXCoils.

Parameters

TypeNameDefaultDescription
DXCoildatCoiredeclare parameter Building...Performance data

Modelica definition

partial block EssentialParameters "A partial block for essential parameters" replaceable parameter Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.DXCoil datCoi constrainedby Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.DXCoil "Performance data"; protected parameter Integer nSta=datCoi.nSta "Number of stages"; end EssentialParameters;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Evaporation Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Evaporation

Model that computes evaporation of water that accumulated on the coil surface

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Evaporation

Information

This model computes the water accumulation on the surface of a cooling coil. When the cooling coil operates, water is accumulated on the coil surface up to a maximum amount of water before water starts to drain away from the coil. When the coil is off, the accumulated water evaporates into the air stream.

Physical description

The calculations are based on Shirey et al. (2006).

Parameters

The maximum amount of water that can be accumulated is computed based on the following model, where we used the convention that latent heat removed from the air is negative: The parameter twet defines how long it takes for condensate to drip of the coil, assuming the coil starts completely dry and operates at the nominal operating point. Henderson et al. (2003) measured values for twet from 16.5 minutes (990 seconds) to 29 minutes (1740 seconds). Thus, we use a default value of twet=1400 seconds. The maximum amount of water that can accumulate on the coil is

mmax = -Q̇L,nom   twet ⁄ hfg

where L,nom<0 is the latent capacity at the nominal conditions and hfg is the latent heat of evaporation.

When the coil is off, the water that has been accumulated on the coil evaporates into the air. The rate of water vapor evaporation at nominal operating conditions is defined by the parameter γnom. The definition of γnom is

γnom = Q̇e,nom ⁄ Q̇L,nom,

where e,nom<0 is the rate of evaporation from the coil surface into the air stream right after the coil is switched off. The default value is γnom = 1.5.

Time dependent calculations

First, we discuss the accumulation of water on the coil. The rate of water accumulation is computed as

dm(t)⁄dt = -ṁwat(t)

where wat(t) ≤ 0 is the water vapor mass flow rate that is extracted from the air at the current operating conditions. The actual water vapor mass flow rate that is removed from the air stream is as computed by the steady-state cooling coil performance model because for the coil outlet conditions, it does not matter whether the water accumulates on the coil or drips away from the coil. The initial value for the water accumulation is zero at the start of the simulation, and set to whatever water remains after the coil has been switched off and the water partially or completely evaporated into the air stream.

Now, we discuss the evaporation of the water on the coil surface into the air when the coil is off. The model in Shirey et al. (2006) is based on the assumption that the wet coil acts as an evaporative cooler. The change of water on the coil is

dm(t)⁄dt = -ṁmax(t) η(t),

where max(t) > 0 is the maximum water mass flow rate from the coil to the air and η(t) ∈ [0, 1] is the mass transfer effectiveness. For an evaporative cooler,

η(t) = 1-exp(-NTU(t)),

where NTU(t)=(hA)m/Ċa are the number of mass transfer units and a is the air capacity flow rate. The mass transfer coefficient (hA)m is assumed to be proportional to the wet coil area, which is assumed to be equal to the ratio m(t) ⁄ mmax(t). Hence,

(hA)m(t) ∝ m(t) ⁄ mmax(t).

Furthermore, the mass transfer coefficient depends on the velocity, and hence mass flow rate, as

(hA)m(t) ∝ ṁa(t)0.8,

where a(t) is the current air mass flow rate, from which follows that

NTU(t) ∝ ṁa(t)-0.2.

Therefore, the water mass flow rate from the coil into the air stream is

wat(t) = ṁmax(t) (1-exp(-K (m(t) ⁄ mtot) (ṁa(t) ⁄ ṁa,nom)-0.2 )),

where K > 0 is a constant to be determined below and the rate of change of water on the coil surface is as before

dm(t)⁄dt = -ṁwat(t).

The maximum mass transfer is

max = ṁa (xwb(t) - x(t)),

where xwb(t) is the moisture content of air at the wet bulb state and x(t) is the actual moisture content of the air.

The constant K is determined from the nominal conditions as follows: At the nominal condition, we have m(t) ⁄ mtot=1 and a(t) ⁄ ṁa,nom=1, and, hence,

nom = ṁmax,nom (1-e-K).

Because

nom = - γ Q̇L,nom ⁄ hfg,

it follows that

K = -ln( 1 + γnomL,nom ⁄ ṁa,nom ⁄ hfg ⁄ (xwb,nom-xnom) ),

where xnom is the humidity ratio at the coil at nominal condition and xwb,nom is the humidity ratio at the wet bulb condition. Note that the ln(·) in the above equation requires that the argument is positive. See the implementation section below for how this is implemented.

Implementation

Potential for moisture transfer

For the potential that causes the moisture transfer, the difference in mass fraction between the current coil air and the coil air at the wet bulb conditions is used, provided that the air mass flow rate is within 1⁄3 of the nominal mass flow rate. For smaller air mass flow rates, the outlet conditions are used to ensure that the outlet conditions are not supersaturated air. The transition between these two driving potential is continuously differentiable in the mass flow rate.

Computation of mass transfer effectiveness

To evaluate

K = -ln( 1 + γnomL,nom ⁄ ṁa,nom ⁄ hfg ⁄ (xwb,nom-xnom) ),

the argument of the ln(·) function must be positive. However, often the parameter γnom is not known, and the default value of γnom = 1.5 may yield negative arguments for the function ln(·). We therefore set a lower bound on γnom as follows: Note that γnom must be such that 0 < ṁwat,nom < ṁmax,nom. This condition is equivalent to

0 < γnom < ṁa,nom (xwb,nom-xnom) hfg ⁄ (-Q̇L,nom)

If γnom were equal to the right hand side, then the mass transfer effectiveness would be one. Hence, we set the maximum value of γnom,max to

γnom,max = 0.8 ṁa,nom (xwb,nom-xnom) hfg ⁄ Q̇L,nom,

which corresponds to a mass transfer effectiveness of 0.8. If γnom > γnom,max, the model sets γnomnom,max and writes a warning message.

Regularization near zero air mass flow rate

To regularize the equations near zero air mass flow rate and zero humidity on the coil, the following conditions have been imposed in such a way that the model is once continuously differentiable with bounded derivatives on compact sets:

This is implemented by replacing for |ṁa(t)| < δ the equation for the evaporation mass flow rate by

wat(t) = C m ṁa2(t) (xwb,nom-xnom),

where C=K δ-0.2 which approximates continuity at |ṁa|=δ. Note that differentiability is ensured because the two equations are combined using the function Buildings.Utilities.Math.Functions.spliceFunction. Also note that based on physics, we would not have to square a, but this was done to avoid an event that would be triggered if |ṁa| would have been used. Since the equation is active only at very small air flow rates when the fan is off, the error is negligible for typical applications.

References

Hugh I. Henderson, Jr., Don B. Shirey III and Richard A. Raustad. Understanding the Dehumidification Performance of Air-Conditioning Equipment at Part-Load Conditions. CIBSE/ASHRAE Conference, Edinburgh, Scotland, September 2003.

Don B. Shirey III, Hugh I. Henderson, Jr. and Richard A. Raustad. Understanding the Dehumidification Performance of Air-Conditioning Equipment at Part-Load Conditions. Florida Solar Energy Center, Technical Report FSEC-CR-1537-05, January 2006.

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

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Medium model
NominalValuesnomVal Nominal values
BooleancomputeReevaporationtrueSet to true to compute reevaporation of water that accumulated on coil
Advanced
MassFlowRatemAir_flow_small0.1*abs(nomVal.m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]

Connectors

TypeNameDescription
replaceable package MediumMedium model
input BooleanInputonControl signal, true if compressor is on
input RealInputmWat_flowWater flow rate added into the medium [kg/s]
input RealInputmAir_flowAir mass flow rate [kg/s]
input RealInputXEvaOutWater mass fraction [1]
input RealInputTEvaOutAir temperature [K]
output RealOutputmTotWat_flowTotal moisture mass flow rate into the air stream [kg/s]

Modelica definition

model Evaporation "Model that computes evaporation of water that accumulated on the coil surface" extends Modelica.Blocks.Icons.Block; replaceable package Medium = Modelica.Media.Interfaces.PartialCondensingGases "Medium model"; parameter Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.BaseClasses.NominalValues nomVal "Nominal values"; parameter Modelica.SIunits.MassFlowRate mAir_flow_small(min=0)= 0.1*abs(nomVal.m_flow_nominal) "Small mass flow rate for regularization of zero flow"; final parameter Modelica.SIunits.Mass mMax(min=0, fixed=false) "Maximum mass of water that can accumulate on the coil"; parameter Boolean computeReevaporation=true "Set to true to compute reevaporation of water that accumulated on coil"; //////////////////////////////////////////////////////////////////////////////// // Input and output signals Modelica.Blocks.Interfaces.BooleanInput on "Control signal, true if compressor is on"; Modelica.Blocks.Interfaces.RealInput mWat_flow(final quantity="MassFlowRate", final unit = "kg/s") "Water flow rate added into the medium"; Modelica.Blocks.Interfaces.RealInput mAir_flow(final quantity="MassFlowRate", final unit = "kg/s") "Air mass flow rate"; Modelica.Blocks.Interfaces.RealInput XEvaOut(min=0, max=1, unit="1") "Water mass fraction"; Modelica.Blocks.Interfaces.RealInput TEvaOut( final quantity="ThermodynamicTemperature", final unit="K", displayUnit="degC") "Air temperature"; Modelica.Blocks.Interfaces.RealOutput mTotWat_flow(final quantity="MassFlowRate", final unit = "kg/s") "Total moisture mass flow rate into the air stream"; Modelica.SIunits.Mass m(nominal=-5000*1400/2257E3, start=0, fixed=true) "Mass of water that accumulated on the coil"; Modelica.SIunits.MassFlowRate mEva_flow(start=0) "Moisture mass flow rate that evaporates into air stream"; //////////////////////////////////////////////////////////////////////////////// // Protected parameters and variables protected final parameter Modelica.SIunits.HeatFlowRate QSen_flow_nominal(max=0, fixed=false) "Nominal sensible heat flow rate (negative number)"; final parameter Modelica.SIunits.HeatFlowRate QLat_flow_nominal(max=0, fixed=false) "Nominal latent heat flow rate (negative number)"; final parameter Modelica.SIunits.MassFraction XEvaIn_nominal(fixed=false) "Mass fraction at nominal inlet conditions"; final parameter Modelica.SIunits.MassFraction XEvaOut_nominal(fixed=false) "Mass fraction at nominal outlet conditions"; final parameter Modelica.SIunits.MassFraction XiSatRefOut_nominal(fixed=false) "Water vapor mass fraction at saturation, referenced to outlet mass flow rate"; final parameter Modelica.SIunits.Temperature TEvaOut_nominal(fixed=false) "Dry bulb temperature at nominal outlet conditions"; final parameter Modelica.SIunits.Temperature TEvaWetBulOut_nominal(fixed=false) "Wet bulb temperature at nominal outlet conditions"; final parameter Modelica.SIunits.MassFraction XEvaWetBulOut_nominal(fixed=false) "Water vapor mass fraction at nominal outlet wet bulb condition"; final parameter Modelica.SIunits.MassFraction dX_nominal( min=-1, max=0, fixed=false) "Driving potential for mass transfer"; final parameter Modelica.SIunits.SpecificEnthalpy h_fg(fixed=false) "Latent heat of vaporization"; final parameter Real gammaMax(min=0, fixed=false) "Maximum value for gamma"; final parameter Real logArg(min=0, fixed=false) "Argument for the log function"; final parameter Real K(min=0, fixed=false) "Coefficient used for convective mass transfer"; final parameter Real K2(min=0, fixed=false) "Coefficient used for convective mass transfer"; Modelica.SIunits.MassFraction XEvaWetBulOut "Water vapor mass fraction at wet bulb conditions at air inlet"; Modelica.SIunits.MassFraction XiSatRefOut "Water vapor mass fraction at saturation, referenced to outlet mass flow rate"; // off = not on is required because Dymola 2013 fails during model // check if on, which is an input connector, is used in the edge() function Boolean off=not on "Signal, true when component is off"; Modelica.SIunits.Temperature TEvaWetBulOut "Wet bulb temperature at coil"; Modelica.SIunits.MassFraction dX(min=-1, max=0) "Difference in water vapor concentration that drives mass transfer"; constant Modelica.SIunits.SpecificHeatCapacity cpAir_nominal= Buildings.Utilities.Psychrometrics.Constants.cpAir "Specific heat capacity of air"; constant Modelica.SIunits.SpecificHeatCapacity cpSte_nominal= Buildings.Utilities.Psychrometrics.Constants.cpSte "Specific heat capacity of water vapor"; constant Modelica.SIunits.SpecificHeatCapacity cpWatLiq_nominal= Buildings.Utilities.Psychrometrics.Constants.cpWatLiq "Specific heat capacity of liquid water"; constant Modelica.SIunits.Temperature T_ref= Buildings.Utilities.Psychrometrics.Constants.T_ref "Reference temperature for psychrometric calculations"; initial equation QSen_flow_nominal=nomVal.SHR_nominal * nomVal.Q_flow_nominal; QLat_flow_nominal=nomVal.Q_flow_nominal-QSen_flow_nominal; h_fg = Medium.enthalpyOfVaporization(nomVal.TEvaIn_nominal); mMax = -QLat_flow_nominal * nomVal.tWet/h_fg; XEvaIn_nominal=Buildings.Utilities.Psychrometrics.Functions.X_pSatpphi( pSat=Medium.saturationPressure(nomVal.TEvaIn_nominal), p=nomVal.p_nominal, phi=nomVal.phiIn_nominal); XEvaOut_nominal = XEvaIn_nominal + QLat_flow_nominal/nomVal.m_flow_nominal/h_fg; // Compute outlet air temperature TEvaOut_nominal = (nomVal.TEvaIn_nominal*Medium.specificHeatCapacityCp( Medium.setState_pTX(p=nomVal.p_nominal, T=nomVal.TEvaIn_nominal, X=cat(1, {XEvaIn_nominal, 1-XEvaIn_nominal}))) + QSen_flow_nominal/nomVal.m_flow_nominal) / Medium.specificHeatCapacityCp( Medium.setState_pTX(p=nomVal.p_nominal, T=nomVal.TEvaIn_nominal, X=cat(1, {XEvaOut_nominal, 1-XEvaOut_nominal}))); // Compute wet bulb temperature. // The computation of the wet bulb temperature requires an iterative // solution. It therefore cannot be done in a function. // The block Buildings.Utilities.Psychrometrics.TWetBul_TDryBulXi // implements the equation below, but it cannot // be used here because blocks cannot be used to assign parameter // values. XEvaWetBulOut_nominal = Buildings.Utilities.Psychrometrics.Functions.X_pSatpphi( pSat = Buildings.Utilities.Psychrometrics.Functions.saturationPressureLiquid(TEvaWetBulOut_nominal), p = nomVal.p_nominal, phi = 1); XiSatRefOut_nominal=(1-XEvaOut_nominal)*XEvaWetBulOut_nominal/(1-XEvaWetBulOut_nominal); (TEvaWetBulOut_nominal-T_ref) * ( (1-XEvaOut_nominal) * cpAir_nominal + XiSatRefOut_nominal * cpSte_nominal + (XEvaOut_nominal-XiSatRefOut_nominal) * cpWatLiq_nominal) = (TEvaOut_nominal-T_ref) * ( (1-XEvaOut_nominal) * cpAir_nominal + XEvaOut_nominal * cpSte_nominal) + (XEvaOut_nominal-XiSatRefOut_nominal) * Buildings.Utilities.Psychrometrics.Constants.h_fg; // Potential difference in moisture concentration that drives mass transfer at nominal condition dX_nominal = XEvaOut_nominal-XEvaWetBulOut_nominal; assert( dX_nominal > 1E-10, "*** Warning: In DX coil model, dX_nominal = " + String(dX_nominal) + " This means that the coil is not dehumidifying air at the nominal conditions. Check nominal parameters. " + Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.BaseClasses.nominalValuesToString( nomVal), AssertionLevel.warning); gammaMax = 0.8 * nomVal.m_flow_nominal * dX_nominal * h_fg / QLat_flow_nominal; // If gamma is bigger than a maximum value, write a warning and then // use the smaller value. assert(nomVal.gamma <= gammaMax, "*** Warning: In DX coil model, gamma is too large for these coil conditions. Instead of gamma = " + String(nomVal.gamma) + ", a value of " + String(gammaMax) + ", which corresponds to a mass transfer effectiveness of 0.8, will be used. Coil nominal performance data are: nomVal.m_flow_nominal = " + String(nomVal.m_flow_nominal) + " dX_nominal = XEvaOut_nominal-XEvaWetBulOut_nominal = " + String(XEvaOut_nominal) + " - " + String(XEvaWetBulOut_nominal) + " = " + String(dX_nominal) + " QLat_flow_nominal = " + String(QLat_flow_nominal) + "\n", AssertionLevel.warning); logArg = 1-min(nomVal.gamma, gammaMax)*QLat_flow_nominal/nomVal.m_flow_nominal/h_fg/dX_nominal; K = -Modelica.Math.log(logArg); K2 = K/mMax*nomVal.m_flow_nominal^(-0.2); assert(QLat_flow_nominal < 0, "QLat_nominal must be a negative number. Check parameters."); assert(K > 0, "Require K>0 but received " + String(K) + " The parameter are: QSen_flow_nominal = " + String(QSen_flow_nominal) + " QLat_flow_nominal = " + String(QLat_flow_nominal) + " XEvaOut_nominal = " + String(XEvaOut_nominal) + " " + Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.BaseClasses.nominalValuesToString( nomVal) + " Check parameters. Maybe the sensible heat ratio is too big, or the mass flow rate is too small."); equation // When the coil switches off, set accumulated water to // lower value of actual accumulated water or maximum water content if computeReevaporation then when edge(off) then reinit(m, min(m, mMax)); end when; if on then dX = 0; mEva_flow = 0; mTotWat_flow = mWat_flow; der(m) = -mWat_flow; TEvaWetBulOut = 293.15; XEvaWetBulOut = 0; XiSatRefOut = 0; else // Compute wet bulb temperature. // The computation of the wet bulb temperature requires an iterative // solution. It therefore cannot be done in a function. // The block Buildings.Utilities.Psychrometrics.TWetBul_TDryBulXi // implements the equation below, but it is not used here // because otherwise, in each branch of the if-then construct, // an iteration would be done. This would be inefficient because // the wet bulb conditions are only needed in this branch. XiSatRefOut=(1-XEvaOut)*XEvaWetBulOut/(1-XEvaWetBulOut); XEvaWetBulOut = Buildings.Utilities.Psychrometrics.Functions.X_pSatpphi( pSat = Buildings.Utilities.Psychrometrics.Functions.saturationPressureLiquid(TEvaWetBulOut), p = nomVal.p_nominal, phi = 1); (TEvaWetBulOut-T_ref) * ( (1-XEvaOut) * cpAir_nominal + XiSatRefOut * cpSte_nominal + (XEvaOut-XiSatRefOut) * cpWatLiq_nominal) = (TEvaOut-T_ref) * ( (1-XEvaOut) * cpAir_nominal + XEvaOut * cpSte_nominal) + (XEvaOut-XiSatRefOut) * Buildings.Utilities.Psychrometrics.Constants.h_fg; dX = smooth(1, noEvent( Buildings.Utilities.Math.Functions.spliceFunction( pos=XEvaOut, neg=XEvaWetBulOut, x=abs(mAir_flow)-nomVal.m_flow_nominal/2, deltax=nomVal.m_flow_nominal/3))) - XEvaWetBulOut; mEva_flow = -dX * smooth(1, noEvent( Buildings.Utilities.Math.Functions.spliceFunction( pos=if abs(mAir_flow) > mAir_flow_small/3 then abs(mAir_flow) * (1-Modelica.Math.exp(-K2*m*abs(mAir_flow)^(-0.2))) else 0, neg=K2*mAir_flow_small^(-0.2)*m*mAir_flow^2, x=abs(mAir_flow)- 2*mAir_flow_small/3, deltax=2*mAir_flow_small/6))); der(m) = -mEva_flow; mTotWat_flow = mWat_flow + mEva_flow; end if; else // The model is configured to not compute reevaporation dX = 0; mEva_flow = 0; mTotWat_flow = mWat_flow; m = 0; TEvaWetBulOut = 293.15; XEvaWetBulOut = 0; end if; end Evaporation;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.InputPower Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.InputPower

Electrical power consumed by the unit

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.InputPower

Information

This block calculates total electrical energy consumed by the unit using the rate of cooling and the energy input ratio EIR.

The electrical energy consumed by the unit is

P = -Qcool EIR

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

Connectors

TypeNameDescription
input RealInputQ_flowCooling capacity of the coil [W]
input RealInputEIREnergy input ratio
input RealInputSHRSensible heat ratio
output RealOutputPElectrical power consumed by the unit [W]
output RealOutputQSen_flowSensible heat flow rate [W]
output RealOutputQLat_flowLatent heat flow rate [W]

Modelica definition

block InputPower "Electrical power consumed by the unit" extends Modelica.Blocks.Icons.Block; Modelica.Blocks.Interfaces.RealInput Q_flow( quantity="Power", unit="W") "Cooling capacity of the coil"; Modelica.Blocks.Interfaces.RealInput EIR "Energy input ratio"; Modelica.Blocks.Interfaces.RealInput SHR(min=0, max=1) "Sensible heat ratio"; Modelica.Blocks.Interfaces.RealOutput P( quantity="Power", unit="W") "Electrical power consumed by the unit"; Modelica.Blocks.Interfaces.RealOutput QSen_flow(quantity="Power", unit="W") "Sensible heat flow rate"; Modelica.Blocks.Interfaces.RealOutput QLat_flow(quantity="Power", unit="W") "Latent heat flow rate"; equation P = -EIR*Q_flow; QSen_flow = Q_flow * SHR; QLat_flow = Q_flow - QSen_flow; end InputPower;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoilCondition Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoilCondition

Partial block for dry and wet coil conditions

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoilCondition

Information

This partial block is the base class for Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DryCoil and Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.WetCoil.

Extends from Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoilInterface (Partial block for DX coil).

Parameters

TypeNameDefaultDescription
DXCoildatCoiredeclare parameter Building...Performance data
Booleanuse_mCon_flow Set to true to enable connector for the condenser mass flow rate
BooleanvariableSpeedCoil Flag, set to true for coil with variable speed
CoolingCapacityAirCooledcooCapredeclare Buildings.Fluid.He...Performance data

Connectors

TypeNameDescription
input IntegerInputstageStage of coil, or 0/1 for variable-speed coil
input RealInputspeRatSpeed ratio
input RealInputm_flowAir mass flow rate
input RealInputTEvaInTemperature of air entering the cooling coil
input RealInputTConInOutside air dry bulb temperature for an air cooled condenser or wetbulb temperature for an evaporative cooled condenser [K]
output RealOutputEIREnergy Input Ratio
output RealOutputQ_flowTotal cooling capacity [W]
input RealInputmCon_flowWater mass flow rate at condensers for water-cooled DX units

Modelica definition

partial block PartialCoilCondition "Partial block for dry and wet coil conditions" extends Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoilInterface; constant Boolean variableSpeedCoil "Flag, set to true for coil with variable speed"; replaceable Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.CoolingCapacityAirCooled cooCap constrainedby Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoolingCapacity ( sta=datCoi.sta, nSta=datCoi.nSta) "Performance data"; protected SpeedShift speShiEIR( final variableSpeedCoil=variableSpeedCoil, final nSta=nSta, final speSet=datCoi.sta.spe) "Interpolates EIR"; SpeedShift speShiQ_flow( final variableSpeedCoil=variableSpeedCoil, final nSta=nSta, final speSet=datCoi.sta.spe) "Interpolates Q_flow"; equation connect(cooCap.EIR, speShiEIR.u); connect(cooCap.Q_flow, speShiQ_flow.u); connect(speShiEIR.y, EIR); connect(speRat, speShiEIR.speRat); connect(speRat, speShiQ_flow.speRat); connect(speShiQ_flow.y, Q_flow); connect(stage, speShiQ_flow.stage); connect(speShiEIR.stage, stage); connect(cooCap.m_flow, m_flow); connect(cooCap.TConIn, TConIn); connect(cooCap.stage, stage); end PartialCoilCondition;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoilInterface Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoilInterface

Partial block for DX coil

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoilInterface

Information

This partial block declares the inputs and outputs that are common for Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DryCoil and Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DXCooling.

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block), Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.EssentialParameters (A partial block for essential parameters).

Parameters

TypeNameDefaultDescription
DXCoildatCoiredeclare parameter Building...Performance data
Booleanuse_mCon_flow Set to true to enable connector for the condenser mass flow rate

Connectors

TypeNameDescription
input IntegerInputstageStage of coil, or 0/1 for variable-speed coil
input RealInputspeRatSpeed ratio
input RealInputm_flowAir mass flow rate
input RealInputTEvaInTemperature of air entering the cooling coil
input RealInputTConInOutside air dry bulb temperature for an air cooled condenser or wetbulb temperature for an evaporative cooled condenser [K]
output RealOutputEIREnergy Input Ratio
output RealOutputQ_flowTotal cooling capacity [W]
input RealInputmCon_flowWater mass flow rate at condensers for water-cooled DX units

Modelica definition

partial block PartialCoilInterface "Partial block for DX coil" extends Modelica.Blocks.Icons.Block; extends Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.EssentialParameters; constant Boolean use_mCon_flow "Set to true to enable connector for the condenser mass flow rate"; Modelica.Blocks.Interfaces.IntegerInput stage "Stage of coil, or 0/1 for variable-speed coil"; Modelica.Blocks.Interfaces.RealInput speRat "Speed ratio"; Modelica.Blocks.Interfaces.RealInput m_flow "Air mass flow rate"; Modelica.Blocks.Interfaces.RealInput TEvaIn "Temperature of air entering the cooling coil"; Modelica.Blocks.Interfaces.RealInput TConIn( unit="K", displayUnit="degC") "Outside air dry bulb temperature for an air cooled condenser or wetbulb temperature for an evaporative cooled condenser"; Modelica.Blocks.Interfaces.RealOutput EIR "Energy Input Ratio"; Modelica.Blocks.Interfaces.RealOutput Q_flow( max=0, unit="W") "Total cooling capacity"; Modelica.Blocks.Interfaces.RealInput mCon_flow if use_mCon_flow "Water mass flow rate at condensers for water-cooled DX units"; end PartialCoilInterface;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoolingCapacity Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoolingCapacity

Calculates performance curve value at given temperature and mass flow rate

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoolingCapacity

Information

Cooling capacity modifiers

There are two cooling capacity modifier functions: The function capθ accounts for a performance change due to different temperatures at the condenser and evaporator and the function capFF accounts for a performance change due to different air flow rates at the evaporator, relative to the nominal condition. These cooling capacity modifiers are multiplied with nominal cooling capacity to obtain the cooling capacity of the coil at given inlet temperatures and mass flow rate. See Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.CoolingCapacityAirCooled.

The temperature dependent cooling capacity modifier function is

capθe,in, θc,in) = a1 + a2 θe,in + a3 θe,in 2 + a4 θc,in + a5 θc,in 2 + a6 θe,in θc,in,

where the six coefficients are obtained from the coil performance data record.

The flow fraction dependent cooling capacity modifier function is a polynomial with the normalized mass flow rate ff (flow fraction) at the evaporator as the time dependent variable. The normalized mass flow rate is defined as

ff = ṁ ⁄ ṁnom,

where is the mass flow rate at the evaporator and nom is the nominal mass flow rate. If the coil has multiple stages, then the nominal mass flow rate of the respective stage is used. Hence,

capFF(ff) = b1 + b2 ff + b3 ff2 + b4ff3 + ...

The coefficients of the equation are obtained from the coil performance data record.

It is important to specify limits of the flow fraction to ensure validity of the capFF(⋅) function in performance record. A non-zero value of capFF(0) will lead to an infinite large change in fluid temperatures because Q̇ ≠ 0 but ṁ = 0. Hence, when ṁ ≠ 0 is below the valid range of the flow modifier function, the coil capacity will be reduced and set to zero near ṁ = 0.

Energy Input Ratio (EIR) modifiers

The Energy Input Ratio (EIR) is the inverse of the Coefficient of Performance (COP). Similar to the cooling rate, the EIR of the coil is the product of a function that takes into account changes in condenser and evaporator inlet temperatures, and changes in mass flow rate.

As for the cooling rate, EIRθ(⋅, ⋅) is

EIRθe,in, θc,in) = c1 + c2 θe,in + c3 θe,in 2 + c4 θc,in + c5 θc,in 2 + c6 θe,in θc,in.

where the six coefficients are obtained from the coil performance data record, and θe,in is the dry-bulb temperature if the coil is dry, or the wet-bulb temperature otherwise.

Similar to the cooling ratio, the change in EIR due to a change in air mass flow rate is

EIRFF(ff) = d1 + d2 ff + d3 ff2 + d4ff3 + ...

Obtaining the polynomial coefficients

The package Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Examples.PerformanceCurves contains performance curves. Alternatively, users can enter their own performance curves by making an instance of a curve in Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Examples.PerformanceCurves and specifying custom coefficients for the above polynomials. The polynomial coefficients can be obtained by doing a curve fit that fits the polynomials to a set of data. The site http://www.scipy.org/Cookbook/FittingData shows examples for how to fit data. If a coil has multiple stages, then the fit need to be done for each stage. For variable frequency coils, multiple fits need to be done for user selected compressor speeds. For intermediate speeds, the performance data will be interpolated by the model Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.VariableSpeed.

The table below shows the polynomials explained above, the name of the polynomial coefficients in Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Examples.PerformanceCurves and the independent parameters against which the data need to be fitted.

Modelica name of coefficient in data record Polynomial of the above info section Parameters for curve fit
capFunT capθe,in, θc,in) = a1 + a2 θe,in + a3 θe,in 2 + a4 θc,in + a5 θc,in 2 + a6 θe,in θc,in capθ, θe,in, θc,in
capFunFF capFF(ff) = b1 + b2 ff + b3 ff2 + b4ff3 + ... capFF, ff
EIRFunT EIRθe,in, θc,in) = a1 + a2 θe,in + a3 θe,in 2 + a4 θc,in + a5 θc,in 2 + a6 θe,in θc,in EIRθ, θe,in, θc,in
EIRFunFF EIRFF(ff) = b1 + b2 ff + b3 ff2 + b4ff3 + ... EIRFF, ff

Note that for the above polynomials, the units for temperature is degree Celsius and not Kelvins.

Implementation

A parameter of the performance curve is the range of mass flow fraction ff for which the data are valid. Below this range, this model reduces the cooling capacity and the energy input ratio so that both are zero if ff < ffmin/4, where ffmin is the minimum flow fraction for which the performance curves are valid.

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

Parameters

TypeNameDefaultDescription
Booleanuse_mCon_flow Set to true to enable connector for the condenser mass flow rate
IntegernSta Number of coil stages (not counting the off stage)
Stagesta[nSta]redeclare parameter Building...Performance data for this stage

Connectors

TypeNameDescription
input IntegerInputstageStage of coil, or 0/1 for variable-speed coil
input RealInputTConInTemperature of air entering the condenser coil [K]
input RealInputm_flowAir mass flow rate at the evaporator [kg/s]
input RealInputTEvaInTemperature of air entering the evaporator (wet bulb for wet coil and dry bulb for dry coil) [K]
input RealInputmCon_flowWater mass flow rate at the condenser [kg/s]
output RealOutputQ_flow[nSta]Total cooling capacity [W]
output RealOutputEIR[nSta]Energy Input Ratio

Modelica definition

partial block PartialCoolingCapacity "Calculates performance curve value at given temperature and mass flow rate" extends Modelica.Blocks.Icons.Block; constant Boolean use_mCon_flow "Set to true to enable connector for the condenser mass flow rate"; Modelica.Blocks.Interfaces.IntegerInput stage(final min=0) "Stage of coil, or 0/1 for variable-speed coil"; Modelica.Blocks.Interfaces.RealInput TConIn( quantity="ThermodynamicTemperature", unit="K", displayUnit="degC") "Temperature of air entering the condenser coil "; Modelica.Blocks.Interfaces.RealInput m_flow( quantity="MassFlowRate", unit="kg/s") "Air mass flow rate at the evaporator"; Modelica.Blocks.Interfaces.RealInput TEvaIn( quantity="ThermodynamicTemperature", unit="K", displayUnit="degC") "Temperature of air entering the evaporator (wet bulb for wet coil and dry bulb for dry coil)"; Modelica.Blocks.Interfaces.RealInput mCon_flow( quantity="MassFlowRate", unit="kg/s") if use_mCon_flow "Water mass flow rate at the condenser"; parameter Integer nSta(min=1) "Number of coil stages (not counting the off stage)"; replaceable parameter Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.BaseClasses.Stage sta[nSta] constrainedby Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.BaseClasses.Stage "Performance data for this stage"; output Real[nSta] ff(each min=0) "Air flow fraction: ratio of actual air flow rate by rated mass flow rate"; Modelica.Blocks.Interfaces.RealOutput Q_flow[nSta]( each max=0, each unit="W") "Total cooling capacity"; Modelica.Blocks.Interfaces.RealOutput EIR[nSta](each min=0) "Energy Input Ratio"; //------------------------------Cooling capacity---------------------------------// Real cap_T[nSta](each min=0, each nominal=1, each start=1) "Cooling capacity modification factor as a function of temperature"; Real cap_FF[nSta](each min=0, each nominal=1, each start=1) "Cooling capacity modification factor as a function of flow fraction"; //----------------------------Energy Input Ratio---------------------------------// Real EIR_T[nSta](each min=0, each nominal=1, each start=1) "EIR modification factor as a function of temperature"; Real EIR_FF[nSta](each min=0, each nominal=1, each start=1) "EIR modification factor as a function of flow fraction"; Real corFac[nSta](each min=0, each max=1, each nominal=1, each start=1) "Correction factor that is one inside the valid flow fraction, and attains zero below the valid flow fraction"; protected final parameter Modelica.SIunits.MassFlowRate m_flow_small = 1E-4 * sta[nSta].nomVal.m_flow_nominal "Small mass flow rate for regularization"; Boolean checkBoundsTEva[nSta] "Flag, used to check for out of bounds data"; Boolean checkBoundsTCon[nSta] "Flag, used to check for out of bounds data"; initial algorithm // Verify correctness of performance curves, and write warning if error is bigger than 10% for iSta in 1:nSta loop Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Functions.warnIfPerformanceOutOfBounds( Buildings.Utilities.Math.Functions.biquadratic( a=sta[iSta].perCur.capFunT, x1=Modelica.SIunits.Conversions.to_degC(sta[iSta].nomVal.TEvaIn_nominal), x2=Modelica.SIunits.Conversions.to_degC(sta[iSta].nomVal.TConIn_nominal)), msg="Capacity as a function of temperature ", curveName="sta[" + String(iSta) + "].perCur.capFunT"); Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Functions.warnIfPerformanceOutOfBounds( Buildings.Fluid.Utilities.extendedPolynomial( x=1, c=sta[iSta].perCur.capFunFF, xMin=sta[iSta].perCur.ffMin, xMax=sta[iSta].perCur.ffMin), msg="Capacity as a function of normalized mass flow rate ", curveName="sta[" + String(iSta) + "].perCur.capFunFF"); Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Functions.warnIfPerformanceOutOfBounds( Buildings.Utilities.Math.Functions.biquadratic( a=sta[iSta].perCur.EIRFunT, x1=Modelica.SIunits.Conversions.to_degC(sta[iSta].nomVal.TEvaIn_nominal), x2=Modelica.SIunits.Conversions.to_degC(sta[iSta].nomVal.TConIn_nominal)), msg="EIR as a function of temperature ", curveName="sta[" + String(iSta) + "].perCur.EIRFunT"); Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Functions.warnIfPerformanceOutOfBounds( Buildings.Fluid.Utilities.extendedPolynomial( x=1, c=sta[iSta].perCur.EIRFunFF, xMin=sta[iSta].perCur.ffMin, xMax=sta[iSta].perCur.ffMin), msg="EIR as a function of normalized mass flow rate ", curveName="sta[" + String(iSta) + "].perCur.EIRFunFF"); end for; for iSta in 1:nSta loop checkBoundsTEva[iSta] :=true; checkBoundsTCon[iSta] :=true; end for; equation // Modelica requires to evaluate the when() block for each element in iSta=1...nSta. // But we only want to check the stage that is currently running. // Hence, the test starts with stage == iSta. for iSta in 1:nSta loop // Check whether data are outside of bounds when ( stage == iSta and pre(checkBoundsTEva[stage])) then assert( not (TEvaIn > sta[stage].perCur.TEvaInMax or TEvaIn < sta[stage].perCur.TEvaInMin), "*** Warning: Evaporator temperature TEvaIn is out of bounds in DX coil model at time = " + String(time) + ". stage = " + String(iSta) + " TEvaInMin = " + String(sta[iSta].perCur.TEvaInMin) + " Kelvin (" + String(Modelica.SIunits.Conversions.to_degC(sta[iSta].perCur.TEvaInMin)) + " degC) TEvaIn = " + String(TEvaIn) + " Kelvin (" + String(Modelica.SIunits.Conversions.to_degC(TEvaIn)) + " degC) TEvaInMax = " + String(sta[iSta].perCur.TEvaInMax) + " Kelvin (" + String(Modelica.SIunits.Conversions.to_degC(sta[iSta].perCur.TEvaInMax)) + " degC) Extrapolation can introduce large errors. This warning will only be reported once for each stage.", level = AssertionLevel.warning); checkBoundsTEva[iSta] = false; end when; when ( stage == iSta and pre(checkBoundsTCon[stage])) then assert( not ( TConIn > sta[stage].perCur.TConInMax or TConIn < sta[stage].perCur.TConInMin), "*** Warning: Condenser temperature TConIn is out of bounds in DX coil model at time = " + String(time) + ". stage = " + String(iSta) + " TConInMin = " + String(sta[iSta].perCur.TConInMin) + " Kelvin (" + String(Modelica.SIunits.Conversions.to_degC(sta[iSta].perCur.TConInMin)) + " degC) TConIn = " + String(TConIn) + " Kelvin (" + String(Modelica.SIunits.Conversions.to_degC(TConIn)) + " degC) TConInMax = " + String(sta[iSta].perCur.TConInMax) + " Kelvin (" + String(Modelica.SIunits.Conversions.to_degC(sta[iSta].perCur.TConInMax)) + " degC) Extrapolation can introduce large errors. This warning will only be reported once for each stage.", level = AssertionLevel.warning); checkBoundsTCon[iSta] = false; end when; end for; if stage > 0 then for iSta in 1:nSta loop // Compute performance ff[iSta]=Buildings.Utilities.Math.Functions.smoothMax( x1=m_flow, x2=m_flow_small, deltaX=m_flow_small/10)/sta[iSta].nomVal.m_flow_nominal; //-------------------------Cooling capacity modifiers----------------------------// // Compute the DX coil capacity fractions, using a biquadratic curve. // Since the regression for capacity can have negative values // (for unreasonable temperatures), we constrain its return value to be // non-negative. cap_T[iSta] =Buildings.Utilities.Math.Functions.smoothMax( x1=Buildings.Utilities.Math.Functions.biquadratic( a=sta[iSta].perCur.capFunT, x1=Modelica.SIunits.Conversions.to_degC(TEvaIn), x2=Modelica.SIunits.Conversions.to_degC(TConIn)), x2=0.001, deltaX=0.0001) "Cooling capacity modification factor as function of temperature"; cap_FF[iSta] = Buildings.Fluid.Utilities.extendedPolynomial( x=ff[iSta], c=sta[iSta].perCur.capFunFF, xMin=sta[iSta].perCur.ffMin, xMax=sta[iSta].perCur.ffMin); //-----------------------Energy Input Ratio modifiers--------------------------// EIR_T[iSta] =Buildings.Utilities.Math.Functions.smoothMax( x1=Buildings.Utilities.Math.Functions.biquadratic( a=sta[iSta].perCur.EIRFunT, x1=Modelica.SIunits.Conversions.to_degC(TEvaIn), x2=Modelica.SIunits.Conversions.to_degC(TConIn)), x2=0.001, deltaX=0.0001); EIR_FF[iSta] = Buildings.Fluid.Utilities.extendedPolynomial( x=ff[iSta], c=sta[iSta].perCur.EIRFunFF, xMin=sta[iSta].perCur.ffMin, xMax=sta[iSta].perCur.ffMin) "Cooling capacity modification factor as function of flow fraction"; //------------ Correction factor for flow rate outside of validity of data ---// corFac[iSta] =Buildings.Utilities.Math.Functions.smoothHeaviside( x=ff[iSta] - sta[iSta].perCur.ffMin/4, delta=max(Modelica.Constants.eps, sta[iSta].perCur.ffMin/4)); end for; else //cooling coil off ff = fill(0, nSta); cap_T = fill(0, nSta); cap_FF = fill(0, nSta); EIR_T = fill(0, nSta); EIR_FF = fill(0, nSta); corFac = fill(0, nSta); end if; end PartialCoolingCapacity;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialDXCoil Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialDXCoil

Partial model for DX coil

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialDXCoil

Information

This partial model is the base class for Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.SingleSpeed Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.MultiStage and Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.VariableSpeed.

See Buildings.Fluid.HeatExchangers.DXCoils.UsersGuide for an explanation of the model.

Extends from Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.EssentialParameters (A partial block for essential parameters), Buildings.Fluid.Interfaces.TwoPortHeatMassExchanger (Partial model transporting one fluid stream with storing mass or energy).

Parameters

TypeNameDefaultDescription
DXCoildatCoiredeclare parameter Building...Performance data
replaceable package MediumPartialMediumMedium in the component
Booleanuse_mCon_flow Set to true to enable connector for the condenser mass flow rate
StringsubstanceName"water"Name of species substance
Nominal condition
MassFlowRatem_flow_nominaldatCoi.sta[nSta].nomVal.m_fl...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
Moisture balance
BooleancomputeReevaporationtrueSet to true to compute reevaporation of water that accumulated on coil
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
replaceable package MediumMedium in the component
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)
input RealInputTConInOutside air dry bulb temperature for an air cooled condenser or wetbulb temperature for an evaporative cooled condenser [K]
input RealInputmCon_flowWater mass flow rate for condenser [kg/s]
output RealOutputPElectrical power consumed by the unit [W]
output RealOutputQSen_flowSensible heat flow rate [W]
output RealOutputQLat_flowLatent heat flow rate [W]

Modelica definition

partial model PartialDXCoil "Partial model for DX coil" extends Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.EssentialParameters; extends Buildings.Fluid.Interfaces.TwoPortHeatMassExchanger( redeclare replaceable package Medium = Modelica.Media.Interfaces.PartialCondensingGases, redeclare final Buildings.Fluid.MixingVolumes.MixingVolumeMoistAir vol( prescribedHeatFlowRate=true), final m_flow_nominal = datCoi.sta[nSta].nomVal.m_flow_nominal); constant Boolean use_mCon_flow "Set to true to enable connector for the condenser mass flow rate"; parameter String substanceName="water" "Name of species substance"; Modelica.Blocks.Interfaces.RealInput TConIn( unit="K", displayUnit="degC") "Outside air dry bulb temperature for an air cooled condenser or wetbulb temperature for an evaporative cooled condenser"; Modelica.Blocks.Interfaces.RealInput mCon_flow( quantity="MassFlowRate", unit="kg/s") if use_mCon_flow "Water mass flow rate for condenser"; Modelica.Blocks.Interfaces.RealOutput P( quantity="Power", unit="W") "Electrical power consumed by the unit"; Modelica.Blocks.Interfaces.RealOutput QSen_flow(quantity="Power", unit="W") "Sensible heat flow rate"; Modelica.Blocks.Interfaces.RealOutput QLat_flow(quantity="Power", unit="W") "Latent heat flow rate"; Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DXCooling dxCoo( redeclare final package Medium = Medium, datCoi=datCoi, use_mCon_flow=use_mCon_flow, wetCoi(redeclare replaceable Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.CoolingCapacityAirCooled cooCap), dryCoi(redeclare replaceable Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.CoolingCapacityAirCooled cooCap)) "DX cooling coil operation"; Evaporation eva(redeclare final package Medium = Medium, nomVal=datCoi.sta[nSta].nomVal, final computeReevaporation = computeReevaporation) "Model that computes evaporation of water that accumulated on the coil surface"; parameter Boolean computeReevaporation=true "Set to true to compute reevaporation of water that accumulated on coil"; // Flow reversal is not needed. Also, if ff < ffMin/4, then // Q_flow and EIR are set the zero. Hence, it is safe to assume // forward flow, which will avoid an event protected parameter Integer i_x(fixed=false) "Index of substance"; Modelica.SIunits.SpecificEnthalpy hEvaIn= inStream(port_a.h_outflow) "Enthalpy of air entering the cooling coil"; Modelica.SIunits.Temperature TEvaIn = Medium.temperature_phX(p=port_a.p, h=hEvaIn, X=XEvaIn) "Dry bulb temperature of air entering the cooling coil"; Modelica.SIunits.MassFraction XEvaIn[Medium.nXi] = inStream(port_a.Xi_outflow) "Mass fraction/absolute humidity of air entering the cooling coil"; Modelica.Blocks.Sources.RealExpression p(final y=port_a.p) "Inlet air pressure"; Modelica.Blocks.Sources.RealExpression X(final y=XEvaIn[i_x]) "Inlet air mass fraction"; Modelica.Blocks.Sources.RealExpression T(final y=TEvaIn) "Inlet air temperature"; Modelica.Blocks.Sources.RealExpression m(final y=port_a.m_flow) "Inlet air mass flow rate"; Modelica.Blocks.Sources.RealExpression h(final y=hEvaIn) "Inlet air specific enthalpy"; Buildings.HeatTransfer.Sources.PrescribedHeatFlow q "Heat extracted by coil"; BaseClasses.InputPower pwr "Electrical power consumed by the unit"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor TVol "Temperature of the control volume"; initial algorithm // Make sure that |Q_flow_nominal[nSta]| >= |Q_flow_nominal[i]| for all stages because the data // of nSta are used in the evaporation model for i in 1:(nSta-1) loop assert(datCoi.sta[i].nomVal.Q_flow_nominal >= datCoi.sta[nSta].nomVal.Q_flow_nominal, "Error in DX coil performance data: Q_flow_nominal of the highest stage must have the biggest value in magnitude. Obtained " + Modelica.Math.Vectors.toString( {datCoi.sta[i].nomVal.Q_flow_nominal for i in 1:nSta}, "Q_flow_nominal")); end for; // Compute index of species vector that carries the substance name i_x :=-1; for i in 1:Medium.nXi loop if Modelica.Utilities.Strings.isEqual(string1=Medium.substanceNames[i], string2=substanceName, caseSensitive=false) then i_x :=i; end if; end for; assert(i_x > 0, "Substance '" + substanceName + "' is not present in medium '" + Medium.mediumName + "'.\n" + "Change medium model to one that has '" + substanceName + "' as a substance."); equation connect(TConIn, dxCoo.TConIn); connect(m.y, dxCoo.m_flow); connect(T.y, dxCoo.TEvaIn); connect(p.y, dxCoo.p); connect(X.y, dxCoo.XEvaIn); connect(h.y, dxCoo.hEvaIn); connect(dxCoo.EIR, pwr.EIR); connect(dxCoo.Q_flow, pwr.Q_flow); connect(dxCoo.SHR, pwr.SHR); connect(q.port, vol.heatPort); connect(pwr.P, P); connect(dxCoo.Q_flow, q.Q_flow); connect(eva.mWat_flow, dxCoo.mWat_flow); connect(m.y, eva.mAir_flow); connect(TVol.port, q.port); connect(pwr.QSen_flow, QSen_flow); connect(pwr.QLat_flow, QLat_flow); connect(eva.mTotWat_flow, vol.mWat_flow); connect(TVol.T, eva.TEvaOut); connect(vol.X_w, eva.XEvaOut); connect(mCon_flow, dxCoo.mCon_flow); end PartialDXCoil;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialSurfaceCondition Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialSurfaceCondition

Partial block for apparatus dew and dry point calculation

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialSurfaceCondition

Information

This partial block is the base class for Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.ApparatusDewPoint and Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.ApparatusDryPoint.

This block calculates the UA/cp value, the bypass factor and the enthalpy difference across the coil. It uses the function Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Functions.speedShift for intermediate compressor speeds.

Implementation

For coils that only have discrete compressor speeds, this block does not do an interpolation for intermediate speeds. For coils with variable speed compressors, the computations are also done if the coil is off, as this ensures that the derivatives are continuous near the off conditions.

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block), Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.EssentialParameters (A partial block for essential parameters).

Parameters

TypeNameDefaultDescription
DXCoildatCoiredeclare parameter Building...Performance data
replaceable package MediumModelica.Media.Interfaces.Pa...Medium model
BooleanvariableSpeedCoil Flag, set to true to interpolate data

Connectors

TypeNameDescription
replaceable package MediumMedium model
input RealInputspeRatSpeed index
input RealInputQ_flowCooling capacity of the coil [W]
input RealInputm_flowEvaporator air mass flow rate [kg/s]
input RealInputpEvaporator air static pressure [Pa]
input RealInputXEvaInEvaporator inlet air mass fraction
input RealInputhEvaInEvaporator air inlet specific enthalpy [J/kg]
input IntegerInputstageStage of coil, or 0/1 for variable-speed coil

Modelica definition

partial block PartialSurfaceCondition "Partial block for apparatus dew and dry point calculation" extends Modelica.Blocks.Icons.Block; extends Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.EssentialParameters; replaceable package Medium = Modelica.Media.Interfaces.PartialCondensingGases "Medium model"; constant Boolean variableSpeedCoil "Flag, set to true to interpolate data"; final parameter Modelica.SIunits.MassFlowRate m_flow_small = datCoi.m_flow_small "Small mass flow rate for the evaporator, used for regularization"; final parameter Modelica.SIunits.AngularVelocity maxSpe(displayUnit="1/min")= datCoi.sta[nSta].spe "Maximum rotational speed"; Modelica.Blocks.Interfaces.RealInput speRat "Speed index"; Modelica.Blocks.Interfaces.RealInput Q_flow( quantity="Power", unit="W") "Cooling capacity of the coil"; Modelica.Blocks.Interfaces.RealInput m_flow( quantity="MassFlowRate", unit="kg/s") "Evaporator air mass flow rate"; Modelica.Blocks.Interfaces.RealInput p( quantity="Pressure", unit="Pa") "Evaporator air static pressure"; Modelica.Blocks.Interfaces.RealInput XEvaIn "Evaporator inlet air mass fraction"; //(start=0.005, min=0, max=1.0) Modelica.Blocks.Interfaces.RealInput hEvaIn( quantity="SpecificEnergy", unit="J/kg") "Evaporator air inlet specific enthalpy"; Modelica.Blocks.Interfaces.IntegerInput stage "Stage of coil, or 0/1 for variable-speed coil"; output Real bypass( start=0.25, min=0, max=1.0) "Bypass factor"; output Modelica.SIunits.AngularVelocity spe(displayUnit="1/min") "Rotational speed"; Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.UACp uacp[nSta]( per=datCoi.sta.nomVal, redeclare final package Medium = Medium) "Calculates UA/Cp of the coil"; protected output Modelica.SIunits.MassFlowRate m_flow_nonzero "Evaporator air mass flow rate, bounded away from zero"; output Modelica.SIunits.SpecificEnthalpy delta_h( start=40000, min=0.0) "Enthalpy required to be removed from the inlet air to attain apparatus dry point condition"; output Real UAcp( min=0, fixed=false) "UA/Cp of coil"; equation if variableSpeedCoil or stage <> 0 then // Small mass flow rate to avoid division by zero m_flow_nonzero = Buildings.Utilities.Math.Functions.smoothMax( x1=m_flow, x2=m_flow_small, deltaX=0.1*m_flow_small); spe = speRat*maxSpe; UAcp = if variableSpeedCoil then Buildings.Utilities.Math.Functions.smoothMax( x1=Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Functions.speedShift( spe=spe, speSet={datCoi.sta[iSpe].spe for iSpe in 1:nSta}, u={uacp[iSpe].UAcp for iSpe in 1:nSta}), x2=uacp[nSta].UAcp/1E3, deltaX=uacp[nSta].UAcp/1E4) else uacp[stage].UAcp; bypass = Buildings.Utilities.Math.Functions.smoothLimit( x = Modelica.Math.exp(-UAcp / m_flow_nonzero), l = 0.01, u = 0.99, deltaX = 0.001); delta_h = Buildings.Utilities.Math.Functions.smoothMin( x1=-Q_flow/m_flow_nonzero/(1 - bypass), x2=0.999*hEvaIn, deltaX=0.0001); else m_flow_nonzero = 0; spe = 0; UAcp = 0; bypass = 0; delta_h = 0; end if; end PartialSurfaceCondition;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialWaterCooledDXCoil Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialWaterCooledDXCoil

Base class for water-cooled DX coils

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialWaterCooledDXCoil

Information

This model can be used to simulate a water-cooled DX cooling coil with single speed compressor.

See Buildings.Fluid.HeatExchangers.DXCoils.UsersGuide for an explanation of the model.

Extends from Buildings.BaseClasses.BaseIcon (Base icon), Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.EssentialParameters (A partial block for essential parameters).

Parameters

TypeNameDefaultDescription
replaceable package MediumEvaModelica.Media.Interfaces.Pa...Medium for evaporator
replaceable package MediumConModelica.Media.Interfaces.Pa...Medium for condenser
BooleancomputeReevaporationtrueSet to true to compute reevaporation of water that accumulated on coil
PartialDXCoilevaredeclare Buildings.Fluid.He...Direct evaporative coil
Nominal condition
PressureDifferencedpEva_nominal Pressure difference over evaporator at nominal flow rate [Pa]
PressureDifferencedpCon_nominal Pressure difference over condenser at nominal flow rate [Pa]
Assumptions
BooleanallowFlowReversalEvatrue= false to simplify equations, assuming, but not enforcing, no flow reversal for evaporator
BooleanallowFlowReversalContrue= false to simplify equations, assuming, but not enforcing, no flow reversal for condenser
Flow resistance
Condenser
Booleanfrom_dpEvafalse= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistanceEvafalse= true, use linear relation between m_flow and dp for any flow rate
RealdeltaMEva0.1Fraction of nominal flow rate where flow transitions to laminar [1]
Evaporator
Booleanfrom_dpConfalse= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistanceConfalse= true, use linear relation between m_flow and dp for any flow rate
RealdeltaMCon0.1Fraction of nominal flow rate where flow transitions to laminar [1]
Dynamics
Condenser
TimetauEva60Time constant at nominal flow rate (used if energyDynamics <> Modelica.Fluid.Types.Dynamics.SteadyState) [s]
Evaporator
TimetauCon60Time constant at nominal flow rate (used if energyDynamics <> Modelica.Fluid.Types.Dynamics.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
Medium 1
AbsolutePressurepEva_startMediumEva.p_defaultStart value of pressure [Pa]
TemperatureTEva_startMediumEva.T_defaultStart value of temperature [K]
MassFractionXEva_start[MediumEva.nX]MediumEva.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyCEva_start[MediumEva.nC]fill(0, MediumEva.nC)Start value of trace substances
ExtraPropertyCEva_nominal[MediumEva.nC]fill(1E-2, MediumEva.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Medium 2
AbsolutePressurepCon_startMediumCon.p_defaultStart value of pressure [Pa]
TemperatureTCon_startMediumCon.T_defaultStart value of temperature [K]
MassFractionXCon_start[MediumCon.nX]MediumCon.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyCCon_start[MediumCon.nC]fill(0, MediumCon.nC)Start value of trace substances
ExtraPropertyCCon_nominal[MediumCon.nC]fill(1E-2, MediumCon.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Advanced
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed

Connectors

TypeNameDescription
replaceable package MediumEvaMedium for evaporator
replaceable package MediumConMedium for condenser
output RealOutputPElectrical power consumed by the unit [W]
output RealOutputQEvaSen_flowSensible heat flow rate in evaporators [W]
output RealOutputQEvaLat_flowLatent heat flow rate in evaporators [W]
FluidPort_aport_aFluid connector for evaporator inlet (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_bFluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aportCon_aFluid connector a of condenser (positive design flow direction is from port_a2 to port_b2)
FluidPort_bportCon_bFluid connector b of condenser (positive design flow direction is from port_a2 to port_b2)

Modelica definition

model PartialWaterCooledDXCoil "Base class for water-cooled DX coils" extends Buildings.BaseClasses.BaseIcon; extends Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.EssentialParameters ( redeclare Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.DXCoil datCoi); replaceable package MediumEva = Modelica.Media.Interfaces.PartialMedium "Medium for evaporator"; replaceable package MediumCon = Modelica.Media.Interfaces.PartialMedium "Medium for condenser"; constant Boolean homotopyInitialization = true "= true, use homotopy method"; parameter Boolean allowFlowReversalEva = true "= false to simplify equations, assuming, but not enforcing, no flow reversal for evaporator"; parameter Boolean allowFlowReversalCon = true "= false to simplify equations, assuming, but not enforcing, no flow reversal for condenser"; parameter Modelica.SIunits.PressureDifference dpEva_nominal(displayUnit="Pa") "Pressure difference over evaporator at nominal flow rate"; parameter Modelica.SIunits.PressureDifference dpCon_nominal(displayUnit="Pa") "Pressure difference over condenser at nominal flow rate"; parameter Boolean from_dpEva=false "= true, use m_flow = f(dp) else dp = f(m_flow)"; parameter Boolean from_dpCon=false "= true, use m_flow = f(dp) else dp = f(m_flow)"; parameter Boolean linearizeFlowResistanceEva=false "= true, use linear relation between m_flow and dp for any flow rate"; parameter Boolean linearizeFlowResistanceCon=false "= true, use linear relation between m_flow and dp for any flow rate"; parameter Real deltaMEva(final unit="1")=0.1 "Fraction of nominal flow rate where flow transitions to laminar"; parameter Real deltaMCon(final unit="1")=0.1 "Fraction of nominal flow rate where flow transitions to laminar"; parameter Modelica.SIunits.Time tauEva=60 "Time constant at nominal flow rate (used if energyDynamics <> Modelica.Fluid.Types.Dynamics.SteadyState)"; parameter Modelica.SIunits.Time tauCon=60 "Time constant at nominal flow rate (used if energyDynamics <> Modelica.Fluid.Types.Dynamics.SteadyState)"; parameter Boolean computeReevaporation=true "Set to true to compute reevaporation of water that accumulated on coil"; // Initialization parameter MediumEva.AbsolutePressure pEva_start = MediumEva.p_default "Start value of pressure"; parameter MediumEva.Temperature TEva_start = MediumEva.T_default "Start value of temperature"; parameter MediumEva.MassFraction XEva_start[MediumEva.nX] = MediumEva.X_default "Start value of mass fractions m_i/m"; parameter MediumEva.ExtraProperty CEva_start[MediumEva.nC]( final quantity=MediumEva.extraPropertiesNames)=fill(0, MediumEva.nC) "Start value of trace substances"; parameter MediumEva.ExtraProperty CEva_nominal[MediumEva.nC]( final quantity=MediumEva.extraPropertiesNames) = fill(1E-2, MediumEva.nC) "Nominal value of trace substances. (Set to typical order of magnitude.)"; parameter MediumCon.AbsolutePressure pCon_start = MediumCon.p_default "Start value of pressure"; parameter MediumCon.Temperature TCon_start = MediumCon.T_default "Start value of temperature"; parameter MediumCon.MassFraction XCon_start[MediumCon.nX] = MediumCon.X_default "Start value of mass fractions m_i/m"; parameter MediumCon.ExtraProperty CCon_start[MediumCon.nC]( final quantity=MediumCon.extraPropertiesNames)=fill(0, MediumCon.nC) "Start value of trace substances"; parameter MediumCon.ExtraProperty CCon_nominal[MediumCon.nC]( final quantity=MediumCon.extraPropertiesNames) = fill(1E-2, MediumCon.nC) "Nominal value of trace substances. (Set to typical order of magnitude.)"; // Assumptions parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.DynamicFreeInitial "Type of energy balance: dynamic (3 initialization options) or steady state"; parameter Modelica.Fluid.Types.Dynamics massDynamics=energyDynamics "Type of mass balance: dynamic (3 initialization options) or steady state"; // Diagnostics parameter Boolean show_T = false "= true, if actual temperature at port is computed"; Modelica.Blocks.Interfaces.RealOutput P(quantity="Power", unit="W") "Electrical power consumed by the unit"; Modelica.Blocks.Interfaces.RealOutput QEvaSen_flow(quantity="Power", unit="W") "Sensible heat flow rate in evaporators"; Modelica.Blocks.Interfaces.RealOutput QEvaLat_flow(quantity="Power", unit="W") "Latent heat flow rate in evaporators"; // Ports Modelica.Fluid.Interfaces.FluidPort_a port_a( redeclare final package Medium = MediumEva, m_flow(min=if allowFlowReversalEva then -Modelica.Constants.inf else 0), h_outflow(start=MediumEva.h_default)) "Fluid connector for evaporator inlet (positive design flow direction is from port_a1 to port_b1)"; Modelica.Fluid.Interfaces.FluidPort_b port_b( redeclare final package Medium = MediumEva, m_flow(max=if allowFlowReversalEva then +Modelica.Constants.inf else 0), h_outflow(start=MediumEva.h_default)) "Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)"; Modelica.Fluid.Interfaces.FluidPort_a portCon_a( redeclare final package Medium = MediumCon, m_flow(min=if allowFlowReversalCon then -Modelica.Constants.inf else 0), h_outflow(start=MediumCon.h_default)) "Fluid connector a of condenser (positive design flow direction is from port_a2 to port_b2)"; Modelica.Fluid.Interfaces.FluidPort_b portCon_b( redeclare final package Medium = MediumCon, m_flow(max=if allowFlowReversalCon then +Modelica.Constants.inf else 0), h_outflow(start=MediumCon.h_default)) "Fluid connector b of condenser (positive design flow direction is from port_a2 to port_b2)"; // Components replaceable Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialDXCoil eva constrainedby Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialDXCoil ( redeclare final package Medium = MediumEva, final use_mCon_flow=true, final dp_nominal=dpEva_nominal, final allowFlowReversal=allowFlowReversalEva, final show_T=false, final from_dp=from_dpEva, final linearizeFlowResistance=linearizeFlowResistanceEva, final deltaM=deltaMEva, final m_flow_small=mEva_flow_small, final tau=tauEva, final homotopyInitialization=homotopyInitialization, final energyDynamics=energyDynamics, final massDynamics=massDynamics, final p_start=pEva_start, final T_start=TEva_start, final X_start=XEva_start, final C_start=CEva_start, final computeReevaporation=computeReevaporation, dxCoo(redeclare final Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.DXCoil datCoi=datCoi, wetCoi(redeclare final Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.CoolingCapacityWaterCooled cooCap, redeclare final Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.DXCoil datCoi=datCoi, appDewPt(redeclare final Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.DXCoil datCoi=datCoi, uacp(redeclare final Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.BaseClasses.NominalValues per))), dryCoi(redeclare final Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.CoolingCapacityWaterCooled cooCap, redeclare final Buildings.Fluid.HeatExchangers.DXCoils.WaterCooled.Data.Generic.DXCoil datCoi=datCoi)), eva(final nomVal=Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.BaseClasses.NominalValues( Q_flow_nominal=datCoi.sta[nSta].nomVal.Q_flow_nominal, COP_nominal=datCoi.sta[nSta].nomVal.COP_nominal, SHR_nominal=datCoi.sta[nSta].nomVal.SHR_nominal, m_flow_nominal=datCoi.sta[nSta].nomVal.m_flow_nominal, TEvaIn_nominal=datCoi.sta[nSta].nomVal.TEvaIn_nominal, TConIn_nominal=datCoi.sta[nSta].nomVal.TConIn_nominal, phiIn_nominal=datCoi.sta[nSta].nomVal.phiIn_nominal, p_nominal=datCoi.sta[nSta].nomVal.p_nominal, tWet= datCoi.sta[nSta].nomVal.tWet, gamma=datCoi.sta[nSta].nomVal.gamma))) "Direct evaporative coil"; Buildings.Fluid.HeatExchangers.HeaterCooler_u watCooCon( redeclare package Medium=MediumCon, final m_flow_nominal = datCoi.sta[nSta].nomVal.mCon_flow_nominal, final Q_flow_nominal=-datCoi.sta[nSta].nomVal.Q_flow_nominal*(1+1/datCoi.sta[nSta].nomVal.COP_nominal), final allowFlowReversal=allowFlowReversalCon, final show_T=false, final from_dp=from_dpCon, final linearizeFlowResistance=linearizeFlowResistanceCon, final dp_nominal = dpCon_nominal, final deltaM=deltaMCon, final m_flow_small=mCon_flow_small, final tau=tauCon, final homotopyInitialization=homotopyInitialization, final energyDynamics=energyDynamics, final massDynamics=massDynamics, final p_start=pCon_start, final T_start=TCon_start, final X_start=XCon_start, final C_start=CCon_start) "Water-cooled condenser"; // Variables Modelica.SIunits.Temperature TConEnt= MediumCon.temperature(MediumCon.setState_phX(portCon_a.p, inStream(portCon_a.h_outflow))) "Temperature of fluid entering the condenser"; MediumEva.ThermodynamicState sta_a1=MediumEva.setState_phX( port_a.p, noEvent(actualStream(port_a.h_outflow)), noEvent(actualStream(port_a.Xi_outflow))) if show_T "Medium properties in port_a1"; MediumEva.ThermodynamicState sta_b1=MediumEva.setState_phX( port_b.p, noEvent(actualStream(port_b.h_outflow)), noEvent(actualStream(port_b.Xi_outflow))) if show_T "Medium properties in port_b1"; MediumCon.ThermodynamicState sta_a2=MediumCon.setState_phX( portCon_a.p, noEvent(actualStream(portCon_a.h_outflow)), noEvent(actualStream(portCon_a.Xi_outflow))) if show_T "Medium properties in port_a2"; MediumCon.ThermodynamicState sta_b2=MediumCon.setState_phX( portCon_b.p, noEvent(actualStream(portCon_b.h_outflow)), noEvent(actualStream(portCon_b.Xi_outflow))) if show_T "Medium properties in port_b2"; protected final parameter MediumEva.MassFlowRate mEva_flow_small(min=0) = datCoi.m_flow_small "Small mass flow rate for regularization of zero flow at evaporator"; parameter MediumCon.MassFlowRate mCon_flow_small(min=0) = 1E-4*abs(datCoi.sta[nSta].nomVal.mCon_flow_nominal) "Small mass flow rate for regularization of zero flow at condenser"; Modelica.Blocks.Sources.RealExpression u(final y=(-eva.dxCoo.Q_flow + eva.P)/( -datCoi.sta[nSta].nomVal.Q_flow_nominal*(1 + 1/datCoi.sta[nSta].nomVal.COP_nominal))) "Signal of total heat flow removed by condenser"; Sensors.MassFlowRate senMasFloCon(redeclare final package Medium = MediumCon) "Mass flow through condenser"; Modelica.Blocks.Sources.RealExpression TConEntWat(final y=TConEnt) "Temperature of water entering condenser"; initial equation assert(homotopyInitialization, "In " + getInstanceName() + ": The constant homotopyInitialization has been modified from its default value. This constant will be removed in future releases.", level = AssertionLevel.warning); equation connect(u.y, watCooCon.u); connect(eva.port_b, port_b); connect(eva.port_a, port_a); connect(watCooCon.port_b, portCon_b); connect(eva.P, P); connect(eva.QSen_flow, QEvaSen_flow); connect(eva.QLat_flow, QEvaLat_flow); connect(watCooCon.port_a, senMasFloCon.port_b); connect(senMasFloCon.m_flow, eva.mCon_flow); connect(TConEntWat.y, eva.TConIn); connect(portCon_a, senMasFloCon.port_a); end PartialWaterCooledDXCoil;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.SensibleHeatRatio Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.SensibleHeatRatio

Calculates the sensible heat ratio

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.SensibleHeatRatio

Information

This block computes the sensible heat ratio.

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

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Medium model

Connectors

TypeNameDescription
replaceable package MediumMedium model
input BooleanInputonSet to true to enable compressor, or false to disable compressor
input RealInputpPressure at inlet of coil
input RealInputTEvaInTemperature of air entering the cooling coil
input RealInputXADPHumidity mass fraction of air at ADP
input RealInputhADPSpecific enthalpy of air at ADP [J/kg]
input RealInputhEvaInSpecific enthalpy of air entering the coil
output RealOutputSHRSensible Heat Ratio: Ratio of sensible heat load to total heat load

Modelica definition

block SensibleHeatRatio "Calculates the sensible heat ratio" extends Modelica.Blocks.Icons.Block; replaceable package Medium = Modelica.Media.Interfaces.PartialCondensingGases "Medium model"; Modelica.Blocks.Interfaces.BooleanInput on "Set to true to enable compressor, or false to disable compressor"; Modelica.Blocks.Interfaces.RealInput p "Pressure at inlet of coil"; Modelica.Blocks.Interfaces.RealInput TEvaIn "Temperature of air entering the cooling coil"; Modelica.Blocks.Interfaces.RealInput XADP( min=0, max=1.0) "Humidity mass fraction of air at ADP"; Modelica.Blocks.Interfaces.RealInput hADP( nominal=40000, quantity="SpecificEnergy", unit="J/kg") "Specific enthalpy of air at ADP"; Modelica.Blocks.Interfaces.RealInput hEvaIn "Specific enthalpy of air entering the coil"; Modelica.Blocks.Interfaces.RealOutput SHR( min=0, max=1.0) "Sensible Heat Ratio: Ratio of sensible heat load to total heat load"; protected Modelica.SIunits.SpecificEnthalpy h_TEvaIn_XADP "Enthalpy at inlet air temperature and humidity mass fraction at ADP"; Real entRat "Enthalpy ratio"; parameter Modelica.SIunits.SpecificEnthalpy epsH = 100 "Small value for enthalpy to avoid division by zero"; equation //===================================Sensible heat ratio calculation===========================================// //Coil on-off condition if on then //Calculate enthalpy at inlet air temperature and absolute humidity at ADP i.e. h_TEvaIn_wADP h_TEvaIn_XADP = Medium.specificEnthalpy_pTX( p=p, T=TEvaIn, X=cat(1, {XADP}, {1-XADP})); //Calculate Sensible Heat Ratio entRat = (h_TEvaIn_XADP - hADP)/ Buildings.Utilities.Math.Functions.smoothMax( x1 = epsH, x2 = hEvaIn - hADP, deltaX = 0.1*epsH); SHR = Buildings.Utilities.Math.Functions.smoothMin( x1=entRat, x2=0.999, deltaX=0.0001) "To restrict the value of SHR in case of zero mass flow rate or dry coil condition"; else //Coil off h_TEvaIn_XADP = 0; entRat = 1; SHR = 0; end if; end SensibleHeatRatio;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.SpeedSelect Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.SpeedSelect

Selects the lower specified speed ratio for multispeed model

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.SpeedSelect

Information

This blocks outputs the normalized speed of the compressor, whereas the highest stage is assigned a normalized speed of one, and all other stages are proportional to their actual speed.

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

Parameters

TypeNameDefaultDescription
IntegernSta Number of standard compressor speeds
RealspeSet[nSta] Array of standard compressor speeds

Connectors

TypeNameDescription
input IntegerInputstageStage of cooling coil (0: off, 1: first stage, 2: second stage...)
output RealOutputspeRatStandard speed ratio

Modelica definition

block SpeedSelect "Selects the lower specified speed ratio for multispeed model" extends Modelica.Blocks.Icons.Block; parameter Integer nSta(min=1) "Number of standard compressor speeds"; parameter Real speSet[nSta] "Array of standard compressor speeds"; Modelica.Blocks.Interfaces.IntegerInput stage "Stage of cooling coil (0: off, 1: first stage, 2: second stage...)"; Modelica.Blocks.Interfaces.RealOutput speRat "Standard speed ratio"; protected final parameter Real speRatNor[nSta]( each min=0, each max=1)={speSet[i]/speSet[nSta] for i in 1:nSta} "Array of normalized speed ratios for the compressor"; equation assert(stage >= 0 and stage <= nSta, "Compressor speed is out of range. Model has " + String(nSta) + " speeds, but received control signal " + String(stage)); speRat =if stage == 0 then 0 else speRatNor[stage]; end SpeedSelect;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.SpeedShift Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.SpeedShift

Interpolates values between speeds

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.SpeedShift

Information

This block uses the Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Functions.speedShift function to interpolate the input array. Depending on input speed ratio and speed set array the input array u is interpolated.

Parameters

TypeNameDefaultDescription
IntegernSta Number of standard compressor speeds
AngularVelocityspeSet[nSta] Compressor speeds [rad/s]
BooleanvariableSpeedCoil Flag, set to true to interpolate data

Connectors

TypeNameDescription
input RealInputspeRatSpeed ratio
input RealInputu[nSta]Array to be interpolated
output RealOutputyInterpolated value
input IntegerInputstageStage of coil, or 0/1 for variable-speed coil

Modelica definition

block SpeedShift "Interpolates values between speeds" parameter Integer nSta "Number of standard compressor speeds"; parameter Modelica.SIunits.AngularVelocity speSet[nSta](each displayUnit="1/min") "Compressor speeds"; constant Boolean variableSpeedCoil "Flag, set to true to interpolate data"; Modelica.Blocks.Interfaces.RealInput speRat "Speed ratio"; Modelica.Blocks.Interfaces.RealInput u[nSta] "Array to be interpolated"; Modelica.Blocks.Interfaces.RealOutput y "Interpolated value"; Modelica.Blocks.Interfaces.IntegerInput stage "Stage of coil, or 0/1 for variable-speed coil"; equation if variableSpeedCoil then y=Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Functions.speedShift( spe=speRat*speSet[nSta], speSet=speSet, u=u); else y = if stage == 0 then 0 else u[stage]; end if; end SpeedShift;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.UACp Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.UACp

Calculates UA/Cp of the coil

Information

This model calculates the UA/cp value and the bypass factor of the coil from the nominal inlet and outlet air properties. The nominal conditions are calculated using Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.NominalCondition.

For a heat exchanger where one medium changes phase, the NTU-ε relation is

ε = 1 - exp(-NTU) = 1-exp(-UA ⁄ cp ⁄ ṁ)

Since the bypass factor b is defined as b=1-ε, one can write

b = exp(-UA ⁄ cp ⁄ ṁ)

and, hence,

UA ⁄ cp = - ṁ log(b)

Extends from Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.NominalCondition (Calculates inlet and outlet fluid parameters at nominal condition), Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialCondensingGasesMedium model
NominalValuesperredeclare parameter Building...Performance data
SpecificHeatCapacityCp_nominalMedium.specificHeatCapacityC...Specific heat of air at specified nominal condition [J/(kg.K)]

Modelica definition

model UACp "Calculates UA/Cp of the coil" extends Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.NominalCondition; extends Modelica.Blocks.Icons.Block; constant Boolean homotopyInitialization = true "= true, use homotopy method"; final parameter Modelica.SIunits.MassFraction XADP_nominal( start=0.008, min=0, max=1.0, fixed=false) "Rated/Nominal mass fraction of air at coil apparatus dew point"; final parameter Modelica.SIunits.Temperature TADP_nominal( start=273.15+10, fixed=false) "Coil apparatus dew point temperature"; final parameter Modelica.SIunits.SpecificEnthalpy hADP_nominal( fixed=false) "Enthalpy of air at coil apparatus dew point (at rated condition)"; final parameter Real bypass_nominal( start=0.25, min=0, max=1.0, fixed=false) "Bypass factor for nominal condition"; final parameter Real UAcp( min=0, unit="kg/s", fixed=false) "UA/Cp of coil"; protected constant Real phiADP_nominal = 1.0 "Realtive humidity at ADP"; final parameter Modelica.SIunits.AbsolutePressure psat_ADP_nominal( start=1250, fixed=false) "Saturation pressure"; initial equation //------------------------Apparatus Dew Point (ADP) calculations---------------------// //Solve Eq. 1 , 2 and 3 for air properties (XADP_nominal and TADP_nominal) //of saturated air at coil apparatus dew point //---------------------------------------Eq.1---------------------------------------// (XEvaIn_nominal - XEvaOut_nominal)*(per.TEvaIn_nominal - TADP_nominal) =(XEvaIn_nominal - XADP_nominal)*(per.TEvaIn_nominal - TOut_nominal); //---------------------------------------Eq.2---------------------------------------// if homotopyInitialization then psat_ADP_nominal=homotopy( actual=Buildings.Utilities.Psychrometrics.Functions.saturationPressureLiquid(TADP_nominal), simplified=1252.393+83.933*(TADP_nominal-283.15)); else // do not use homotopy psat_ADP_nominal=Buildings.Utilities.Psychrometrics.Functions.saturationPressureLiquid(TADP_nominal); end if; // Taylor series // psat_ADP_nominal=1252.393+83.933*(TADP_nominal-283.15); // Non-linear equation // psat_ADP_nominal = Buildings.Utilities.Psychrometrics.Functions.saturationPressureLiquid(TADP_nominal); //---------------------------------------Eq.3---------------------------------------// if homotopyInitialization then XADP_nominal=homotopy( actual=Buildings.Utilities.Psychrometrics.Functions.X_pSatpphi( pSat=psat_ADP_nominal, p=per.p_nominal, phi=phiADP_nominal), simplified=0.007572544+6.19495*(10^(-6))*(psat_ADP_nominal-1228)); else // do not use homotopy XADP_nominal=Buildings.Utilities.Psychrometrics.Functions.X_pSatpphi( pSat=psat_ADP_nominal, p=per.p_nominal, phi=phiADP_nominal); end if; //-----------------------------------uACp calculations-----------------------------// hADP_nominal = Medium.specificEnthalpy_pTX( p=per.p_nominal, T=TADP_nominal, X=cat(1,{XADP_nominal}, {1-sum({XADP_nominal})})); bypass_nominal=Buildings.Utilities.Math.Functions.smoothLimit( x=(hOut_nominal-hADP_nominal)/(hEvaIn_nominal-hADP_nominal), l=1e-3, u=0.999, deltaX=1e-4); UAcp = -per.m_flow_nominal * Modelica.Math.log(bypass_nominal); assert(homotopyInitialization, "In " + getInstanceName() + ": The constant homotopyInitialization has been modified from its default value. This constant will be removed in future releases.", level = AssertionLevel.warning); end UACp;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.WetCoil Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.WetCoil

Calculates wet coil condition

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.WetCoil

Information

This block calculates the rate of cooling and the coil surface condition under the assumption that the coil is wet.

The dry coil conditions are computed in Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.DryCoil. See Buildings.Fluid.HeatExchangers.DXCoils.UsersGuide for an explanation of the model.

Extends from Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoilCondition (Partial block for dry and wet coil conditions).

Parameters

TypeNameDefaultDescription
DXCoildatCoiredeclare parameter Building...Performance data
Booleanuse_mCon_flow Set to true to enable connector for the condenser mass flow rate
BooleanvariableSpeedCoil Flag, set to true for coil with variable speed
CoolingCapacityAirCooledcooCapredeclare Buildings.Fluid.He...Performance data
replaceable package MediumModelica.Media.Interfaces.Pa...Medium model

Connectors

TypeNameDescription
input IntegerInputstageStage of coil, or 0/1 for variable-speed coil
input RealInputspeRatSpeed ratio
input RealInputm_flowAir mass flow rate
input RealInputTEvaInTemperature of air entering the cooling coil
input RealInputTConInOutside air dry bulb temperature for an air cooled condenser or wetbulb temperature for an evaporative cooled condenser [K]
output RealOutputEIREnergy Input Ratio
output RealOutputQ_flowTotal cooling capacity [W]
input RealInputmCon_flowWater mass flow rate at condensers for water-cooled DX units
replaceable package MediumMedium model
output RealOutputTADPDry bulb temperature of air at ADP [K]
output RealOutputSHRSensible Heat Ratio: Ratio of sensible heat load to total heat load
output RealOutputmWat_flowMass flow rate of water condensed at cooling coil [kg/s]
output RealOutputXADPHumidity mass fraction of air at apparatus dew point
input RealInputXEvaInInlet air mass fraction
input RealInputpPressure at inlet of coil
input RealInputhEvaInSpecific enthalpy of air entering the coil

Modelica definition

model WetCoil "Calculates wet coil condition " extends Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.PartialCoilCondition; replaceable package Medium = Modelica.Media.Interfaces.PartialCondensingGases "Medium model"; Modelica.Blocks.Interfaces.RealOutput TADP( quantity="ThermodynamicTemperature", unit="K", min=273.15, max=373.15) "Dry bulb temperature of air at ADP"; Modelica.Blocks.Interfaces.RealOutput SHR( min=0, max=1.0) "Sensible Heat Ratio: Ratio of sensible heat load to total heat load"; Modelica.Blocks.Interfaces.RealOutput mWat_flow( quantity="MassFlowRate", unit="kg/s") "Mass flow rate of water condensed at cooling coil"; Buildings.Utilities.Psychrometrics.TWetBul_TDryBulXi wetBul( redeclare package Medium = Medium) "Calculates wet-bulb temperature"; Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.ApparatusDewPoint appDewPt( redeclare package Medium = Medium, datCoi=datCoi, final variableSpeedCoil=variableSpeedCoil) "Calculates air properties at apparatus dew point (ADP) at existing air-flow conditions"; Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.SensibleHeatRatio shr( redeclare package Medium = Medium) "Calculates sensible heat ratio"; Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.Condensation conRat "Calculates rate of condensation"; protected Modelica.Blocks.Math.IntegerToBoolean onSwi(final threshold=1) "On/off switch"; public Modelica.Blocks.Interfaces.RealOutput XADP "Humidity mass fraction of air at apparatus dew point"; Modelica.Blocks.Interfaces.RealInput XEvaIn "Inlet air mass fraction"; Modelica.Blocks.Interfaces.RealInput p "Pressure at inlet of coil"; Modelica.Blocks.Interfaces.RealInput hEvaIn "Specific enthalpy of air entering the coil"; equation connect(appDewPt.TADP, TADP); connect(XEvaIn, appDewPt.XEvaIn); connect(p, appDewPt.p); connect(m_flow, appDewPt.m_flow); connect(p, wetBul.p); connect(XEvaIn, wetBul.Xi[1]); connect(speRat, appDewPt.speRat); connect(appDewPt.XADP, shr.XADP); connect(appDewPt.hADP, shr.hADP); connect(shr.SHR, SHR); connect(p, shr.p); connect(TEvaIn, wetBul.TDryBul); connect(TEvaIn, shr.TEvaIn); connect(hEvaIn, shr.hEvaIn); connect(hEvaIn, appDewPt.hEvaIn); connect(conRat.mWat_flow, mWat_flow); connect(shr.SHR, conRat.SHR); connect(speShiQ_flow.y, conRat.Q_flow); connect(speShiQ_flow.y, appDewPt.Q_flow); connect(onSwi.y, shr.on); connect(onSwi.u, stage); connect(wetBul.TWetBul, cooCap.TEvaIn); connect(appDewPt.XADP, XADP); connect(appDewPt.stage, stage); connect(mCon_flow, cooCap.mCon_flow); end WetCoil;

Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.NominalCondition Buildings.Fluid.HeatExchangers.DXCoils.BaseClasses.NominalCondition

Calculates inlet and outlet fluid parameters at nominal condition

Information

This block calculates inlet and outlet fluid parameters at the nominal condition. These parameters are required to determine the apparatus dew point at the nominal condition.

Extends from Modelica.Icons.Record (Icon for records).

Parameters

TypeNameDefaultDescription
replaceable package MediumModelica.Media.Interfaces.Pa...Medium model
NominalValuesperredeclare parameter Building...Performance data
SpecificHeatCapacityCp_nominalMedium.specificHeatCapacityC...Specific heat of air at specified nominal condition [J/(kg.K)]

Modelica definition

record NominalCondition "Calculates inlet and outlet fluid parameters at nominal condition" extends Modelica.Icons.Record; replaceable package Medium = Modelica.Media.Interfaces.PartialCondensingGases "Medium model"; replaceable parameter Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.BaseClasses.NominalValues per constrainedby Buildings.Fluid.HeatExchangers.DXCoils.AirCooled.Data.Generic.BaseClasses.NominalValues "Performance data"; final parameter Modelica.SIunits.MassFraction XEvaIn_nominal= Buildings.Utilities.Psychrometrics.Functions.X_pSatpphi( pSat=Medium.saturationPressure(per.TEvaIn_nominal), p=per.p_nominal, phi=per.phiIn_nominal) "Rated/Nominal mass fraction of air entering coil"; final parameter Modelica.SIunits.SpecificEnthalpy hEvaIn_nominal= Medium.specificEnthalpy_pTX( p=per.p_nominal, T=per.TEvaIn_nominal, X=cat(1,{XEvaIn_nominal}, {1-sum({XEvaIn_nominal})})) "Rated enthalpy of air entering cooling coil"; final parameter Modelica.SIunits.SpecificEnthalpy hOut_nominal= hEvaIn_nominal + per.Q_flow_nominal / per.m_flow_nominal "Rated enthalpy of air exiting cooling coil"; final parameter Modelica.SIunits.Temperature TOut_nominal= per.TEvaIn_nominal + (per.SHR_nominal * per.Q_flow_nominal)/(per.m_flow_nominal * Cp_nominal) "Dry-bulb temperature of the air leaving the cooling coil at nominal condition"; final parameter Modelica.SIunits.MassFraction XEvaOut_nominal(start=0.005, min=0, max=1.0)= XEvaIn_nominal + (hOut_nominal- hEvaIn_nominal)*(1-per.SHR_nominal)/ Medium.enthalpyOfCondensingGas(T=per.TEvaIn_nominal) "Rated/Nominal mass fraction of air leaving the coil"; parameter Modelica.SIunits.SpecificHeatCapacity Cp_nominal= Medium.specificHeatCapacityCp(Medium.setState_pTX( p=per.p_nominal, T=per.TEvaIn_nominal, X=cat(1,{XEvaIn_nominal}, {1-sum({XEvaIn_nominal})}))) "Specific heat of air at specified nominal condition"; end NominalCondition;