Buildings.Fluid.Chillers

Package with chiller models

Information

This package contains component models for chillers.

Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).

Package Content

Name Description
Buildings.Fluid.Chillers.AbsorptionIndirectSteam AbsorptionIndirectSteam Indirect steam heated absorption chiller based on performance curves
Buildings.Fluid.Chillers.Carnot_TEva Carnot_TEva Chiller with prescribed evaporator leaving temperature and performance curve adjusted based on Carnot efficiency
Buildings.Fluid.Chillers.Carnot_y Carnot_y Chiller with performance curve adjusted based on Carnot efficiency
Buildings.Fluid.Chillers.ElectricEIR ElectricEIR Electric chiller based on the DOE-2.1 model
Buildings.Fluid.Chillers.ElectricReformulatedEIR ElectricReformulatedEIR Electric chiller based on the DOE-2.1 model, but with performance as a function of condenser leaving instead of entering temperature
Buildings.Fluid.Chillers.Data Data Performance data for electric chillers
Buildings.Fluid.Chillers.Examples Examples Collection of models that illustrate model use and test models
Buildings.Fluid.Chillers.Validation Validation Collection of models that validate the chiller models
Buildings.Fluid.Chillers.BaseClasses BaseClasses Package with base classes for Buildings.Fluid.Chillers

Buildings.Fluid.Chillers.AbsorptionIndirectSteam Buildings.Fluid.Chillers.AbsorptionIndirectSteam

Indirect steam heated absorption chiller based on performance curves

Buildings.Fluid.Chillers.AbsorptionIndirectSteam

Information

Model for an indirect steam heated absorption chiller based on performance curves. The model uses performance curves similar to the EnergyPlus model Chiller:Absorption:Indirect.

The model uses six functions to predict the chiller cooling capacity, power consumption for the chiller pump and the generator heat flow rate and the condenser heat flow. These functions use the performance data stored in the record per. The computations are as follows:

The capacity function of the evaporator is

capFuneva = A1 + A2 Teva,lvg + A3 T2eva,lvg + A4 T3eva,lvg.

The capacity function of the condenser is

capFuncon = B1 + B2 Tcon,ent + B3 T2con,ent + B4 T3con,ent.

These capacity functions are used to compute the available cooling capacity of the evaporator as

eva,ava = capFuneva   capFuncon   Q̇eva,0,

where eva,0 is obtained from the performance data per.QEva_flow_nominal. Let eva,set denote the heat required to meet the set point TSet. Then, the model computes the part load ratio as

PLR =min(Q̇eva,set/Q̇eva,ava, PLRmax).

Hence, the model ensures that the chiller capacity does not exceed the chiller capacity specified by the parameter per.PLRMax. The cycling ratio is computed as

CR = min(PLR/PLRmin, 1.0),

where PRLmin is obtained from the performance record per.PLRMin. This ratio expresses the fraction of time that a chiller would run if it were to cycle because its load is smaller than the minimal load at which it can operate. Note that this model continuously operates even if the part load ratio is below the minimum part load ratio. Its leaving evaporator and condenser temperature can therefore be considered as an average temperature between the modes when the compressor is off and on.

Using the part load ratio, the energy input ratio of the chiller pump is

EIRP = C1 + C2PLR+C3PLR2.

The generator heat input ratio is

genHIR = D1 + D2PLR+D3PLR2+D4PLR3.

Two additional curves modify the heat input requirement based on the condenser inlet water temperature and the evaporator outlet water temperature. Specifically, the generator heat modifier based on the condenser inlet water temperature is

genTcon = E1 + E2 Tcon,ent + E3 T2con,ent + E4 T3con,ent,

and the generator heat modifier based on the evaporator inlet water temperature is

genTeva= F1 + F2 Teva,lvg + F3 T2eva,lvg + F4 T3eva,lvg.

The main outputs of the model that are to be used in energy analysis are the required generator heat QGen_flow and the electric power consumption of the chiller pump P. For example, if the chiller were to be regenerated with steam, then QGen_flow is the heat that must be provided by a steam loop. This model computes the required generator heat as

gen = -Q̇eva,ava genHIR genTcon genTeva CR.

The pump power consumption is

P = EIRP CR P0,

where P0 is the pump nominal power obtained from the performance data per.P_nominal. The heat balance of the chiller is

con = -Q̇eva + Q̇gen + P.

Performance data

The equipment performance data is obtained from the record per, which is an instance of Buildings.Fluid.Chillers.Data.AbsorptionIndirectSteam. Additional performance curves can be developed using two available techniques (Hydeman and Gillespie, 2002). The first technique is called the Least-squares Linear Regression method and is used when sufficient performance data exist to employ standard least-square linear regression techniques. The second technique is called Reference Curve Method and is used when insufficient performance data exist to apply linear regression techniques. A detailed description of both techniques can be found in Hydeman and Gillespie (2002).

References

Extends from Buildings.Fluid.Interfaces.FourPortHeatMassExchanger (Model transporting two fluid streams between four ports with storing mass or energy).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
Genericper Performance data
Nominal condition
MassFlowRatem1_flow_nominalper.mCon_flow_nominalNominal mass flow rate [kg/s]
MassFlowRatem2_flow_nominalper.mEva_flow_nominalNominal mass flow rate [kg/s]
PressureDifferencedp1_nominalper.dpCon_nominalPressure difference [Pa]
PressureDifferencedp2_nominalper.dpEva_nominalPressure difference [Pa]
Assumptions
BooleanallowFlowReversal1true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Advanced
MassFlowRatem1_flow_small1E-4*abs(m1_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*abs(m2_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
HeatFlowRateQ_flow_small-per.QEva_flow_nominal*1E-6Small value for heat flow rate or power, used to avoid division by zero [W]
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Flow resistance
Medium 1
Booleanfrom_dp1false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM10.1Fraction of nominal flow rate where flow transitions to laminar
Medium 2
Booleanfrom_dp2false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM20.1Fraction of nominal flow rate where flow transitions to laminar
Dynamics
Nominal condition
Timetau130Time constant at nominal flow [s]
Timetau230Time constant at nominal flow [s]
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Initialization
Medium 1
AbsolutePressurep1_startMedium1.p_defaultStart value of pressure [Pa]
TemperatureT1_start273.15 + 25Start value of temperature [K]
MassFractionX1_start[Medium1.nX]Medium1.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC1_start[Medium1.nC]fill(0, Medium1.nC)Start value of trace substances
ExtraPropertyC1_nominal[Medium1.nC]fill(1E-2, Medium1.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Medium 2
AbsolutePressurep2_startMedium2.p_defaultStart value of pressure [Pa]
TemperatureT2_start273.15 + 5Start value of temperature [K]
MassFractionX2_start[Medium2.nX]Medium2.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC2_start[Medium2.nC]fill(0, Medium2.nC)Start value of trace substances
ExtraPropertyC2_nominal[Medium2.nC]fill(1E-2, Medium2.nC)Nominal value of trace substances. (Set to typical order of magnitude.)

Connectors

TypeNameDescription
FluidPort_aport_a1Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_a2Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
input BooleanInputonSet to true to enable the absorption chiller
input RealInputTSetEvaporator setpoint leaving water temperature [K]
output RealOutputPChiller pump power [W]
output RealOutputQGen_flowRequired generator heat flow rate in the form of steam [W]
output RealOutputQEva_flowEvaporator heat flow rate [W]
output RealOutputQCon_flowCondenser heat flow rate [W]

Modelica definition

model AbsorptionIndirectSteam "Indirect steam heated absorption chiller based on performance curves" extends Buildings.Fluid.Interfaces.FourPortHeatMassExchanger( T1_start = 273.15+25, T2_start = 273.15+5, m1_flow_nominal= per.mCon_flow_nominal, m2_flow_nominal= per.mEva_flow_nominal, dp1_nominal = per.dpCon_nominal, dp2_nominal = per.dpEva_nominal, redeclare final Buildings.Fluid.MixingVolumes.MixingVolume vol1(final V=m1_flow_nominal*tau1/rho1_nominal, nPorts=2, final prescribedHeatFlowRate=true), vol2(final V=m2_flow_nominal*tau2/rho2_nominal, nPorts=2, final prescribedHeatFlowRate=true)); parameter Buildings.Fluid.Chillers.Data.AbsorptionIndirectSteam.Generic per "Performance data"; parameter Modelica.Units.SI.HeatFlowRate Q_flow_small=-per.QEva_flow_nominal* 1E-6 "Small value for heat flow rate or power, used to avoid division by zero"; Modelica.Blocks.Interfaces.BooleanInput on "Set to true to enable the absorption chiller"; Modelica.Blocks.Interfaces.RealInput TSet(final unit="K", displayUnit="degC") "Evaporator setpoint leaving water temperature"; Modelica.Blocks.Interfaces.RealOutput P(final unit="W") "Chiller pump power"; Modelica.Blocks.Interfaces.RealOutput QGen_flow(final unit="W") "Required generator heat flow rate in the form of steam"; Modelica.Blocks.Interfaces.RealOutput QEva_flow(final unit="W") "Evaporator heat flow rate"; Modelica.Blocks.Interfaces.RealOutput QCon_flow(final unit="W") "Condenser heat flow rate"; Real PLR(min=0, final unit="1") = perMod.PLR "Part load ratio"; Real CR(min=0, final unit="1") = perMod.CR "Cycling ratio"; protected BaseClasses.AbsorptionIndirectSteam perMod( final per=per, final Q_flow_small=Q_flow_small) "Block that computes the performance"; Modelica.Blocks.Sources.RealExpression QEva_flow_set( final y=Buildings.Utilities.Math.Functions.smoothMin( x1=m2_flow*(hEvaSet - inStream(port_a2.h_outflow)), x2=-Q_flow_small, deltaX=Q_flow_small/10)) "Setpoint heat flow rate of the evaporator"; Modelica.Units.SI.SpecificEnthalpy hEvaSet=Medium2.specificEnthalpy_pTX( p=port_b2.p, T=TSet, X=cat( 1, port_b2.Xi_outflow, {1 - sum(port_b2.Xi_outflow)})) "Chilled water setpoint enthalpy"; Modelica.Blocks.Sources.RealExpression TConEnt( y=Medium1.temperature( Medium1.setState_phX( p = port_a1.p, h = inStream(port_a1.h_outflow)))) "Condenser entering water temperature"; Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor TEvaLvg "Leaving evaporator temperature"; HeatTransfer.Sources.PrescribedHeatFlow preHeaFloCon "Prescribed heat flow rate for the condenser"; HeatTransfer.Sources.PrescribedHeatFlow preHeaFloEva "Prescribed heat flow rate for the evaporator"; equation connect(on, perMod.on); connect(perMod.QCon_flow, preHeaFloCon.Q_flow); connect(perMod.QEva_flow, preHeaFloEva.Q_flow); connect(preHeaFloEva.port, vol2.heatPort); connect(perMod.QEva_flow, QEva_flow); connect(TConEnt.y, perMod.TConEnt); connect(QEva_flow_set.y, perMod.QEva_flow_set); connect(preHeaFloCon.port, vol1.heatPort); connect(perMod.QCon_flow, QCon_flow); connect(perMod.QGen_flow, QGen_flow); connect(TEvaLvg.port, vol2.heatPort); connect(TEvaLvg.T, perMod.TEvaLvg); connect(perMod.P, P); end AbsorptionIndirectSteam;

Buildings.Fluid.Chillers.Carnot_TEva Buildings.Fluid.Chillers.Carnot_TEva

Chiller with prescribed evaporator leaving temperature and performance curve adjusted based on Carnot efficiency

Buildings.Fluid.Chillers.Carnot_TEva

Information

This is a model of a chiller whose coefficient of performance COP changes with temperatures in the same way as the Carnot efficiency changes. The control input is the setpoint of the evaporator leaving temperature, which is met exactly at steady state if the chiller has sufficient capacity.

Set use_eta_Carnot_nominal=true to specify directly the Carnot effectiveness ηCarnot,0, in which case the value of the parameter COP_nominal will not affect the simulation. If use_eta_Carnot_nominal=false, the model will use the value of the parameter COP_nominal together with the specified nominal temperatures to compute the Carnot effectiveness as

ηCarnot,0 = COP0 ⁄ (Teva,0 ⁄ (Tcon,0 + Tapp,con,0 - (Teva,0-Tapp,eva,0))),

where Teva,0 is the evaporator temperature, Tcon,0 is the condenser temperature, Tapp,eva,0 is the evaporator approach temperature and Tapp,con,0 is the condenser approach temperature.

The COP is computed as the product

COP = ηCarnot,0 COPCarnot ηPL,

where COPCarnot is the Carnot efficiency and ηPL is the part load efficiency, expressed using a polynomial. This polynomial has the form

ηPL = a1 + a2 y + a3 y2 + ...,

where y ∈ [0, 1] is the part load for cooling and the coefficients ai are declared by the parameter a.

On the Dynamics tag, the model can be parametrized to compute a transient or steady-state response. The transient response of the model is computed using a first order differential equation for the evaporator and condenser fluid volumes. The chiller outlet temperatures are equal to the temperatures of these lumped volumes.

Typical use and important parameters

When using this component, make sure that the condenser has sufficient mass flow rate. Based on the evaporator mass flow rate, temperature difference and the efficiencies, the model computes how much heat will be added to the condenser. If the mass flow rate is too small, very high outlet temperatures can result.

The evaporator heat flow rate QEva_flow_nominal is used to assign the default value for the mass flow rates, which are used for the pressure drop calculations. It is also used to compute the part load efficiency. Hence, make sure that QEva_flow_nominal is set to a reasonable value.

The maximum cooling capacity is set by the parameter QEva_flow_min, which is by default set to negative infinity.

The coefficient of performance depends on the evaporator and condenser leaving temperature since otherwise the second law of thermodynamics may be violated.

Notes

For a similar model that can be used as a heat pump, see Buildings.Fluid.HeatPumps.Examples.Carnot_TCon.

Extends from Buildings.Fluid.Chillers.BaseClasses.PartialCarnot_T (Partial model for chiller with performance curve adjusted based on Carnot efficiency).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
HeatFlowRateQEva_flow_min-Modelica.Constants.infMaximum heat flow rate for cooling (negative) [W]
Nominal condition
MassFlowRatem1_flow_nominalQCon_flow_nominal/cp1_defaul...Nominal mass flow rate [kg/s]
MassFlowRatem2_flow_nominalQEva_flow_nominal/cp2_defaul...Nominal mass flow rate [kg/s]
HeatFlowRateQEva_flow_nominal Nominal cooling heat flow rate (QEva_flow_nominal < 0) [W]
HeatFlowRateQCon_flow_nominal-QEva_flow_nominal*(1 + COP_...Nominal heating flow rate [W]
TemperatureDifferencedTEva_nominal-10Temperature difference evaporator outlet-inlet [K]
TemperatureDifferencedTCon_nominal10Temperature difference condenser outlet-inlet [K]
Pressuredp1_nominal Pressure difference over condenser [Pa]
Pressuredp2_nominal Pressure difference over evaporator [Pa]
Efficiency
Booleanuse_eta_Carnot_nominaltrueSet to true to use Carnot effectiveness etaCarnot_nominal rather than COP_nominal
RealetaCarnot_nominal0.3Carnot effectiveness (=COP/COP_Carnot) used during simulation if use_eta_Carnot_nominal = true [1]
RealCOP_nominaletaCarnot_nominal*TUseAct_no...Coefficient of performance at TEva_nominal and TCon_nominal, used during simulation if use_eta_Carnot_nominal = false [1]
TemperatureTCon_nominal303.15Condenser temperature used to compute COP_nominal if use_eta_Carnot_nominal=false [K]
TemperatureTEva_nominal278.15Evaporator temperature used to compute COP_nominal if use_eta_Carnot_nominal=false [K]
Reala[:]{1}Coefficients for efficiency curve (need p(a=a, yPL=1)=1)
TemperatureDifferenceTAppCon_nominalif cp1_default < 1500 then 5...Temperature difference between refrigerant and working fluid outlet in condenser [K]
TemperatureDifferenceTAppEva_nominalif cp2_default < 1500 then 5...Temperature difference between refrigerant and working fluid outlet in evaporator [K]
Assumptions
BooleanallowFlowReversal1true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Advanced
MassFlowRatem1_flow_small1E-4*abs(m1_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*abs(m2_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
Condenser
Booleanfrom_dp1false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM10.1Fraction of nominal flow rate where flow transitions to laminar [1]
Evaporator
Booleanfrom_dp2false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM20.1Fraction of nominal flow rate where flow transitions to laminar [1]
Dynamics
Condenser
Timetau160Time constant at nominal flow rate (used if energyDynamics1 <> Modelica.Fluid.Types.Dynamics.SteadyState) [s]
TemperatureT1_startMedium1.T_defaultInitial or guess value of set point [K]
Evaporator
Timetau260Time constant at nominal flow rate (used if energyDynamics2 <> Modelica.Fluid.Types.Dynamics.SteadyState) [s]
TemperatureT2_startMedium2.T_defaultInitial or guess value of set point [K]
Evaporator and condenser
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Connectors

TypeNameDescription
FluidPort_aport_a1Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_a2Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
output RealOutputQCon_flowActual heating heat flow rate added to fluid 1 [W]
output RealOutputPElectric power consumed by compressor [W]
output RealOutputQEva_flowActual cooling heat flow rate removed from fluid 2 [W]
input RealInputTSetEvaporator leaving water temperature [K]

Modelica definition

model Carnot_TEva "Chiller with prescribed evaporator leaving temperature and performance curve adjusted based on Carnot efficiency" extends Buildings.Fluid.Chillers.BaseClasses.PartialCarnot_T( final COP_is_for_cooling = true, final QCon_flow_nominal = -QEva_flow_nominal*(1 + COP_nominal)/COP_nominal, PEle(y=-QEva_flow/COP), redeclare HeatExchangers.HeaterCooler_u con( final from_dp=from_dp1, final dp_nominal=dp1_nominal, final linearizeFlowResistance=linearizeFlowResistance1, final deltaM=deltaM1, final tau=tau1, final T_start=T1_start, final energyDynamics=energyDynamics, final homotopyInitialization=homotopyInitialization, final Q_flow_nominal=QCon_flow_nominal), redeclare HeatExchangers.SensibleCooler_T eva( final from_dp=from_dp2, final dp_nominal=dp2_nominal, final linearizeFlowResistance=linearizeFlowResistance2, final deltaM=deltaM2, final QMin_flow=QEva_flow_min, final tau=tau2, final T_start=T2_start, final energyDynamics=energyDynamics, final homotopyInitialization=homotopyInitialization)); parameter Modelica.Units.SI.HeatFlowRate QEva_flow_min(max=0) = -Modelica.Constants.inf "Maximum heat flow rate for cooling (negative)"; Modelica.Blocks.Interfaces.RealInput TSet(unit="K") "Evaporator leaving water temperature"; protected Modelica.Blocks.Math.Gain yCon(final k=1/QCon_flow_nominal) "Normalized condenser heat flow rate"; Modelica.Blocks.Math.Add QCon_flow_internal(final k1=-1) "Heat added to condenser"; initial equation assert(QEva_flow_nominal < 0, "Parameter QEva_flow_nominal must be negative."); equation connect(TSet, eva.TSet); connect(eva.Q_flow, QEva_flow); connect(QCon_flow_internal.y, yCon.u); connect(yCon.y, con.u); connect(QCon_flow_internal.y, QCon_flow); connect(QCon_flow_internal.u1, eva.Q_flow); connect(QCon_flow_internal.u2, PEle.y); end Carnot_TEva;

Buildings.Fluid.Chillers.Carnot_y Buildings.Fluid.Chillers.Carnot_y

Chiller with performance curve adjusted based on Carnot efficiency

Buildings.Fluid.Chillers.Carnot_y

Information

This is a model of a chiller whose coefficient of performance COP changes with temperatures in the same way as the Carnot efficiency changes. The input signal y is the control signal for the compressor.

Set use_eta_Carnot_nominal=true to specify directly the Carnot effectiveness ηCarnot,0, in which case the value of the parameter COP_nominal will not affect the simulation. If use_eta_Carnot_nominal=false, the model will use the value of the parameter COP_nominal together with the specified nominal temperatures to compute the Carnot effectiveness as

ηCarnot,0 = COP0 ⁄ (Teva,0 ⁄ (Tcon,0 + Tapp,con,0 - (Teva,0-Tapp,eva,0))),

where Teva,0 is the evaporator temperature, Tcon,0 is the condenser temperature, Tapp,eva,0 is the evaporator approach temperature and Tapp,con,0 is the condenser approach temperature.

The COP is computed as the product

COP = ηCarnot,0 COPCarnot ηPL,

where COPCarnot is the Carnot efficiency and ηPL is the part load efficiency, expressed using a polynomial. This polynomial has the form

ηPL = a1 + a2 y + a3 y2 + ...,

where y ∈ [0, 1] is the part load for cooling and the coefficients ai are declared by the parameter a.

On the Dynamics tag, the model can be parametrized to compute a transient or steady-state response. The transient response of the model is computed using a first order differential equation for the evaporator and condenser fluid volumes. The chiller outlet temperatures are equal to the temperatures of these lumped volumes.

Typical use and important parameters

When using this component, make sure that the evaporator and the condenser have sufficient mass flow rate. Based on the mass flow rates, the compressor power, temperature difference and the efficiencies, the model computes how much heat will be added to the condenser and removed at the evaporator. If the mass flow rates are too small, very high temperature differences can result.

The evaporator heat flow rate QEva_flow_nominal is used to assign the default value for the mass flow rates, which are used for the pressure drop calculations. It is also used to compute the part load efficiency. Hence, make sure that QEva_flow_nominal is set to a reasonable value.

The maximum cooling capacity is set by the parameter QEva_flow_min, which is by default set to negative infinity.

The coefficient of performance depends on the evaporator and condenser leaving temperature since otherwise the second law of thermodynamics may be violated.

Notes

For a similar model that can be used as a heat pump, see Buildings.Fluid.HeatPumps.Carnot_y.

Extends from Buildings.Fluid.Chillers.BaseClasses.PartialCarnot_y (Partial chiller model with performance curve adjusted based on Carnot efficiency).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
Nominal condition
MassFlowRatem1_flow_nominalQCon_flow_nominal/cp1_defaul...Nominal mass flow rate [kg/s]
MassFlowRatem2_flow_nominalQEva_flow_nominal/cp2_defaul...Nominal mass flow rate [kg/s]
TemperatureDifferencedTEva_nominal-10Temperature difference evaporator outlet-inlet [K]
TemperatureDifferencedTCon_nominal10Temperature difference condenser outlet-inlet [K]
Pressuredp1_nominal Pressure difference over condenser [Pa]
Pressuredp2_nominal Pressure difference over evaporator [Pa]
PowerP_nominal Nominal compressor power (at y=1) [W]
Efficiency
Booleanuse_eta_Carnot_nominaltrueSet to true to use Carnot effectiveness etaCarnot_nominal rather than COP_nominal
RealetaCarnot_nominal0.3Carnot effectiveness (=COP/COP_Carnot) used during simulation if use_eta_Carnot_nominal = true [1]
RealCOP_nominaletaCarnot_nominal*TUseAct_no...Coefficient of performance at TEva_nominal and TCon_nominal, used during simulation if use_eta_Carnot_nominal = false [1]
TemperatureTCon_nominal303.15Condenser temperature used to compute COP_nominal if use_eta_Carnot_nominal=false [K]
TemperatureTEva_nominal278.15Evaporator temperature used to compute COP_nominal if use_eta_Carnot_nominal=false [K]
Reala[:]{1}Coefficients for efficiency curve (need p(a=a, yPL=1)=1)
TemperatureDifferenceTAppCon_nominalif cp1_default < 1500 then 5...Temperature difference between refrigerant and working fluid outlet in condenser [K]
TemperatureDifferenceTAppEva_nominalif cp2_default < 1500 then 5...Temperature difference between refrigerant and working fluid outlet in evaporator [K]
Assumptions
BooleanallowFlowReversal1true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Advanced
MassFlowRatem1_flow_small1E-4*abs(m1_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*abs(m2_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
Condenser
Booleanfrom_dp1false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM10.1Fraction of nominal flow rate where flow transitions to laminar [1]
Evaporator
Booleanfrom_dp2false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM20.1Fraction of nominal flow rate where flow transitions to laminar [1]
Dynamics
Condenser
Timetau160Time constant at nominal flow rate (used if energyDynamics1 <> Modelica.Fluid.Types.Dynamics.SteadyState) [s]
TemperatureT1_startMedium1.T_defaultInitial or guess value of set point [K]
Evaporator
Timetau260Time constant at nominal flow rate (used if energyDynamics2 <> Modelica.Fluid.Types.Dynamics.SteadyState) [s]
TemperatureT2_startMedium2.T_defaultInitial or guess value of set point [K]
Evaporator and condenser
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state

Connectors

TypeNameDescription
FluidPort_aport_a1Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_a2Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
output RealOutputQCon_flowActual heating heat flow rate added to fluid 1 [W]
output RealOutputPElectric power consumed by compressor [W]
output RealOutputQEva_flowActual cooling heat flow rate removed from fluid 2 [W]
input RealInputyPart load ratio of compressor [1]

Modelica definition

model Carnot_y "Chiller with performance curve adjusted based on Carnot efficiency" extends Buildings.Fluid.Chillers.BaseClasses.PartialCarnot_y( final COP_is_for_cooling = true); end Carnot_y;

Buildings.Fluid.Chillers.ElectricEIR Buildings.Fluid.Chillers.ElectricEIR

Electric chiller based on the DOE-2.1 model

Buildings.Fluid.Chillers.ElectricEIR

Information

Model of an electric chiller, based on the DOE-2.1 chiller model and the EnergyPlus chiller model Chiller:Electric:EIR.

This model uses three functions to predict capacity and power consumption:

Function Description Formulation
ElectricEIR (this model) ElectricReformulatedEIR
capFunT Adjusts cooling capacity for current fluid temperatures Biquadratic on TConEnt and TEvaLvg Biquadratic on TConLvg and TEvaLvg
EIRFunPLR Adjusts EIR for the current PLR Quadratic on PLR Bicubic on TConLvg and PLR
EIRFunT Adjusts EIR for current fluid temperatures Biquadratic on TConEnt and TEvaLvg Biquadratic on TConLvg and TEvaLvg

These functions take the same form as documented in EnergyPlus v22.1.0 Engineering Reference section 14.3.9.2 (equations 14.231 through 14.233). These curves are stored in the data record per and are available from Buildings.Fluid.Chillers.Data.ElectricEIR. How they are used to compute the adjusted capacity and compressor power can be found in the documentation of Buildings.Fluid.Chillers.BaseClasses.PartialElectric. Additional performance curves can be developed using two available techniques (Hydeman and Gillespie, 2002). The first technique is called the Least-squares Linear Regression method and is used when sufficient performance data exist to employ standard least-square linear regression techniques. The second technique is called Reference Curve Method and is used when insufficient performance data exist to apply linear regression techniques. A detailed description of both techniques can be found in Hydeman and Gillespie (2002).

The model takes as an input the set point for the leaving chilled water temperature, which is met if the chiller has sufficient capacity. Thus, the model has a built-in, ideal temperature control. The model has three tests on the part load ratio and the cycling ratio:

  1. The test
      PLR1 =min(QEva_flow_set/QEva_flow_ava, per.PLRMax);
    
    ensures that the chiller capacity does not exceed the chiller capacity specified by the parameter per.PLRMax.
  2. The test
      CR = min(PLR1/per.PRLMin, 1.0);
    
    computes a cycling ratio. This ratio expresses the fraction of time that a chiller would run if it were to cycle because its load is smaller than the minimal load at which it can operate. Note that this model continuously operates even if the part load ratio is below the minimum part load ratio. Its leaving evaporator and condenser temperature can therefore be considered as an average temperature between the modes where the compressor is off and on.
  3. The test
      PLR2 = max(per.PLRMinUnl, PLR1);
    
    computes the part load ratio of the compressor. The assumption is that for a part load ratio below per.PLRMinUnl, the chiller uses hot gas bypass to reduce the capacity, while the compressor power draw does not change.

The electric power only contains the power for the compressor, but not any power for pumps or fans.

The model can be parametrized to compute a transient or steady-state response. The transient response of the chiller is computed using a first order differential equation for the evaporator and condenser fluid volumes. The chiller outlet temperatures are equal to the temperatures of these lumped volumes.

Optionally, the model can be configured to represent heat recovery chillers with a switchover option by setting the parameter have_switchover to true. In that case an additional Boolean input connector coo is used. The chiller is tracking a chilled water supply temperature setpoint at the outlet of the evaporator barrel if coo is true. Otherwise, if coo is false, the chiller is tracking a hot water supply temperature setpoint at the outlet of the condenser barrel. See Buildings.Fluid.Chillers.Examples.ElectricEIR_HeatRecovery for an example with a chiller operating in heating mode.

References

Extends from Buildings.Fluid.Chillers.BaseClasses.PartialElectric (Partial model for electric chiller based on the model in DOE-2, CoolTools and EnergyPlus).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
MixingVolumeHeatPortvol1vol1(final prescribedHeatFlo...Volume for fluid 1
Booleanhave_switchoverfalseSet to true for heat recovery chiller with built-in switchover
Genericper Performance data
Nominal condition
MassFlowRatem1_flow_nominalmCon_flow_nominalNominal mass flow rate [kg/s]
MassFlowRatem2_flow_nominalmEva_flow_nominalNominal mass flow rate [kg/s]
PressureDifferencedp1_nominal Pressure difference [Pa]
PressureDifferencedp2_nominal Pressure difference [Pa]
Initialization
RealPLR1.start0Part load ratio [1]
Assumptions
BooleanallowFlowReversal1true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Advanced
MassFlowRatem1_flow_small1E-4*abs(m1_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*abs(m2_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
Medium 1
Booleanfrom_dp1false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM10.1Fraction of nominal flow rate where flow transitions to laminar
Medium 2
Booleanfrom_dp2false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM20.1Fraction of nominal flow rate where flow transitions to laminar
Dynamics
Nominal condition
Timetau130Time constant at nominal flow [s]
Timetau230Time constant at nominal flow [s]
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Initialization
Medium 1
AbsolutePressurep1_startMedium1.p_defaultStart value of pressure [Pa]
TemperatureT1_start273.15 + 25Start value of temperature [K]
MassFractionX1_start[Medium1.nX]Medium1.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC1_start[Medium1.nC]fill(0, Medium1.nC)Start value of trace substances
ExtraPropertyC1_nominal[Medium1.nC]fill(1E-2, Medium1.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Medium 2
AbsolutePressurep2_startMedium2.p_defaultStart value of pressure [Pa]
TemperatureT2_start273.15 + 5Start value of temperature [K]
MassFractionX2_start[Medium2.nX]Medium2.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC2_start[Medium2.nC]fill(0, Medium2.nC)Start value of trace substances
ExtraPropertyC2_nominal[Medium2.nC]fill(1E-2, Medium2.nC)Nominal value of trace substances. (Set to typical order of magnitude.)

Connectors

TypeNameDescription
FluidPort_aport_a1Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_a2Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
input BooleanInputonSet to true to enable compressor, or false to disable compressor
input RealInputTSetSet point for leaving chilled water temperature (condenser water if have_switchover=true and coo=false) [K]
output RealOutputPElectric power consumed by compressor [W]
output RealOutputCOP_hCoefficient of performance of heating [1]
input BooleanInputcooSwitchover signal: true for cooling, false for heating

Modelica definition

model ElectricEIR "Electric chiller based on the DOE-2.1 model" extends Buildings.Fluid.Chillers.BaseClasses.PartialElectric( final QEva_flow_nominal = per.QEva_flow_nominal, final COP_nominal= per.COP_nominal, final PLRMax= per.PLRMax, final PLRMinUnl= per.PLRMinUnl, final PLRMin= per.PLRMin, final etaMotor= per.etaMotor, final mEva_flow_nominal= per.mEva_flow_nominal, final mCon_flow_nominal= per.mCon_flow_nominal, final TEvaLvg_nominal= per.TEvaLvg_nominal); parameter Buildings.Fluid.Chillers.Data.ElectricEIR.Generic per "Performance data"; protected final parameter Modelica.Units.NonSI.Temperature_degC TConEnt_nominal_degC= Modelica.Units.Conversions.to_degC(per.TConEnt_nominal) "Temperature of fluid entering condenser at nominal condition"; Modelica.Units.NonSI.Temperature_degC TConEnt_degC "Temperature of fluid entering condenser"; initial equation // Verify correctness of performance curves, and write warning if error is bigger than 10% Buildings.Fluid.Chillers.BaseClasses.warnIfPerformanceOutOfBounds( Buildings.Utilities.Math.Functions.biquadratic(a=per.capFunT, x1=TEvaLvg_nominal_degC, x2=TConEnt_nominal_degC), "Capacity as function of temperature ", "per.capFunT"); equation TConEnt_degC=Modelica.Units.Conversions.to_degC(TConEnt); if on then // Compute the chiller capacity fraction, 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. This prevents the solver to pick the // unrealistic solution. capFunT = Buildings.Utilities.Math.Functions.smoothMax( x1 = 1E-6, x2 = Buildings.Utilities.Math.Functions.biquadratic(a=per.capFunT, x1=TEvaLvg_degC, x2=TConEnt_degC), deltaX = 1E-7); /* assert(capFunT > 0.1, "Error: Received capFunT = " + String(capFunT) + ".\n" + "Coefficient for polynomial seem to be not valid for the encountered temperature range.\n" + "Temperatures are TConEnt_degC = " + String(TConEnt_degC) + " degC\n" + " TEvaLvg_degC = " + String(TEvaLvg_degC) + " degC"); */ // Chiller energy input ratio biquadratic curve. EIRFunT = Buildings.Utilities.Math.Functions.biquadratic(a=per.EIRFunT, x1=TEvaLvg_degC, x2=TConEnt_degC); // Chiller energy input ratio quadratic curve EIRFunPLR = per.EIRFunPLR[1]+per.EIRFunPLR[2]*PLR2+per.EIRFunPLR[3]*PLR2^2; else capFunT = 0; EIRFunT = 0; EIRFunPLR = 0; end if; end ElectricEIR;

Buildings.Fluid.Chillers.ElectricReformulatedEIR Buildings.Fluid.Chillers.ElectricReformulatedEIR

Electric chiller based on the DOE-2.1 model, but with performance as a function of condenser leaving instead of entering temperature

Buildings.Fluid.Chillers.ElectricReformulatedEIR

Information

Model of an electric chiller, based on the model by Hydeman et al. (2002) that has been developed in the CoolTools project and that is implemented in EnergyPlus as the model Chiller:Electric:ReformulatedEIR. This empirical model is similar to Buildings.Fluid.Chillers.ElectricEIR. The difference is that to compute the performance, this model uses the condenser leaving temperature instead of the entering temperature, and it uses a bicubic polynomial to compute the part load performance.

This model uses three functions to predict capacity and power consumption:

Function Description Formulation
ElectricEIR (this model) ElectricReformulatedEIR (this model)
capFunT Adjusts cooling capacity for current fluid temperatures Biquadratic on TConEnt and TEvaLvg Biquadratic on TConLvg and TEvaLvg
EIRFunPLR Adjusts EIR for the current PLR Quadratic on PLR Bicubic on TConLvg and PLR
EIRFunT Adjusts EIR for current fluid temperatures Biquadratic on TConEnt and TEvaLvg Biquadratic on TConLvg and TEvaLvg

These curves are stored in the data record per and are available from Buildings.Fluid.Chillers.Data.ElectricReformulatedEIR. How they are used to compute the adjusted capacity and compressor power can be found in the documentation of Buildings.Fluid.Chillers.BaseClasses.PartialElectric. Additional performance curves can be developed using two available techniques (Hydeman and Gillespie, 2002). The first technique is called the Least-squares Linear Regression method and is used when sufficient performance data exist to employ standard least-square linear regression techniques. The second technique is called Reference Curve Method and is used when insufficient performance data exist to apply linear regression techniques. A detailed description of both techniques can be found in Hydeman and Gillespie (2002).

The model takes as an input the set point for the leaving chilled water temperature, which is met if the chiller has sufficient capacity. Thus, the model has a built-in, ideal temperature control. The model has three tests on the part load ratio and the cycling ratio:

  1. The test
      PLR1 =min(QEva_flow_set/QEva_flow_ava, per.PLRMax);
    
    ensures that the chiller capacity does not exceed the chiller capacity specified by the parameter per.PLRMax.
  2. The test
      CR = min(PLR1/per.PRLMin, 1.0);
    
    computes a cycling ratio. This ratio expresses the fraction of time that a chiller would run if it were to cycle because its load is smaller than the minimal load at which it can operate. Note that this model continuously operates even if the part load ratio is below the minimum part load ratio. Its leaving evaporator and condenser temperature can therefore be considered as an average temperature between the modes where the compressor is off and on.
  3. The test
      PLR2 = max(per.PLRMinUnl, PLR1);
    
    computes the part load ratio of the compressor. The assumption is that for a part load ratio below per.PLRMinUnl, the chiller uses hot gas bypass to reduce the capacity, while the compressor power draw does not change.

The electric power only contains the power for the compressor, but not any power for pumps or fans.

The model can be parametrized to compute a transient or steady-state response. The transient response of the chiller is computed using a first order differential equation for the evaporator and condenser fluid volumes. The chiller outlet temperatures are equal to the temperatures of these lumped volumes.

Optionally, the model can be configured to represent heat recovery chillers with a switchover option by setting the parameter have_switchover to true. In that case an additional Boolean input connector coo is used. The chiller is tracking a chilled water supply temperature setpoint at the outlet of the evaporator barrel if coo is true. Otherwise, if coo is false, the chiller is tracking a hot water supply temperature setpoint at the outlet of the condenser barrel. See Buildings.Fluid.Chillers.Examples.ElectricEIR_HeatRecovery for an example with a chiller operating in heating mode.

References

Extends from Buildings.Fluid.Chillers.BaseClasses.PartialElectric (Partial model for electric chiller based on the model in DOE-2, CoolTools and EnergyPlus).

Parameters

TypeNameDefaultDescription
replaceable package Medium1PartialMediumMedium 1 in the component
replaceable package Medium2PartialMediumMedium 2 in the component
MixingVolumeHeatPortvol1vol1(final prescribedHeatFlo...Volume for fluid 1
Booleanhave_switchoverfalseSet to true for heat recovery chiller with built-in switchover
Genericper Performance data
Nominal condition
MassFlowRatem1_flow_nominalmCon_flow_nominalNominal mass flow rate [kg/s]
MassFlowRatem2_flow_nominalmEva_flow_nominalNominal mass flow rate [kg/s]
PressureDifferencedp1_nominal Pressure difference [Pa]
PressureDifferencedp2_nominal Pressure difference [Pa]
Initialization
RealPLR1.start0Part load ratio [1]
Assumptions
BooleanallowFlowReversal1true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1
BooleanallowFlowReversal2true= false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2
Advanced
MassFlowRatem1_flow_small1E-4*abs(m1_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
MassFlowRatem2_flow_small1E-4*abs(m2_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
Medium 1
Booleanfrom_dp1false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance1false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM10.1Fraction of nominal flow rate where flow transitions to laminar
Medium 2
Booleanfrom_dp2false= true, use m_flow = f(dp) else dp = f(m_flow)
BooleanlinearizeFlowResistance2false= true, use linear relation between m_flow and dp for any flow rate
RealdeltaM20.1Fraction of nominal flow rate where flow transitions to laminar
Dynamics
Nominal condition
Timetau130Time constant at nominal flow [s]
Timetau230Time constant at nominal flow [s]
Conservation equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Initialization
Medium 1
AbsolutePressurep1_startMedium1.p_defaultStart value of pressure [Pa]
TemperatureT1_start273.15 + 25Start value of temperature [K]
MassFractionX1_start[Medium1.nX]Medium1.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC1_start[Medium1.nC]fill(0, Medium1.nC)Start value of trace substances
ExtraPropertyC1_nominal[Medium1.nC]fill(1E-2, Medium1.nC)Nominal value of trace substances. (Set to typical order of magnitude.)
Medium 2
AbsolutePressurep2_startMedium2.p_defaultStart value of pressure [Pa]
TemperatureT2_start273.15 + 5Start value of temperature [K]
MassFractionX2_start[Medium2.nX]Medium2.X_defaultStart value of mass fractions m_i/m [kg/kg]
ExtraPropertyC2_start[Medium2.nC]fill(0, Medium2.nC)Start value of trace substances
ExtraPropertyC2_nominal[Medium2.nC]fill(1E-2, Medium2.nC)Nominal value of trace substances. (Set to typical order of magnitude.)

Connectors

TypeNameDescription
FluidPort_aport_a1Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_bport_b1Fluid connector b1 (positive design flow direction is from port_a1 to port_b1)
FluidPort_aport_a2Fluid connector a2 (positive design flow direction is from port_a2 to port_b2)
FluidPort_bport_b2Fluid connector b2 (positive design flow direction is from port_a2 to port_b2)
input BooleanInputonSet to true to enable compressor, or false to disable compressor
input RealInputTSetSet point for leaving chilled water temperature (condenser water if have_switchover=true and coo=false) [K]
output RealOutputPElectric power consumed by compressor [W]
output RealOutputCOP_hCoefficient of performance of heating [1]
input BooleanInputcooSwitchover signal: true for cooling, false for heating

Modelica definition

model ElectricReformulatedEIR "Electric chiller based on the DOE-2.1 model, but with performance as a function of condenser leaving instead of entering temperature" extends Buildings.Fluid.Chillers.BaseClasses.PartialElectric( final QEva_flow_nominal = per.QEva_flow_nominal, final COP_nominal= per.COP_nominal, final PLRMax= per.PLRMax, final PLRMinUnl= per.PLRMinUnl, final PLRMin= per.PLRMin, final etaMotor= per.etaMotor, final mEva_flow_nominal= per.mEva_flow_nominal, final mCon_flow_nominal= per.mCon_flow_nominal, final TEvaLvg_nominal= per.TEvaLvg_nominal); parameter Buildings.Fluid.Chillers.Data.ElectricReformulatedEIR.Generic per "Performance data"; protected final parameter Modelica.Units.NonSI.Temperature_degC TConLvg_nominal_degC= Modelica.Units.Conversions.to_degC(per.TConLvg_nominal) "Temperature of fluid leaving condenser at nominal condition"; Modelica.Units.NonSI.Temperature_degC TConLvg_degC "Temperature of fluid leaving condenser"; initial equation // Verify correctness of performance curves, and write warning if error is bigger than 10% Buildings.Fluid.Chillers.BaseClasses.warnIfPerformanceOutOfBounds( Buildings.Utilities.Math.Functions.biquadratic(a=per.capFunT, x1=TEvaLvg_nominal_degC, x2=TConLvg_nominal_degC), "Capacity as a function of temperature ", "per.capFunT"); equation TConLvg_degC=Modelica.Units.Conversions.to_degC(TConLvg); if on then // Compute the chiller capacity fraction, 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. This prevents the solver to pick the // unrealistic solution. capFunT = Buildings.Utilities.Math.Functions.smoothMax( x1 = 1E-6, x2 = Buildings.Utilities.Math.Functions.biquadratic(a=per.capFunT, x1=TEvaLvg_degC, x2=TConLvg_degC), deltaX = 1E-7); /* assert(capFunT > 0.1, "Error: Received capFunT = " + String(capFunT) + ".\n" + "Coefficient for polynomial seem to be not valid for the encountered temperature range.\n" + "Temperatures are TConLvg_degC = " + String(TConLvg_degC) + " degC\n" + " TEvaLvg_degC = " + String(TEvaLvg_degC) + " degC"); */ // Chiller energy input ratio biquadratic curve. EIRFunT = Buildings.Utilities.Math.Functions.biquadratic(a=per.EIRFunT, x1=TEvaLvg_degC, x2=TConLvg_degC); // Chiller energy input ratio bicubic curve EIRFunPLR = Buildings.Utilities.Math.Functions.bicubic(a=per.EIRFunPLR, x1=TConLvg_degC, x2=PLR2); else capFunT = 0; EIRFunT = 0; EIRFunPLR = 0; end if; end ElectricReformulatedEIR;