This package contains validation models.
The chiller model is configured to represent either an air-cooled
chiller (component chiAirCoo
) or a water-cooled
chiller (component chiWatCoo
).
model Compression
extends Modelica.Icons.Example;
replaceable package MediumLiq=
Buildings.Media.Water
constrainedby Modelica.Media.Interfaces.PartialMedium
;
replaceable package MediumAir=
Buildings.Media.Air
constrainedby Modelica.Media.Interfaces.PartialMedium
;
parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial
;
parameter Data.Chiller datChiAirCoo(
final typ=chiAirCoo.typ,
final use_datDes=true,
mChiWat_flow_nominal=datChiAirCoo.cap_nominal /
abs(datChiAirCoo.TChiWatSup_nominal -
Buildings.Templates.Data.Defaults.TChiWatRet) / datChiAirCoo.cpChiWat_default,
cap_nominal=750E3,
COP_nominal=Buildings.Templates.Data.Defaults.COPChiAirCoo,
dpChiWat_nominal=Buildings.Templates.Data.Defaults.dpChiWatChi,
TChiWatSup_nominal=Buildings.Templates.Data.Defaults.TChiWatSup,
TConEnt_nominal=Buildings.Templates.Data.Defaults.TOutChi,
PLR_min=0.15,
per(
capFunT={0.0, 0.1, - 0.0023814154, 0.0628316481, - 0.0009644649, -
0.0011249224},
EIRFunT={0.0, 0.0071530312, - 0.0004553574, 0.0188175079, 0.0002623276, -
0.0012881189},
EIRFunPLR={- 5.497250E-01, 5.035076E-02, - 1.927855E-05, 1.678371E+00, -
1.535993E+00, - 4.944902E-02, 0.000000E+00, 1.396972E+00, 0.000000E+00, 0.000000E+00},
PLRMax=1.15,
etaMotor=1.0))
;
parameter Buildings.Templates.Components.Data.Chiller datChiWatCoo(
final typ=chiWatCoo.typ,
final use_datDes=false,
dpChiWat_nominal=Buildings.Templates.Data.Defaults.dpChiWatChi,
dpCon_nominal=Buildings.Templates.Data.Defaults.dpConWatChi,
redeclare Buildings.Fluid.Chillers.Data.ElectricReformulatedEIR.ReformEIRChiller_Trane_CVHE_1442kW_6_61COP_VSD
per)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TChiWatSupSet(
k=datChiAirCoo.TChiWatSup_nominal,
y(
final unit="K",
displayUnit="degC"))
;
Buildings.Templates.Components.Chillers.Compression chiAirCoo(
redeclare final package MediumChiWat=
MediumLiq,
redeclare final package MediumCon=
MediumAir,
final typ=Buildings.Templates.Components.Types.Chiller.AirCooled,
show_T=true,
final dat=datChiAirCoo,
final energyDynamics=energyDynamics)
;
Buildings.Controls.OBC.CDL.Logical.Sources.TimeTable y1(
table=[
0, 0;
0.5, 1],
timeScale=1000,
period=3000)
;
Fluid.Sensors.TemperatureTwoPort TSup(
redeclare final package Medium=
MediumLiq,
final m_flow_nominal=datChiAirCoo.mChiWat_flow_nominal)
;
Fluid.Sources.Boundary_pT supChiWat(
redeclare final package Medium=
MediumLiq,
p=Buildings.Templates.Data.Defaults.pChiWat_rel_nominal + 101325,
nPorts=2)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Sin TChiWatRet(
amplitude=(datChiAirCoo.TChiWatRet_nominal - datChiAirCoo.TChiWatSup_nominal) /
2,
freqHz=2 / 3000,
y(
final unit="K",
displayUnit="degC"),
offset=datChiAirCoo.TChiWatSup_nominal +(datChiAirCoo.TChiWatRet_nominal -
datChiAirCoo.TChiWatSup_nominal) / 2,
startTime=0)
;
Fluid.Sources.Boundary_pT retChiWat(
redeclare final package Medium=
MediumLiq,
p=supChiWat.p + chiAirCoo.dpChiWat_nominal,
use_T_in=true,
nPorts=1)
;
Fluid.Sensors.TemperatureTwoPort TRet(
redeclare final package Medium=
MediumLiq,
final m_flow_nominal=datChiAirCoo.mChiWat_flow_nominal)
;
Buildings.Templates.Components.Chillers.Compression chiWatCoo(
redeclare final package MediumChiWat=
MediumLiq,
redeclare final package MediumCon=
MediumLiq,
final typ=Buildings.Templates.Components.Types.Chiller.WaterCooled,
show_T=true,
final dat=datChiWatCoo,
have_dpChiWat=false,
have_dpCon=false,
final energyDynamics=energyDynamics)
;
Fluid.Sensors.TemperatureTwoPort TRet2(
redeclare final package Medium=
MediumLiq,
final m_flow_nominal=datChiAirCoo.mChiWat_flow_nominal)
;
Fluid.Sensors.TemperatureTwoPort TSup2(
redeclare final package Medium=
MediumLiq,
final m_flow_nominal=datChiAirCoo.mChiWat_flow_nominal)
;
Fluid.Sources.Boundary_pT supConWat(
redeclare final package Medium=
MediumLiq,
p=retConWat.p + chiWatCoo.dpCon_nominal,
T=datChiWatCoo.TConEnt_nominal,
nPorts=1)
;
Fluid.Sources.Boundary_pT retConWat(
redeclare final package Medium=
MediumLiq,
p=Buildings.Templates.Data.Defaults.pChiWat_rel_nominal + 101325,
nPorts=1)
;
Fluid.FixedResistances.PressureDrop resChiWat(
redeclare final package Medium=
MediumLiq,
final m_flow_nominal=datChiWatCoo.mChiWat_flow_nominal,
final dp_nominal=datChiWatCoo.dpChiWat_nominal)
;
Fluid.FixedResistances.PressureDrop resConWat(
redeclare final package Medium=
MediumLiq,
final m_flow_nominal=datChiWatCoo.mCon_flow_nominal,
final dp_nominal=datChiWatCoo.dpCon_nominal)
;
Fluid.Sources.Boundary_pT sinAir(
redeclare final package Medium=
MediumAir,
nPorts=1)
;
Fluid.Sources.MassFlowSource_T souAir(
redeclare final package Medium=
MediumAir,
m_flow=datChiAirCoo.mCon_flow_nominal,
T=datChiAirCoo.TConEnt_nominal,
nPorts=1)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Sin TChiWatRet1(
amplitude=(datChiWatCoo.TChiWatRet_nominal - datChiWatCoo.TChiWatSup_nominal) /
2,
freqHz=2 / 3000,
y(
final unit="K",
displayUnit="degC"),
offset=datChiWatCoo.TChiWatSup_nominal +(datChiAirCoo.TChiWatRet_nominal -
datChiWatCoo.TChiWatSup_nominal) / 2,
startTime=0)
;
Fluid.Sources.Boundary_pT retChiWat1(
redeclare final package Medium=
MediumLiq,
p=supChiWat.p + chiAirCoo.dpChiWat_nominal,
use_T_in=true,
nPorts=1)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TChiWatSupSet1(
k=datChiWatCoo.TChiWatSup_nominal,
y(
final unit="K",
displayUnit="degC"))
;
protected
Interfaces.Bus bus
;
Interfaces.Bus bus2
;
initial equation
Modelica.Utilities.Streams.print("Coef at rating conditions = " +
String(
Buildings.Utilities.Math.Functions.biquadratic(
a=datChiWatCoo.per.capFunT,
x1=
Modelica.Units.Conversions.to_degC(datChiWatCoo.per.TEvaLvg_nominal),
x2=
Modelica.Units.Conversions.to_degC(datChiWatCoo.per.TConLvg_nominal))));
equation
connect(TSup.port_b, supChiWat.ports[1]);
connect(y1.y[1], bus.y1);
connect(bus, chiAirCoo.bus);
connect(retChiWat.ports[1], TRet.port_a);
connect(TSup2.port_b, supChiWat.ports[2]);
connect(bus2, chiWatCoo.bus);
connect(y1.y[1], bus2.y1);
connect(TRet2.port_b, resChiWat.port_a);
connect(supConWat.ports[1], resConWat.port_a);
connect(TRet.port_b, chiAirCoo.port_a2);
connect(chiAirCoo.port_b2, TSup.port_a);
connect(chiWatCoo.port_b2, TSup2.port_a);
connect(resChiWat.port_b, chiWatCoo.port_a2);
connect(resConWat.port_b, chiWatCoo.port_a1);
connect(chiWatCoo.port_b1, retConWat.ports[1]);
connect(TChiWatRet.y, retChiWat.T_in);
connect(TChiWatSupSet.y, bus.TSupSet);
connect(sinAir.ports[1], chiAirCoo.port_b1);
connect(souAir.ports[1], chiAirCoo.port_a1);
connect(TChiWatRet1.y, retChiWat1.T_in);
connect(retChiWat1.ports[1], TRet2.port_a);
connect(TChiWatSupSet1.y, bus2.TSupSet);
end Compression;