Buildings.Fluid.Chillers.Validation

Collection of models that validate the chiller models

Information

This package contains models that validate the chiller models. The examples plot various outputs, which have been verified against analytical solutions. These model outputs are stored as reference data to allow continuous validation whenever models in the library change.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.Fluid.Chillers.Validation.AbsorptionIndirectSteam_EnergyPlus AbsorptionIndirectSteam_EnergyPlus Validation with EnergyPlus model
Buildings.Fluid.Chillers.Validation.CarnotVerifyCOP CarnotVerifyCOP Test model to verify the COP computation for non-zero approach temperatures
Buildings.Fluid.Chillers.Validation.CarnotVerifyEtaCarnot CarnotVerifyEtaCarnot Test model to verify the Carnot effectiveness computation for non-zero approach temperatures
Buildings.Fluid.Chillers.Validation.Carnot_TEva_2ndLaw Carnot_TEva_2ndLaw Test model to verify that the 2nd law is not violated
Buildings.Fluid.Chillers.Validation.Carnot_TEva_HighTemperature Carnot_TEva_HighTemperature Test model for Carnot_TEva with high evaporator temperature
Buildings.Fluid.Chillers.Validation.Carnot_TEva_LimitedCapacity Carnot_TEva_LimitedCapacity Test model for Carnot_TEva with limited heating capacity
Buildings.Fluid.Chillers.Validation.Carnot_TEva_etaPL Carnot_TEva_etaPL Test model for the part load efficiency curve with evaporator leaving temperature as input signal
Buildings.Fluid.Chillers.Validation.Carnot_TEva_reverseFlow Carnot_TEva_reverseFlow Test model for chiller based on Carnot efficiency and evaporator outlet temperature control signal
Buildings.Fluid.Chillers.Validation.Carnot_y_etaPL Carnot_y_etaPL Test model for the part load efficiency curve with compressor speed as input signal

Buildings.Fluid.Chillers.Validation.AbsorptionIndirectSteam_EnergyPlus Buildings.Fluid.Chillers.Validation.AbsorptionIndirectSteam_EnergyPlus

Validation with EnergyPlus model

Buildings.Fluid.Chillers.Validation.AbsorptionIndirectSteam_EnergyPlus

Information

This model validates Buildings.Fluid.Chillers.AbsorptionIndirectSteam.

The EnergyPlus results were generated using the example file IndirectAbsorptionChiller.idf from EnergyPlus 9.2, with a nominal cooling capacity of 10000 Watts.

Parameters

TypeNameDefaultDescription
Genericperper(QEva_flow_nominal=-10000...Chiller performance data

Modelica definition

model AbsorptionIndirectSteam_EnergyPlus "Validation with EnergyPlus model" package Medium = Buildings.Media.Water "Medium model"; parameter Data.AbsorptionIndirectSteam.Generic per( QEva_flow_nominal=-10000, P_nominal=150, PLRMax=1, PLRMin=0.15, mEva_flow_nominal=0.247, mCon_flow_nominal=1.1, dpEva_nominal=0, dpCon_nominal=0, capFunEva={0.690571,0.065571,-0.00289,0}, capFunCon={0.245507,0.023614,0.0000278,0.000013}, genHIR={0.18892,0.968044,1.119202,-0.5034}, EIRP={1,0,0}, genConT={0.712019,-0.00478,0.000864,-0.000013}, genEvaT={0.995571,0.046821,-0.01099,0.000608}) "Chiller performance data"; Buildings.Fluid.Chillers.AbsorptionIndirectSteam absChi( redeclare package Medium1 = Medium, redeclare package Medium2 = Medium, per=per, show_T=true, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, T1_start=25 + 273.15, T2_start=10 + 273.15) "Absorption indirect chiller"; Buildings.Fluid.Sources.MassFlowSource_T conPum( redeclare package Medium = Medium, use_m_flow_in=true, m_flow=per.mCon_flow_nominal, use_T_in=true, nPorts=1) "Condenser water pump"; Buildings.Fluid.Sources.MassFlowSource_T evaPum( redeclare package Medium = Medium, use_m_flow_in=true, m_flow=per.mEva_flow_nominal, nPorts=1, use_T_in=true) "Evaporator water pump"; Buildings.Fluid.Sources.Boundary_pT cooVol( redeclare package Medium = Medium, nPorts=1) "Volume for cooling load"; Buildings.Fluid.Sources.Boundary_pT heaVol( redeclare package Medium = Medium, nPorts=1) "Volume for heating load"; Modelica.Blocks.Math.RealToBoolean realToBoolean(threshold=1); Modelica.Blocks.Sources.CombiTimeTable datRea( tableOnFile=true, fileName=ModelicaServices.ExternalReferences.loadResource( "modelica://Buildings/Resources/Data/Fluid/Chillers/Validation/IndirectAbsorptionChiller/IndirectAbsorptionChiller.dat"), columns=2:11, tableName="EnergyPlus", smoothness=Modelica.Blocks.Types.Smoothness.ConstantSegments) "Reader for \"IndirectAbsorptionChiller.idf\" EnergyPlus example results"; Modelica.Blocks.Sources.RealExpression QGen_EP(y=datRea.y[10]) "EnergyPlus results: generator heat flow rate"; Modelica.Blocks.Sources.RealExpression QCon_EP(y=datRea.y[6]) "EnergyPlus results: condenser heat flow rate"; Modelica.Blocks.Sources.RealExpression QEva_EP(y=-1*datRea.y[2]) "EnergyPlus results: evaporator heat flow rate"; Controls.OBC.UnitConversions.From_degC TConIn "Condenser inlet temperature"; Controls.OBC.UnitConversions.From_degC TEvaSet "Evaporator setpoint temperature"; Controls.OBC.UnitConversions.From_degC TEvaIn "Evaporator inlet temperature"; equation connect(evaPum.ports[1], absChi.port_a2); connect(absChi.on, realToBoolean.y); connect(conPum.ports[1], absChi.port_a1); connect(absChi.port_b1, heaVol.ports[1]); connect(absChi.port_b2, cooVol.ports[1]); connect(datRea.y[1], realToBoolean.u); connect(datRea.y[5], evaPum.m_flow_in); connect(datRea.y[9], conPum.m_flow_in); connect(datRea.y[7], TConIn.u); connect(TConIn.y, conPum.T_in); connect(datRea.y[4], TEvaSet.u); connect(TEvaSet.y, absChi.TSet); connect(datRea.y[3], TEvaIn.u); connect(TEvaIn.y, evaPum.T_in); end AbsorptionIndirectSteam_EnergyPlus;

Buildings.Fluid.Chillers.Validation.CarnotVerifyCOP Buildings.Fluid.Chillers.Validation.CarnotVerifyCOP

Test model to verify the COP computation for non-zero approach temperatures

Buildings.Fluid.Chillers.Validation.CarnotVerifyCOP

Information

This example verifies that the coefficient of performance is identical to the one specified for the nominal operating point if the current operating conditions are the same as the nominal conditions. It thus verifies the correct deviation of the nominal parameters.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
RealCOP_nominal3Coefficient of performance
TemperatureTCon_nominal273.15 + 30Nominal condensor temperature [K]
TemperatureTEva_nominal273.15 + 5Nominal evaporator temperature [K]
HeatFlowRateQEva_flow_nominal-10E3Nominal evaporator heat flow rate (QEva_flow_nominal < 0) [W]
HeatFlowRateQCon_flow_nominal-QEva_flow_nominal*(1 + 1/CO...Nominal condenser heat flow rate (QCon_flow_nominal > 0) [W]
TemperatureDifferencedTEva_nominal-10Temperature difference evaporator outlet-inlet [K]
TemperatureDifferencedTCon_nominal10Temperature difference condenser outlet-inlet [K]
MassFlowRatemCon_flow_nominalQCon_flow_nominal/cp_default...Nominal mass flow rate at condenser [kg/s]
MassFlowRatemEva_flow_nominalQEva_flow_nominal/cp_default...Nominal mass flow rate of evaporator [kg/s]

Modelica definition

model CarnotVerifyCOP "Test model to verify the COP computation for non-zero approach temperatures" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water "Medium model"; parameter Real COP_nominal = 3 "Coefficient of performance"; parameter Modelica.Units.SI.Temperature TCon_nominal=273.15 + 30 "Nominal condensor temperature"; parameter Modelica.Units.SI.Temperature TEva_nominal=273.15 + 5 "Nominal evaporator temperature"; parameter Modelica.Units.SI.HeatFlowRate QEva_flow_nominal=-10E3 "Nominal evaporator heat flow rate (QEva_flow_nominal < 0)"; parameter Modelica.Units.SI.HeatFlowRate QCon_flow_nominal=-QEva_flow_nominal *(1 + 1/COP_nominal) "Nominal condenser heat flow rate (QCon_flow_nominal > 0)"; parameter Modelica.Units.SI.TemperatureDifference dTEva_nominal=-10 "Temperature difference evaporator outlet-inlet"; parameter Modelica.Units.SI.TemperatureDifference dTCon_nominal=10 "Temperature difference condenser outlet-inlet"; parameter Modelica.Units.SI.MassFlowRate mCon_flow_nominal=QCon_flow_nominal/ cp_default/dTCon_nominal "Nominal mass flow rate at condenser"; parameter Modelica.Units.SI.MassFlowRate mEva_flow_nominal=QEva_flow_nominal/ cp_default/dTEva_nominal "Nominal mass flow rate of evaporator"; final parameter Modelica.Units.SI.SpecificHeatCapacity cp_default= Medium.specificHeatCapacityCp(Medium.setState_pTX( p=Medium.p_default, T=Medium.T_default, X=Medium.X_default)) "Specific heat capacity of medium 1 at default medium state"; Carnot_TEva chi_TEva( dp1_nominal=0, dp2_nominal=0, redeclare package Medium1 = Medium, redeclare package Medium2 = Medium, QEva_flow_nominal=QEva_flow_nominal, dTEva_nominal=dTEva_nominal, dTCon_nominal=dTCon_nominal, m1_flow_nominal=mCon_flow_nominal, m2_flow_nominal=mEva_flow_nominal, use_eta_Carnot_nominal=false, COP_nominal=COP_nominal, show_T=true, TCon_nominal=TCon_nominal, TEva_nominal=TEva_nominal, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) "Chiller with evaporator leaving water temperature as set point"; Sources.MassFlowSource_T bouCon( nPorts=1, redeclare package Medium = Medium, m_flow=mCon_flow_nominal, T=TCon_nominal - QCon_flow_nominal/cp_default/mCon_flow_nominal) "Boundary condition for condener"; Sources.MassFlowSource_T bouEva( redeclare package Medium = Medium, nPorts=1, m_flow=mEva_flow_nominal, T=TEva_nominal - QEva_flow_nominal/cp_default/mEva_flow_nominal) "Boundary condition for evaporator"; Modelica.Blocks.Sources.Constant TEvaLvg(k=273.15 + 5) "Leaving water temperature"; Sources.Boundary_pT bou( nPorts=1, redeclare package Medium = Medium) "Pressure boundary condition"; Sources.Boundary_pT bou1( nPorts=1, redeclare package Medium = Medium) "Pressure boundary condition"; Carnot_y chi_y( dp1_nominal=0, dp2_nominal=0, redeclare package Medium1 = Medium, redeclare package Medium2 = Medium, dTEva_nominal=dTEva_nominal, dTCon_nominal=dTCon_nominal, m1_flow_nominal=mCon_flow_nominal, m2_flow_nominal=mEva_flow_nominal, use_eta_Carnot_nominal=false, COP_nominal=COP_nominal, show_T=true, TCon_nominal=TCon_nominal, TEva_nominal=TEva_nominal, P_nominal=QEva_flow_nominal + QCon_flow_nominal, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) "Chiller with control signal as set point"; Sources.MassFlowSource_T bouCon1( nPorts=1, redeclare package Medium = Medium, m_flow=mCon_flow_nominal, T=TCon_nominal - QCon_flow_nominal/cp_default/mCon_flow_nominal) "Boundary condition for condenser"; Sources.MassFlowSource_T bouEva1( redeclare package Medium = Medium, nPorts=1, m_flow=mEva_flow_nominal, T=TEva_nominal - QEva_flow_nominal/cp_default/mEva_flow_nominal) "Boundary condition for evaporator"; Modelica.Blocks.Sources.Constant y(k=1) "Control signal"; Sources.Boundary_pT bou2( nPorts=1, redeclare package Medium = Medium) "Pressure boundary condition"; Sources.Boundary_pT bou3( nPorts=1, redeclare package Medium = Medium) "Pressure boundary condition"; equation connect(bouCon.ports[1], chi_TEva.port_a1); connect(TEvaLvg.y, chi_TEva.TSet); connect(bou.ports[1], chi_TEva.port_b2); connect(chi_TEva.port_a2, bouEva.ports[1]); connect(bou1.ports[1], chi_TEva.port_b1); connect(bouCon1.ports[1], chi_y.port_a1); connect(bou2.ports[1], chi_y.port_b2); connect(chi_y.port_a2, bouEva1.ports[1]); connect(bou3.ports[1], chi_y.port_b1); connect(y.y, chi_y.y); end CarnotVerifyCOP;

Buildings.Fluid.Chillers.Validation.CarnotVerifyEtaCarnot Buildings.Fluid.Chillers.Validation.CarnotVerifyEtaCarnot

Test model to verify the Carnot effectiveness computation for non-zero approach temperatures

Buildings.Fluid.Chillers.Validation.CarnotVerifyEtaCarnot

Information

This example verifies that the coefficient of performance is identical to the one specified for the nominal operating point if the current operating conditions are the same as the nominal conditions. It thus verifies the correct deviation of the nominal parameters for the situation where the Carnot effectiveness is specified as a parameter.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
RealetaCarnot_nominal0.315046Carnot effectiveness (=COP/COP_Carnot) used if use_eta_Carnot_nominal = true
TemperatureDifferenceTAppCon_nominal2Temperature difference between refrigerant and working fluid outlet in condenser [K]
TemperatureDifferenceTAppEva_nominal2Temperature difference between refrigerant and working fluid outlet in evaporator [K]
RealCOP_nominaletaCarnot_nominal*(TEva_nomi...Coefficient of performance
TemperatureTCon_nominal273.15 + 30Nominal condensor temperature [K]
TemperatureTEva_nominal273.15 + 5Nominal evaporator temperature [K]
HeatFlowRateQEva_flow_nominal-10E3Nominal evaporator heat flow rate (QEva_flow_nominal < 0) [W]
HeatFlowRateQCon_flow_nominal-QEva_flow_nominal*(1 + 1/CO...Nominal condenser heat flow rate (QCon_flow_nominal > 0) [W]
TemperatureDifferencedTEva_nominal-10Temperature difference evaporator outlet-inlet [K]
TemperatureDifferencedTCon_nominal10Temperature difference condenser outlet-inlet [K]
MassFlowRatemCon_flow_nominalQCon_flow_nominal/cp_default...Nominal mass flow rate at condenser [kg/s]
MassFlowRatemEva_flow_nominalQEva_flow_nominal/cp_default...Nominal mass flow rate of evaporator [kg/s]

Modelica definition

model CarnotVerifyEtaCarnot "Test model to verify the Carnot effectiveness computation for non-zero approach temperatures" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water "Medium model"; parameter Real etaCarnot_nominal=0.315046 "Carnot effectiveness (=COP/COP_Carnot) used if use_eta_Carnot_nominal = true"; parameter Modelica.Units.SI.TemperatureDifference TAppCon_nominal=2 "Temperature difference between refrigerant and working fluid outlet in condenser"; parameter Modelica.Units.SI.TemperatureDifference TAppEva_nominal=2 "Temperature difference between refrigerant and working fluid outlet in evaporator"; parameter Real COP_nominal = etaCarnot_nominal * (TEva_nominal-TAppEva_nominal)/ (TCon_nominal + TAppCon_nominal - (TEva_nominal-TAppEva_nominal)) "Coefficient of performance"; parameter Modelica.Units.SI.Temperature TCon_nominal=273.15 + 30 "Nominal condensor temperature"; parameter Modelica.Units.SI.Temperature TEva_nominal=273.15 + 5 "Nominal evaporator temperature"; parameter Modelica.Units.SI.HeatFlowRate QEva_flow_nominal=-10E3 "Nominal evaporator heat flow rate (QEva_flow_nominal < 0)"; parameter Modelica.Units.SI.HeatFlowRate QCon_flow_nominal=-QEva_flow_nominal *(1 + 1/COP_nominal) "Nominal condenser heat flow rate (QCon_flow_nominal > 0)"; parameter Modelica.Units.SI.TemperatureDifference dTEva_nominal=-10 "Temperature difference evaporator outlet-inlet"; parameter Modelica.Units.SI.TemperatureDifference dTCon_nominal=10 "Temperature difference condenser outlet-inlet"; parameter Modelica.Units.SI.MassFlowRate mCon_flow_nominal=QCon_flow_nominal/ cp_default/dTCon_nominal "Nominal mass flow rate at condenser"; parameter Modelica.Units.SI.MassFlowRate mEva_flow_nominal=QEva_flow_nominal/ cp_default/dTEva_nominal "Nominal mass flow rate of evaporator"; final parameter Modelica.Units.SI.SpecificHeatCapacity cp_default= Medium.specificHeatCapacityCp(Medium.setState_pTX( p=Medium.p_default, T=Medium.T_default, X=Medium.X_default)) "Specific heat capacity of medium 1 at default medium state"; Carnot_TEva chi_TEva( dp1_nominal=0, dp2_nominal=0, redeclare package Medium1 = Medium, redeclare package Medium2 = Medium, QEva_flow_nominal=QEva_flow_nominal, dTEva_nominal=dTEva_nominal, dTCon_nominal=dTCon_nominal, m1_flow_nominal=mCon_flow_nominal, m2_flow_nominal=mEva_flow_nominal, show_T=true, TCon_nominal=TCon_nominal, TEva_nominal=TEva_nominal, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, etaCarnot_nominal=etaCarnot_nominal, TAppCon_nominal=TAppCon_nominal, TAppEva_nominal=TAppEva_nominal) "Chiller with evaporator leaving water temperature as set point"; Sources.MassFlowSource_T bouCon( nPorts=1, redeclare package Medium = Medium, m_flow=mCon_flow_nominal, T=TCon_nominal - QCon_flow_nominal/cp_default/mCon_flow_nominal) "Boundary condition for condenser"; Sources.MassFlowSource_T bouEva( redeclare package Medium = Medium, nPorts=1, m_flow=mEva_flow_nominal, T=TEva_nominal - QEva_flow_nominal/cp_default/mEva_flow_nominal) "Boundary condition for evaporator"; Modelica.Blocks.Sources.Constant TEvaLvg(k=273.15 + 5) "Leaving water temperature"; Sources.Boundary_pT bou( nPorts=1, redeclare package Medium = Medium) "Pressure boundary condition"; Sources.Boundary_pT bou1( nPorts=1, redeclare package Medium = Medium) "Pressure boundary condition"; Carnot_y chi_y( dp1_nominal=0, dp2_nominal=0, redeclare package Medium1 = Medium, redeclare package Medium2 = Medium, dTEva_nominal=dTEva_nominal, dTCon_nominal=dTCon_nominal, m1_flow_nominal=mCon_flow_nominal, m2_flow_nominal=mEva_flow_nominal, show_T=true, TCon_nominal=TCon_nominal, TEva_nominal=TEva_nominal, P_nominal=QEva_flow_nominal + QCon_flow_nominal, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, etaCarnot_nominal=etaCarnot_nominal, TAppCon_nominal=TAppCon_nominal, TAppEva_nominal=TAppEva_nominal) "Chiller with control signal as set point"; Sources.MassFlowSource_T bouCon1( nPorts=1, redeclare package Medium = Medium, m_flow=mCon_flow_nominal, T=TCon_nominal - QCon_flow_nominal/cp_default/mCon_flow_nominal) "Boundary condition for condenser"; Sources.MassFlowSource_T bouEva1( redeclare package Medium = Medium, nPorts=1, m_flow=mEva_flow_nominal, T=TEva_nominal - QEva_flow_nominal/cp_default/mEva_flow_nominal) "Boundary condition for evaporator"; Modelica.Blocks.Sources.Constant y(k=1) "Control signal"; Sources.Boundary_pT bou2( nPorts=1, redeclare package Medium = Medium) "Pressure boundary condition"; Sources.Boundary_pT bou3( nPorts=1, redeclare package Medium = Medium) "Pressure boundary condition"; equation connect(bouCon.ports[1], chi_TEva.port_a1); connect(TEvaLvg.y, chi_TEva.TSet); connect(bou.ports[1], chi_TEva.port_b2); connect(chi_TEva.port_a2, bouEva.ports[1]); connect(bou1.ports[1], chi_TEva.port_b1); connect(bouCon1.ports[1], chi_y.port_a1); connect(bou2.ports[1], chi_y.port_b2); connect(chi_y.port_a2, bouEva1.ports[1]); connect(bou3.ports[1], chi_y.port_b1); connect(y.y, chi_y.y); end CarnotVerifyEtaCarnot;

Buildings.Fluid.Chillers.Validation.Carnot_TEva_2ndLaw Buildings.Fluid.Chillers.Validation.Carnot_TEva_2ndLaw

Test model to verify that the 2nd law is not violated

Buildings.Fluid.Chillers.Validation.Carnot_TEva_2ndLaw

Information

This example verifies that the 2nd law of thermodynamics is not violated despite of a very small temperature lift.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
TemperatureDifferencedTEva_nominal-4Temperature difference evaporator outlet-inlet [K]
TemperatureDifferencedTCon_nominal4Temperature difference condenser outlet-inlet [K]
RealCOPc_nominal3Chiller COP
HeatFlowRateQEva_flow_nominal-100E3Evaporator heat flow rate [W]

Modelica definition

model Carnot_TEva_2ndLaw "Test model to verify that the 2nd law is not violated" extends Modelica.Icons.Example; package Medium = Buildings.Media.Water "Medium model"; parameter Modelica.Units.SI.TemperatureDifference dTEva_nominal=-4 "Temperature difference evaporator outlet-inlet"; parameter Modelica.Units.SI.TemperatureDifference dTCon_nominal=4 "Temperature difference condenser outlet-inlet"; parameter Real COPc_nominal = 3 "Chiller COP"; parameter Modelica.Units.SI.HeatFlowRate QEva_flow_nominal=-100E3 "Evaporator heat flow rate"; final parameter Modelica.Units.SI.MassFlowRate m2_flow_nominal= QEva_flow_nominal/dTEva_nominal/4200 "Nominal mass flow rate at chilled water side"; final parameter Modelica.Units.SI.MassFlowRate m1_flow_nominal=- m2_flow_nominal/dTCon_nominal*dTEva_nominal "Nominal mass flow rate at condeser water side"; Modelica.Blocks.Sources.Constant TEvaIn(k=273.15 + 20) "Evaporator inlet temperature"; Modelica.Blocks.Sources.Constant dTEva(k=dTEva_nominal) "Temperature difference over evaporator"; Modelica.Blocks.Math.Add TSetEvaLvg "Set point for evaporator leaving temperature"; Modelica.Blocks.Sources.Ramp dTConEva( duration=1, offset=25, height=-25) "Temperature lift condenser inlet minus evaporator outlet"; Modelica.Blocks.Math.Add TConIn "Condenser inlet temperature"; Chiller chi_b( redeclare final package Medium1 = Medium, redeclare final package Medium2 = Medium, final dTEva_nominal=dTEva_nominal, final dTCon_nominal=dTCon_nominal, final QEva_flow_nominal=QEva_flow_nominal, final m2_flow_nominal=m2_flow_nominal, final m1_flow_nominal=m1_flow_nominal) "Chiller model that uses port_b to compute Carnot efficiency"; protected model Chiller "Subsystem model with the chiller" replaceable package Medium1 = Modelica.Media.Interfaces.PartialMedium "Medium model"; replaceable package Medium2 = Modelica.Media.Interfaces.PartialMedium "Medium model"; parameter Modelica.Units.SI.TemperatureDifference dTEva_nominal "Temperature difference evaporator outlet-inlet"; parameter Modelica.Units.SI.TemperatureDifference dTCon_nominal "Temperature difference condenser outlet-inlet"; parameter Modelica.Units.SI.HeatFlowRate QEva_flow_nominal "Evaporator heat flow rate"; parameter Modelica.Units.SI.MassFlowRate m1_flow_nominal "Nominal mass flow rate at condeser water side"; parameter Modelica.Units.SI.MassFlowRate m2_flow_nominal "Nominal mass flow rate at chilled water side"; Buildings.Fluid.Sources.MassFlowSource_T sou1( redeclare package Medium = Medium1, nPorts=1, use_m_flow_in=false, use_T_in=true, m_flow=m1_flow_nominal) "Mass flow rate source"; Buildings.Fluid.Sources.Boundary_pT sin1(redeclare package Medium = Medium2, nPorts=1) "Pressure source"; Buildings.Fluid.Chillers.Carnot_TEva chi( redeclare package Medium1 = Medium1, redeclare package Medium2 = Medium2, dTEva_nominal=dTEva_nominal, dTCon_nominal=dTCon_nominal, m2_flow_nominal=m2_flow_nominal, show_T=true, QEva_flow_nominal=QEva_flow_nominal, allowFlowReversal1=false, allowFlowReversal2=false, etaCarnot_nominal=0.3, dp1_nominal=0, dp2_nominal=0, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, use_eta_Carnot_nominal=true) "Chiller model"; Buildings.Fluid.Sources.MassFlowSource_T sou2( redeclare package Medium = Medium2, m_flow=m2_flow_nominal, use_T_in=true, T=293.15, nPorts=1) "Mass flow rate source"; Buildings.Fluid.Sensors.EntropyFlowRate S_a1( redeclare package Medium = Medium1, m_flow_nominal=m1_flow_nominal, tau=0) "Entropy flow rate sensor"; Buildings.Fluid.Sensors.EntropyFlowRate S_a2( redeclare package Medium = Medium1, m_flow_nominal=m1_flow_nominal, tau=0) "Entropy flow rate sensor"; Buildings.Fluid.Sensors.EntropyFlowRate S_a3( redeclare package Medium = Medium1, m_flow_nominal=m1_flow_nominal, tau=0) "Entropy flow rate sensor"; Buildings.Fluid.Sensors.EntropyFlowRate S_a4( redeclare package Medium = Medium1, m_flow_nominal=m1_flow_nominal, tau=0) "Entropy flow rate sensor"; Buildings.Fluid.Sources.Boundary_pT sin2(redeclare package Medium = Medium2, nPorts=1) "Pressure source"; Modelica.Blocks.Math.Add SIn_flow "Entropy carried by flow that goes into the chiller"; Modelica.Blocks.Math.Add SOut_flow "Entropy carried by flow that leaves the chiller"; Modelica.Blocks.Math.Add dS_flow(k1=-1) "Change in entropy inflow and outflow"; Modelica.Blocks.Interfaces.RealInput TSetEvaLea(unit="K") "Set point for evaporator leaving temperature"; Modelica.Blocks.Interfaces.RealOutput SGen_flow "Entropy generated"; Modelica.Blocks.Interfaces.RealInput TConIn(final unit="K", displayUnit= "degC") "Condenser inlet temperature"; Modelica.Blocks.Interfaces.RealInput TEvaIn(final unit="K", displayUnit= "degC") "Evaporator inlet temperature"; equation assert(SGen_flow > 0, "Entropy generated is zero or negative, which violates the 2nd law. This is because the model is configured to use the inlet temperatures to compute the Carnot efficiency, which can lead to non-physical results.", level = AssertionLevel.warning); connect(SIn_flow.y, dS_flow.u1); connect(sin1.ports[1],S_a2. port_b); connect(sou1.ports[1],S_a1. port_a); connect(S_a1.port_b,chi. port_a1); connect(chi.port_b1,S_a4. port_a); connect(S_a4.port_b,sin2. ports[1]); connect(S_a3.port_a,sou2. ports[1]); connect(S_a2.port_a,chi. port_b2); connect(S_a3.port_b,chi. port_a2); connect(S_a4.S_flow,SOut_flow. u2); connect(S_a2.S_flow,SOut_flow. u1); connect(S_a3.S_flow,SIn_flow. u2); connect(S_a1.S_flow,SIn_flow. u1); connect(SOut_flow.y,dS_flow. u2); connect(TSetEvaLea, chi.TSet); connect(SGen_flow, dS_flow.y); connect(TConIn, sou1.T_in); connect(TEvaIn, sou2.T_in); end Chiller; equation connect(TSetEvaLvg.u1, TEvaIn.y); connect(dTEva.y, TSetEvaLvg.u2); connect(TSetEvaLvg.y, TConIn.u1); connect(dTConEva.y, TConIn.u2); connect(TEvaIn.y, chi_b.TEvaIn); connect(TSetEvaLvg.y, chi_b.TSetEvaLea); connect(chi_b.TConIn, TConIn.y); end Carnot_TEva_2ndLaw;

Buildings.Fluid.Chillers.Validation.Carnot_TEva_HighTemperature Buildings.Fluid.Chillers.Validation.Carnot_TEva_HighTemperature

Test model for Carnot_TEva with high evaporator temperature

Buildings.Fluid.Chillers.Validation.Carnot_TEva_HighTemperature

Information

This example extends from Buildings.Fluid.Chillers.Examples.Carnot_TEva but increases the set point for the leaving evaporator temperature to be above its inlet temperature, in which case the model provides no cooling. Towards the end of the simulation, the inlet temperature of the evaporator is increased to be above the condenser temperature. In this domain, the model requires cooling again. While this is not a meaningful operating point for the model, the example verifies that it robustly simulates this regime.

Extends from Examples.Carnot_TEva (Test model for chiller based on Carnot efficiency and evaporator outlet temperature control signal).

Parameters

TypeNameDefaultDescription
TemperatureDifferencedTEva_nominal-10Temperature difference evaporator outlet-inlet [K]
TemperatureDifferencedTCon_nominal10Temperature difference condenser outlet-inlet [K]
RealCOPc_nominal3Chiller COP
HeatFlowRateQEva_flow_nominal-100E3Evaporator heat flow rate [W]
MassFlowRatem2_flow_nominalQEva_flow_nominal/dTEva_nomi...Nominal mass flow rate at chilled water side [kg/s]

Modelica definition

model Carnot_TEva_HighTemperature "Test model for Carnot_TEva with high evaporator temperature" extends Examples.Carnot_TEva(TEvaLvg(height=34), sou2(use_T_in=true)); Modelica.Blocks.Sources.Ramp TEvaEnt( startTime=3000, height=38, offset=273.15 + 22, duration=60) "Control signal for evaporator entering temperature"; equation connect(TEvaEnt.y, sou2.T_in); end Carnot_TEva_HighTemperature;

Buildings.Fluid.Chillers.Validation.Carnot_TEva_LimitedCapacity Buildings.Fluid.Chillers.Validation.Carnot_TEva_LimitedCapacity

Test model for Carnot_TEva with limited heating capacity

Buildings.Fluid.Chillers.Validation.Carnot_TEva_LimitedCapacity

Information

This example extends from Buildings.Fluid.Chillers.Examples.Carnot_TEva but limits the cooling capacity.

Extends from Examples.Carnot_TEva (Test model for chiller based on Carnot efficiency and evaporator outlet temperature control signal).

Parameters

TypeNameDefaultDescription
TemperatureDifferencedTEva_nominal-10Temperature difference evaporator outlet-inlet [K]
TemperatureDifferencedTCon_nominal10Temperature difference condenser outlet-inlet [K]
RealCOPc_nominal3Chiller COP
HeatFlowRateQEva_flow_nominal-100E3Evaporator heat flow rate [W]
MassFlowRatem2_flow_nominalQEva_flow_nominal/dTEva_nomi...Nominal mass flow rate at chilled water side [kg/s]

Modelica definition

model Carnot_TEva_LimitedCapacity "Test model for Carnot_TEva with limited heating capacity" extends Examples.Carnot_TEva( chi(QEva_flow_min=-100000)); end Carnot_TEva_LimitedCapacity;

Buildings.Fluid.Chillers.Validation.Carnot_TEva_etaPL Buildings.Fluid.Chillers.Validation.Carnot_TEva_etaPL

Test model for the part load efficiency curve with evaporator leaving temperature as input signal

Buildings.Fluid.Chillers.Validation.Carnot_TEva_etaPL

Information

This example extends from Buildings.Fluid.Chillers.Examples.Carnot_TEva but has a part load efficiency that varies with the load.

Extends from Examples.Carnot_TEva (Test model for chiller based on Carnot efficiency and evaporator outlet temperature control signal).

Parameters

TypeNameDefaultDescription
TemperatureDifferencedTEva_nominal-10Temperature difference evaporator outlet-inlet [K]
TemperatureDifferencedTCon_nominal10Temperature difference condenser outlet-inlet [K]
RealCOPc_nominal3Chiller COP
HeatFlowRateQEva_flow_nominal-100E3Evaporator heat flow rate [W]
MassFlowRatem2_flow_nominalQEva_flow_nominal/dTEva_nomi...Nominal mass flow rate at chilled water side [kg/s]

Modelica definition

model Carnot_TEva_etaPL "Test model for the part load efficiency curve with evaporator leaving temperature as input signal" extends Examples.Carnot_TEva( chi(a={0.7,0.3}, QEva_flow_min=-100000)); end Carnot_TEva_etaPL;

Buildings.Fluid.Chillers.Validation.Carnot_TEva_reverseFlow Buildings.Fluid.Chillers.Validation.Carnot_TEva_reverseFlow

Test model for chiller based on Carnot efficiency and evaporator outlet temperature control signal

Buildings.Fluid.Chillers.Validation.Carnot_TEva_reverseFlow

Information

Example that simulates a chiller whose efficiency is scaled based on the Carnot cycle. The chiller takes as an input the evaporator leaving water temperature. The condenser mass flow rate is computed in such a way that it has a temperature difference equal to dTEva_nominal.

This example checks the correct behavior if a mass flow rate attains zero.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

TypeNameDefaultDescription
TemperatureDifferencedTEva_nominal-10Temperature difference evaporator inlet-outlet [K]
TemperatureDifferencedTCon_nominal10Temperature difference condenser outlet-inlet [K]
RealCOPc_nominal3Chiller COP
HeatFlowRateQEva_flow_nominal-100E3Evaporator heat flow rate [W]
MassFlowRatem2_flow_nominalQEva_flow_nominal/dTEva_nomi...Nominal mass flow rate at chilled water side [kg/s]
MassFlowRatem1_flow_nominalm2_flow_nominal*(COPc_nomina...Nominal mass flow rate at condenser water wide [kg/s]

Modelica definition

model Carnot_TEva_reverseFlow "Test model for chiller based on Carnot efficiency and evaporator outlet temperature control signal" extends Modelica.Icons.Example; package Medium1 = Buildings.Media.Water "Medium model"; package Medium2 = Buildings.Media.Water "Medium model"; parameter Modelica.Units.SI.TemperatureDifference dTEva_nominal=-10 "Temperature difference evaporator inlet-outlet"; parameter Modelica.Units.SI.TemperatureDifference dTCon_nominal=10 "Temperature difference condenser outlet-inlet"; parameter Real COPc_nominal = 3 "Chiller COP"; parameter Modelica.Units.SI.HeatFlowRate QEva_flow_nominal=-100E3 "Evaporator heat flow rate"; parameter Modelica.Units.SI.MassFlowRate m2_flow_nominal=QEva_flow_nominal/ dTEva_nominal/4200 "Nominal mass flow rate at chilled water side"; parameter Modelica.Units.SI.MassFlowRate m1_flow_nominal=m2_flow_nominal*( COPc_nominal + 1)/COPc_nominal "Nominal mass flow rate at condenser water wide"; Buildings.Fluid.Chillers.Carnot_TEva chi( redeclare package Medium1 = Medium1, redeclare package Medium2 = Medium2, dTEva_nominal=dTEva_nominal, dTCon_nominal=dTCon_nominal, use_eta_Carnot_nominal=true, etaCarnot_nominal=0.3, m1_flow_nominal=m1_flow_nominal, m2_flow_nominal=m2_flow_nominal, show_T=true, QEva_flow_nominal=QEva_flow_nominal, allowFlowReversal1=true, allowFlowReversal2=true, dp1_nominal=6000, dp2_nominal=6000) "Chiller model"; Buildings.Fluid.Sources.MassFlowSource_T sou1(nPorts=1, redeclare package Medium = Medium1, m_flow=m1_flow_nominal, use_T_in=false, use_m_flow_in=true, T=298.15); Buildings.Fluid.Sources.MassFlowSource_T sou2(nPorts=1, redeclare package Medium = Medium2, m_flow=m2_flow_nominal, use_T_in=false, use_m_flow_in=true, T=295.15); Buildings.Fluid.Sources.Boundary_pT sin1( redeclare package Medium = Medium1, nPorts=1); Buildings.Fluid.Sources.Boundary_pT sin2(nPorts=1, redeclare package Medium = Medium2); Modelica.Blocks.Sources.Constant TEvaLvg(k=273.15 + 10) "Control signal for evaporator leaving temperature"; Modelica.Blocks.Math.Gain mCon_flow(k=-1/cp1_default/dTEva_nominal) "Condenser mass flow rate"; Modelica.Blocks.Math.Add QCon_flow(k2=-1) "Condenser heat flow rate"; final parameter Modelica.Units.SI.SpecificHeatCapacity cp1_default= Medium1.specificHeatCapacityCp(Medium1.setState_pTX( Medium1.p_default, Medium1.T_default, Medium1.X_default)) "Specific heat capacity of medium 1 at default medium state"; Modelica.Blocks.Sources.Ramp mEva_flow( duration=60, startTime=1800, height=-2*m2_flow_nominal, offset=m2_flow_nominal) "Mass flow rate for evaporater"; equation connect(sou1.ports[1], chi.port_a1); connect(sou2.ports[1], chi.port_a2); connect(sin2.ports[1], chi.port_b2); connect(TEvaLvg.y, chi.TSet); connect(chi.P, QCon_flow.u1); connect(chi.QEva_flow, QCon_flow.u2); connect(QCon_flow.y, mCon_flow.u); connect(mCon_flow.y, sou1.m_flow_in); connect(chi.port_b1, sin1.ports[1]); connect(mEva_flow.y, sou2.m_flow_in); end Carnot_TEva_reverseFlow;

Buildings.Fluid.Chillers.Validation.Carnot_y_etaPL Buildings.Fluid.Chillers.Validation.Carnot_y_etaPL

Test model for the part load efficiency curve with compressor speed as input signal

Buildings.Fluid.Chillers.Validation.Carnot_y_etaPL

Information

This example extends from Buildings.Fluid.Chillers.Examples.Carnot_y but uses a part load efficiency curve that is different from 1.

Extends from Examples.Carnot_y (Test model for chiller based on Carnot_y efficiency).

Parameters

TypeNameDefaultDescription
PowerP_nominal10E3Nominal compressor power (at y=1) [W]
TemperatureDifferencedTEva_nominal-10Temperature difference evaporator outlet-inlet [K]
TemperatureDifferencedTCon_nominal10Temperature difference condenser outlet-inlet [K]
RealCOPc_nominal3Chiller COP
MassFlowRatem2_flow_nominal-P_nominal*COPc_nominal/dTEv...Nominal mass flow rate at chilled water side [kg/s]
MassFlowRatem1_flow_nominalm2_flow_nominal*(COPc_nomina...Nominal mass flow rate at condenser water wide [kg/s]

Modelica definition

model Carnot_y_etaPL "Test model for the part load efficiency curve with compressor speed as input signal" extends Examples.Carnot_y(chi(a={0.7,0.3})); end Carnot_y_etaPL;

Buildings.Fluid.Chillers.Validation.Carnot_TEva_2ndLaw.Chiller Buildings.Fluid.Chillers.Validation.Carnot_TEva_2ndLaw.Chiller

Subsystem model with the chiller

Buildings.Fluid.Chillers.Validation.Carnot_TEva_2ndLaw.Chiller

Parameters

TypeNameDefaultDescription
replaceable package Medium1Modelica.Media.Interfaces.Pa...Medium model
replaceable package Medium2Modelica.Media.Interfaces.Pa...Medium model
TemperatureDifferencedTEva_nominal Temperature difference evaporator outlet-inlet [K]
TemperatureDifferencedTCon_nominal Temperature difference condenser outlet-inlet [K]
HeatFlowRateQEva_flow_nominal Evaporator heat flow rate [W]
MassFlowRatem1_flow_nominal Nominal mass flow rate at condeser water side [kg/s]
MassFlowRatem2_flow_nominal Nominal mass flow rate at chilled water side [kg/s]

Connectors

TypeNameDescription
replaceable package Medium1Medium model
replaceable package Medium2Medium model
input RealInputTSetEvaLeaSet point for evaporator leaving temperature [K]
output RealOutputSGen_flowEntropy generated
input RealInputTConInCondenser inlet temperature [K]
input RealInputTEvaInEvaporator inlet temperature [K]

Modelica definition

model Chiller "Subsystem model with the chiller" replaceable package Medium1 = Modelica.Media.Interfaces.PartialMedium "Medium model"; replaceable package Medium2 = Modelica.Media.Interfaces.PartialMedium "Medium model"; parameter Modelica.Units.SI.TemperatureDifference dTEva_nominal "Temperature difference evaporator outlet-inlet"; parameter Modelica.Units.SI.TemperatureDifference dTCon_nominal "Temperature difference condenser outlet-inlet"; parameter Modelica.Units.SI.HeatFlowRate QEva_flow_nominal "Evaporator heat flow rate"; parameter Modelica.Units.SI.MassFlowRate m1_flow_nominal "Nominal mass flow rate at condeser water side"; parameter Modelica.Units.SI.MassFlowRate m2_flow_nominal "Nominal mass flow rate at chilled water side"; Buildings.Fluid.Sources.MassFlowSource_T sou1( redeclare package Medium = Medium1, nPorts=1, use_m_flow_in=false, use_T_in=true, m_flow=m1_flow_nominal) "Mass flow rate source"; Buildings.Fluid.Sources.Boundary_pT sin1(redeclare package Medium = Medium2, nPorts=1) "Pressure source"; Buildings.Fluid.Chillers.Carnot_TEva chi( redeclare package Medium1 = Medium1, redeclare package Medium2 = Medium2, dTEva_nominal=dTEva_nominal, dTCon_nominal=dTCon_nominal, m2_flow_nominal=m2_flow_nominal, show_T=true, QEva_flow_nominal=QEva_flow_nominal, allowFlowReversal1=false, allowFlowReversal2=false, etaCarnot_nominal=0.3, dp1_nominal=0, dp2_nominal=0, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, use_eta_Carnot_nominal=true) "Chiller model"; Buildings.Fluid.Sources.MassFlowSource_T sou2( redeclare package Medium = Medium2, m_flow=m2_flow_nominal, use_T_in=true, T=293.15, nPorts=1) "Mass flow rate source"; Buildings.Fluid.Sensors.EntropyFlowRate S_a1( redeclare package Medium = Medium1, m_flow_nominal=m1_flow_nominal, tau=0) "Entropy flow rate sensor"; Buildings.Fluid.Sensors.EntropyFlowRate S_a2( redeclare package Medium = Medium1, m_flow_nominal=m1_flow_nominal, tau=0) "Entropy flow rate sensor"; Buildings.Fluid.Sensors.EntropyFlowRate S_a3( redeclare package Medium = Medium1, m_flow_nominal=m1_flow_nominal, tau=0) "Entropy flow rate sensor"; Buildings.Fluid.Sensors.EntropyFlowRate S_a4( redeclare package Medium = Medium1, m_flow_nominal=m1_flow_nominal, tau=0) "Entropy flow rate sensor"; Buildings.Fluid.Sources.Boundary_pT sin2(redeclare package Medium = Medium2, nPorts=1) "Pressure source"; Modelica.Blocks.Math.Add SIn_flow "Entropy carried by flow that goes into the chiller"; Modelica.Blocks.Math.Add SOut_flow "Entropy carried by flow that leaves the chiller"; Modelica.Blocks.Math.Add dS_flow(k1=-1) "Change in entropy inflow and outflow"; Modelica.Blocks.Interfaces.RealInput TSetEvaLea(unit="K") "Set point for evaporator leaving temperature"; Modelica.Blocks.Interfaces.RealOutput SGen_flow "Entropy generated"; Modelica.Blocks.Interfaces.RealInput TConIn(final unit="K", displayUnit= "degC") "Condenser inlet temperature"; Modelica.Blocks.Interfaces.RealInput TEvaIn(final unit="K", displayUnit= "degC") "Evaporator inlet temperature"; equation assert(SGen_flow > 0, "Entropy generated is zero or negative, which violates the 2nd law. This is because the model is configured to use the inlet temperatures to compute the Carnot efficiency, which can lead to non-physical results.", level = AssertionLevel.warning); connect(SIn_flow.y, dS_flow.u1); connect(sin1.ports[1],S_a2. port_b); connect(sou1.ports[1],S_a1. port_a); connect(S_a1.port_b,chi. port_a1); connect(chi.port_b1,S_a4. port_a); connect(S_a4.port_b,sin2. ports[1]); connect(S_a3.port_a,sou2. ports[1]); connect(S_a2.port_a,chi. port_b2); connect(S_a3.port_b,chi. port_a2); connect(S_a4.S_flow,SOut_flow. u2); connect(S_a2.S_flow,SOut_flow. u1); connect(S_a3.S_flow,SIn_flow. u2); connect(S_a1.S_flow,SIn_flow. u1); connect(SOut_flow.y,dS_flow. u2); connect(TSetEvaLea, chi.TSet); connect(SGen_flow, dS_flow.y); connect(TConIn, sou1.T_in); connect(TEvaIn, sou2.T_in); end Chiller;