Collection of models that illustrate model use and test models
Information
This package contains examples for the use of models that can be found in
Buildings.Fluid.Chillers.
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Package Content
Name |
Description |
AbsorptionIndirectSteam
|
Test model for absorption indirect steam chiller |
AbsorptionIndirectSteamVaryingLoad
|
Absorption chiller with varying cooling load |
Carnot_TEva
|
Test model for chiller based on Carnot efficiency and evaporator outlet temperature control signal |
Carnot_y
|
Test model for chiller based on Carnot_y efficiency |
ElectricEIR
|
Test model for chiller electric EIR |
ElectricEIR_AirCooled
|
Test model for chiller electric EIR with air-cooled condenser |
ElectricReformulatedEIR
|
Test model for chiller electric reformulated EIR |
BaseClasses
|
Package with base classes for Buildings.Fluid.Chillers.Examples |
Test model for absorption indirect steam chiller
Information
Example that simulates the absorption chiller
Buildings.Fluid.Chillers.AbsorptionIndirectSteam
for different inlet conditions.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
Generic | per | per(QEva_flow_nominal=-10000... | Chiller performance data |
Modelica definition
model AbsorptionIndirectSteam
extends Modelica.Icons.Example;
package Medium =
Buildings.Media.Water
;
parameter Buildings.Fluid.Chillers.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})
;
Buildings.Fluid.Chillers.AbsorptionIndirectSteam absIndSte(
redeclare package Medium1 = Medium,
redeclare package Medium2 = Medium,
show_T=true,
per=per,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
;
Buildings.Fluid.Sources.MassFlowSource_T conPum(
redeclare package Medium = Medium,
use_m_flow_in=false,
m_flow=per.mCon_flow_nominal,
use_T_in=true,
nPorts=1)
;
Buildings.Fluid.Sources.MassFlowSource_T evaPum(
redeclare package Medium = Medium,
m_flow=per.mEva_flow_nominal,
use_T_in=true,
nPorts=1)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp TConEnt(
height=5,
duration(displayUnit="h") = 14400,
offset=20 + 273.15,
startTime=0)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp TEvaEnt(
height=4,
duration(displayUnit="h") = 14400,
offset=12 + 273.15,
startTime=0)
;
Buildings.Fluid.Sources.Boundary_pT heaVol(
redeclare package Medium = Medium,
nPorts=1)
;
Buildings.Fluid.Sources.Boundary_pT cooVol(
redeclare package Medium = Medium,
nPorts=1)
;
Buildings.Controls.OBC.CDL.Continuous.Sources.Ramp TEvaSet(
height=4,
duration(displayUnit="h") = 14400,
offset=6 + 273.15,
startTime=0)
;
Modelica.Blocks.Sources.BooleanPulse onOff(period=3600/2) ;
equation
connect(TConEnt.y,conPum. T_in);
connect(TEvaEnt.y,evaPum. T_in);
connect(absIndSte.port_a2, evaPum.ports[1]);
connect(absIndSte.TSet, TEvaSet.y);
connect(conPum.ports[1], absIndSte.port_a1);
connect(absIndSte.port_b1, heaVol.ports[1]);
connect(cooVol.ports[1], absIndSte.port_b2);
connect(onOff.y, absIndSte.on);
end AbsorptionIndirectSteam;
Absorption chiller with varying cooling load
Information
This model validates
Buildings.Fluid.Chillers.AbsorptionIndirectSteam.
for the case with varying cooling load.
The model is constructed in a way that the temperatures which determine the performance of
the absorption chiller are kept constant in order to monitor the effects of the part load
behavior on the ratio of the provided cooling to the required steam.
Parameters
Type | Name | Default | Description |
Generic | per | per(QEva_flow_nominal=-10000... | Chiller performance data |
Modelica definition
model AbsorptionIndirectSteamVaryingLoad
package Medium =
Buildings.Media.Water ;
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})
;
Buildings.Fluid.Chillers.AbsorptionIndirectSteam chi(
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) ;
Buildings.Fluid.Sources.MassFlowSource_T conPum(
redeclare package Medium = Medium,
m_flow=per.mCon_flow_nominal,
T=273.15 + 30,
nPorts=1)
;
Buildings.Fluid.Sources.Boundary_pT bouCoo(
redeclare package Medium = Medium, nPorts=1)
;
Buildings.Fluid.Sources.Boundary_pT heaBou(
redeclare package Medium = Medium,
nPorts=1) ;
Controls.OBC.CDL.Logical.Sources.Constant on(k=true) ;
Movers.FlowControlled_m_flow pum(
redeclare package Medium = Medium,
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
m_flow_nominal=per.mEva_flow_nominal,
inputType=Buildings.Fluid.Types.InputType.Continuous,
nominalValuesDefineDefaultPressureCurve=true,
use_inputFilter=false) ;
Sources.PropertySource_T proSou(
redeclare package Medium = Medium,
use_T_in=true) ;
Controls.OBC.CDL.Continuous.Sources.Constant TSet(k=273.15 + 10) ;
Controls.OBC.CDL.Continuous.Sources.Ramp mPum_flow(
height=per.mEva_flow_nominal,
duration=86400,
offset=0) ;
Controls.OBC.CDL.Continuous.Divide QEva_QGen
;
Controls.OBC.CDL.Continuous.Divide QEva_P
;
Controls.OBC.CDL.Continuous.MultiplyByParameter gai(k=-1)
;
Controls.OBC.CDL.Continuous.Sources.Constant TEnt(k=273.15 + 15)
;
equation
connect(chi.on, on.y);
connect(conPum.ports[1], chi.port_a1);
connect(chi.port_b1, heaBou.ports[1]);
connect(bouCoo.ports[1], pum.port_a);
connect(proSou.port_a, pum.port_b);
connect(proSou.port_b, chi.port_a2);
connect(pum.port_a, chi.port_b2);
connect(TSet.y, chi.TSet);
connect(chi.QEva_flow, gai.u);
connect(QEva_P.u2, chi.P);
connect(QEva_QGen.u2, chi.QGen_flow);
connect(gai.y, QEva_P.u1);
connect(gai.y, QEva_QGen.u1);
connect(mPum_flow.y, pum.m_flow_in);
connect(TEnt.y, proSou.T_in);
end AbsorptionIndirectSteamVaryingLoad;
Test model for chiller based on Carnot efficiency and evaporator outlet temperature control signal
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
.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
TemperatureDifference | dTEva_nominal | -10 | Temperature difference evaporator outlet-inlet [K] |
TemperatureDifference | dTCon_nominal | 10 | Temperature difference condenser outlet-inlet [K] |
Real | COPc_nominal | 3 | Chiller COP |
HeatFlowRate | QEva_flow_nominal | -100E3 | Evaporator heat flow rate [W] |
MassFlowRate | m2_flow_nominal | QEva_flow_nominal/dTEva_nomi... | Nominal mass flow rate at chilled water side [kg/s] |
Modelica definition
model Carnot_TEva
extends Modelica.Icons.Example;
package Medium1 =
Buildings.Media.Water ;
package Medium2 =
Buildings.Media.Water ;
parameter Modelica.Units.SI.TemperatureDifference dTEva_nominal=-10
;
parameter Modelica.Units.SI.TemperatureDifference dTCon_nominal=10
;
parameter Real COPc_nominal = 3 ;
parameter Modelica.Units.SI.HeatFlowRate QEva_flow_nominal=-100E3
;
parameter Modelica.Units.SI.MassFlowRate m2_flow_nominal=QEva_flow_nominal/
dTEva_nominal/4200 ;
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,
use_eta_Carnot_nominal=true,
etaCarnot_nominal=0.3,
dp1_nominal=6000,
dp2_nominal=6000) ;
Buildings.Fluid.Sources.MassFlowSource_T sou1(nPorts=1,
redeclare package Medium = Medium1,
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,
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.Ramp TEvaLvg(
duration=60,
startTime=1800,
offset=273.15 + 6,
height=10) ;
Modelica.Blocks.Math.Gain mCon_flow(k=-1/cp1_default/dTEva_nominal)
;
Modelica.Blocks.Math.Add QCon_flow(k2=-1) ;
final parameter Modelica.Units.SI.SpecificHeatCapacity cp1_default=
Medium1.specificHeatCapacityCp(
Medium1.setState_pTX(
Medium1.p_default,
Medium1.T_default,
Medium1.X_default))
;
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]);
end Carnot_TEva;
Test model for chiller based on Carnot_y efficiency
Information
Example that simulates a chiller whose efficiency is scaled based on the
Carnot cycle.
The chiller control signal is the compressor speed.
Extends from Modelica.Icons.Example (Icon for runnable examples).
Parameters
Type | Name | Default | Description |
Power | P_nominal | 10E3 | Nominal compressor power (at y=1) [W] |
TemperatureDifference | dTEva_nominal | -10 | Temperature difference evaporator outlet-inlet [K] |
TemperatureDifference | dTCon_nominal | 10 | Temperature difference condenser outlet-inlet [K] |
Real | COPc_nominal | 3 | Chiller COP |
MassFlowRate | m2_flow_nominal | -P_nominal*COPc_nominal/dTEv... | Nominal mass flow rate at chilled water side [kg/s] |
MassFlowRate | m1_flow_nominal | m2_flow_nominal*(COPc_nomina... | Nominal mass flow rate at condenser water wide [kg/s] |
Modelica definition
model Carnot_y
extends Modelica.Icons.Example;
package Medium1 =
Buildings.Media.Water ;
package Medium2 =
Buildings.Media.Water ;
parameter Modelica.Units.SI.Power P_nominal=10E3
;
parameter Modelica.Units.SI.TemperatureDifference dTEva_nominal=-10
;
parameter Modelica.Units.SI.TemperatureDifference dTCon_nominal=10
;
parameter Real COPc_nominal = 3 ;
parameter Modelica.Units.SI.MassFlowRate m2_flow_nominal=-P_nominal*
COPc_nominal/dTEva_nominal/4200
;
parameter Modelica.Units.SI.MassFlowRate m1_flow_nominal=m2_flow_nominal*(
COPc_nominal + 1)/COPc_nominal
;
Buildings.Fluid.Chillers.Carnot_y chi(
redeclare package Medium1 = Medium1,
redeclare package Medium2 = Medium2,
P_nominal=P_nominal,
dTEva_nominal=dTEva_nominal,
dTCon_nominal=dTCon_nominal,
use_eta_Carnot_nominal=true,
etaCarnot_nominal=0.3,
dp1_nominal=6000,
dp2_nominal=6000,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
show_T=true,
T1_start=303.15,
T2_start=278.15) ;
Buildings.Fluid.Sources.MassFlowSource_T sou1(nPorts=1,
redeclare package Medium = Medium1,
use_T_in=true,
m_flow=m1_flow_nominal,
T=298.15);
Buildings.Fluid.Sources.MassFlowSource_T sou2(nPorts=1,
redeclare package Medium = Medium2,
use_T_in=true,
m_flow=m2_flow_nominal,
T=291.15);
Buildings.Fluid.Sources.Boundary_pT sin1(
nPorts=1,
redeclare package Medium = Medium1);
Buildings.Fluid.Sources.Boundary_pT sin2(
nPorts=1,
redeclare package Medium = Medium2);
Modelica.Blocks.Sources.Ramp uCom(
height=-1,
duration=60,
offset=1,
startTime=1800) ;
Modelica.Blocks.Sources.Ramp TCon_in(
height=10,
duration=60,
offset=273.15 + 20,
startTime=60) ;
Modelica.Blocks.Sources.Ramp TEva_in(
height=10,
duration=60,
startTime=900,
offset=273.15 + 15) ;
equation
connect(sou1.ports[1], chi.port_a1);
connect(sou2.ports[1], chi.port_a2);
connect(chi.port_b1, sin1.ports[1]);
connect(sin2.ports[1], chi.port_b2);
connect(TCon_in.y, sou1.T_in);
connect(TEva_in.y, sou2.T_in);
connect(uCom.y, chi.y);
end Carnot_y;
Test model for chiller electric EIR
Information
Example that simulates a chiller whose efficiency is computed based on the
condenser entering and evaporator leaving fluid temperature.
A bicubic polynomial is used to compute the chiller part load performance.
Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Fluid.Chillers.Examples.BaseClasses.PartialElectric (Base class for test model of chiller electric EIR).
Parameters
Modelica definition
model ElectricEIR
extends Modelica.Icons.Example;
extends Buildings.Fluid.Chillers.Examples.BaseClasses.PartialElectric(
P_nominal=-per.QEva_flow_nominal/per.COP_nominal,
mEva_flow_nominal=per.mEva_flow_nominal,
mCon_flow_nominal=per.mCon_flow_nominal,
sou1(nPorts=1),
sou2(nPorts=1));
parameter Data.ElectricEIR.ElectricEIRChiller_McQuay_WSC_471kW_5_89COP_Vanes
per ;
Buildings.Fluid.Chillers.ElectricEIR chi(
redeclare package Medium1 = Medium1,
redeclare package Medium2 = Medium2,
per=per,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
dp1_nominal=6000,
dp2_nominal=6000) ;
equation
connect(sou1.ports[1], chi.port_a1);
connect(chi.port_b1, res1.port_a);
connect(sou2.ports[1], chi.port_a2);
connect(chi.port_b2, res2.port_a);
connect(chi.on, greaterThreshold.y);
connect(chi.TSet, TSet.y);
end ElectricEIR;
Test model for chiller electric EIR with air-cooled condenser
Information
Example that simulates a chiller whose efficiency is computed based on the
condenser entering and evaporator leaving fluid temperature.
A bicubic polynomial is used to compute the chiller part load performance.
This example is for an air-cooled chiller.
Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Fluid.Chillers.Examples.BaseClasses.PartialElectric_AirCooled (Base class for test model of chiller electric EIR with air-cooled condenser).
Parameters
Modelica definition
model ElectricEIR_AirCooled
extends Modelica.Icons.Example;
extends Buildings.Fluid.Chillers.Examples.BaseClasses.PartialElectric_AirCooled
( P_nominal=-per.QEva_flow_nominal/per.COP_nominal,
mEva_flow_nominal=per.mEva_flow_nominal,
mCon_flow_nominal=per.mCon_flow_nominal,
sou1(nPorts=1),
sou2(nPorts=1));
parameter Data.ElectricEIR.ElectricEIRChiller_York_YCAL0033EE_101kW_3_1COP_AirCooled
per ;
Buildings.Fluid.Chillers.ElectricEIR chi(
redeclare package Medium1 = Medium1,
redeclare package Medium2 = Medium2,
per=per,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
dp1_nominal=6000,
dp2_nominal=6000) ;
equation
connect(sou1.ports[1], chi.port_a1);
connect(chi.port_b1, res1.port_a);
connect(sou2.ports[1], chi.port_a2);
connect(chi.port_b2, res2.port_a);
connect(chi.on, greaterThreshold.y);
connect(chi.TSet, TSet.y);
end ElectricEIR_AirCooled;
Test model for chiller electric reformulated EIR
Information
Example that simulates a chiller whose efficiency is computed based on the
condenser leaving and evaporator leaving fluid temperature.
A bicubic polynomial is used to compute the chiller part load performance.
Extends from Modelica.Icons.Example (Icon for runnable examples), Buildings.Fluid.Chillers.Examples.BaseClasses.PartialElectric (Base class for test model of chiller electric EIR).
Parameters
Modelica definition
model ElectricReformulatedEIR
extends Modelica.Icons.Example;
extends Buildings.Fluid.Chillers.Examples.BaseClasses.PartialElectric(
P_nominal=-per.QEva_flow_nominal/per.COP_nominal,
mEva_flow_nominal=per.mEva_flow_nominal,
mCon_flow_nominal=per.mCon_flow_nominal,
sou1(nPorts=1),
sou2(nPorts=1));
parameter Data.ElectricReformulatedEIR.ReformEIRChiller_McQuay_WSC_471kW_5_89COP_Vanes
per ;
Buildings.Fluid.Chillers.ElectricReformulatedEIR chi(
redeclare package Medium1 = Medium1,
redeclare package Medium2 = Medium2,
per=per,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
dp1_nominal=6000,
dp2_nominal=6000) ;
equation
connect(sou1.ports[1], chi.port_a1);
connect(chi.port_b1, res1.port_a);
connect(sou2.ports[1], chi.port_a2);
connect(chi.port_b2, res2.port_a);
connect(chi.on, greaterThreshold.y);
connect(TSet.y, chi.TSet);
end ElectricReformulatedEIR;