This package contains an example model for
district cooling system.
model ElectricChillersDirectETS
extends Modelica.Icons.Example;
package Medium=
Buildings.Media.Water
;
replaceable parameter Buildings.Fluid.Chillers.Data.ElectricEIR.ElectricEIRChiller_York_YT_1055kW_5_96COP_Vanes
perChi
;
parameter Modelica.Units.SI.MassFlowRate mCHW_flow_nominal=18.3
;
parameter Modelica.Units.SI.MassFlowRate mCW_flow_nominal=34.7
;
parameter Modelica.Units.SI.PressureDifference dpCHW_nominal=44.8*1000
;
parameter Modelica.Units.SI.PressureDifference dpCW_nominal=46.2*1000
;
parameter Modelica.Units.SI.Pressure dpDis=30000
;
parameter Modelica.Units.SI.Power QChi_nominal=mCHW_flow_nominal*4200*(6.67-18.56)
;
parameter Buildings.Fluid.Movers.Data.Generic perCHWPum(
pressure=
Buildings.Fluid.Movers.BaseClasses.Characteristics.flowParameters(
V_flow=mCHW_flow_nominal/1000*{0.2,0.6,0.8,1.0},
dp=(dpCHW_nominal+dpDis+20000+6000*3)*{1,0.8,0.6,0.2}))
;
parameter Buildings.Fluid.Movers.Data.Generic perCWPum(
pressure=
Buildings.Fluid.Movers.BaseClasses.Characteristics.flowParameters(
V_flow=mCW_flow_nominal/1000*{0.2,0.6,1.0,1.2},
dp=(dpCW_nominal+6000*2)*{1,0.8,0.6,0.2}))
;
parameter Integer nLoa=3
;
final parameter Modelica.Units.SI.MassFlowRate mCon_flow_nominal[nLoa]=
fill(10,nLoa)
;
parameter String filNam[nLoa]={
Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/Data/Experimental/DHC/Loads/Examples/MediumOffice-90.1-2010-5A.mos"),
Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/Data/Experimental/DHC/Loads/Examples/MediumOffice-90.1-2010-5A.mos"),
Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/Data/Experimental/DHC/Loads/Examples/MediumOffice-90.1-2010-5A.mos")}
;
final parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal[nLoa](
each max=-Modelica.Constants.eps)={
Buildings.Experimental.DHC.Loads.BaseClasses.getPeakLoad(
string="#Peak space cooling load",
filNam=filNam[i])
for i
in 1:nLoa}
;
final parameter Modelica.Units.SI.MassFlowRate mBui_flow_nominal[nLoa](
each final min=0,
each final start=0.5)={-QCoo_flow_nominal[i]/(cp*buiETS[i].dT_nominal)
for i
in 1:nLoa}
;
Buildings.Experimental.DHC.Plants.Cooling.ElectricChillerParallel pla(
perChi=perChi,
dTApp=3,
perCHWPum=perCHWPum,
perCWPum=perCWPum,
mCHW_flow_nominal=mCHW_flow_nominal,
dpCHW_nominal=dpCHW_nominal,
QChi_nominal=QChi_nominal,
mMin_flow=mCHW_flow_nominal*0.25,
mCW_flow_nominal=mCW_flow_nominal,
dpCW_nominal=dpCW_nominal,
TAirInWB_nominal=298.7,
TCW_nominal=308.15,
dT_nominal=5.56,
TMin=288.15,
PFan_nominal=5000,
tau=60,
yCHWP_start=
fill(0, 2),
yCWP_start=
fill(0, 2),
dpCooTowVal_nominal=6000,
dpCHWPumVal_nominal=6000,
dpCWPumVal_nominal=6000,
tWai=30,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
;
Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
final computeWetBulbTemperature=true,
filNam=
Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos"))
;
Modelica.Blocks.Sources.Constant TCHWSupSet(k=273.15+7)
;
Buildings.Experimental.DHC.Networks.Distribution2PipePlugFlow dis(
redeclare final package Medium=Medium,
nCon=nLoa,
allowFlowReversal=false,
mDis_flow_nominal=
sum(dis.mCon_flow_nominal),
mCon_flow_nominal=mBui_flow_nominal,
mEnd_flow_nominal=mBui_flow_nominal[nLoa],
length=
fill(30, nLoa))
;
Buildings.Experimental.DHC.Loads.Cooling.BuildingTimeSeriesWithETS buiETS[nLoa](
each yMin=0.05,
each use_inputFilter=true,
filNam=filNam,
mBui_flow_nominal=mBui_flow_nominal,
each bui(w_aLoaCoo_nominal=0.015))
;
Modelica.Blocks.Sources.Constant TDisRetSet(k=273.15 + 16)
;
Modelica.Blocks.Math.Sum QTotCoo_flow(nin=nLoa)
;
Buildings.Controls.OBC.CDL.Reals.LessThreshold offCoo(t=1e-4)
;
Modelica.Blocks.Math.Gain norQFlo(k=1/
sum(QCoo_flow_nominal))
;
HeatTransfer.Sources.FixedTemperature gnd(T=285.15) ;
Controls.OBC.CDL.Logical.Timer tim(t=3600);
Controls.OBC.CDL.Logical.Not onPla ;
protected
parameter Modelica.Units.SI.SpecificHeatCapacity cp=
Medium.specificHeatCapacityCp(
Medium.setState_pTX(
Medium.p_default,
Medium.T_default,
Medium.X_default))
;
equation
connect(weaDat.weaBus, pla.weaBus);
connect(TCHWSupSet.y, pla.TCHWSupSet);
connect(pla.port_aSerCoo, dis.port_bDisRet);
connect(dis.port_aDisSup, pla.port_bSerCoo);
connect(dis.ports_bCon, buiETS.port_aSerCoo);
connect(buiETS.port_bSerCoo, dis.ports_aCon);
for i
in 1:nLoa
loop
connect(TDisRetSet.y, buiETS[i].TSetDisRet);
end for;
connect(buiETS.QCoo_flow, QTotCoo_flow.u);
connect(QTotCoo_flow.y, norQFlo.u);
connect(norQFlo.y, offCoo.u);
connect(gnd.port, dis.heatPort);
connect(offCoo.y, tim.u);
connect(tim.passed, onPla.u);
connect(onPla.y, pla.on);
end ElectricChillersDirectETS;