Buildings.DHC.Examples.Cooling

Example model for entire district cooling system

Information

This package contains an example model for district cooling system.

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

Package Content

Name Description
Buildings.DHC.Examples.Cooling.ElectricChillersDirectETS ElectricChillersDirectETS Example model for district cooling system with an electric chiller plant and a direct controlled ETS at each building

Buildings.DHC.Examples.Cooling.ElectricChillersDirectETS Buildings.DHC.Examples.Cooling.ElectricChillersDirectETS

Example model for district cooling system with an electric chiller plant and a direct controlled ETS at each building

Buildings.DHC.Examples.Cooling.ElectricChillersDirectETS

Information

This model illustrates an example of district cooling system, consisting of a cooling plant with parallel electric chillers ( Buildings.DHC.Plants.Cooling.ElectricChillerParallel), a two-pipe distribution network with plug flow pipes ( Buildings.DHC.Networks.Distribution2PipePlugFlow_v), and time series building load that have directly connected ETS with the chilled water return temperatures controlled above a minimum threshold ( Buildings.DHC.Loads.Cooling.BuildingTimeSeriesWithETS). This configuration is illustrated in the schematic below.

DC Schematic

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

Parameters

TypeNameDefaultDescription
PressuredpDis30000Total pressure drop in the district pipes [Pa]
Chiller and cooling tower
ElectricEIRChiller_York_YT_1055kW_5_96COP_VanesperChiredeclare parameter Building...Performance data of chiller
MassFlowRatemCHW_flow_nominal18.3Nominal chilled water mass flow rate [kg/s]
MassFlowRatemCW_flow_nominal34.7Nominal condenser water mass flow rate [kg/s]
PressureDifferencedpCHW_nominal44.8*1000Nominal chilled water side pressure [Pa]
PressureDifferencedpCW_nominal46.2*1000Nominal condenser water side pressure [Pa]
PowerQChi_nominalmCHW_flow_nominal*4200*(6.67...Nominal cooling capaciaty (Negative means cooling) [W]
Pumps
GenericperCHWPumperCHWPum(pressure=Buildings...Performance data for chilled water pumps
GenericperCWPumperCWPum(pressure=Buildings....Performance data for condenser water pumps
Network
IntegernLoa3Number of served loads
Buildings
StringfilNam[nLoa]{Modelica.Utilities.Files.lo...Library path of the file with thermal loads as time series

Modelica definition

model ElectricChillersDirectETS "Example model for district cooling system with an electric chiller plant and a direct controlled ETS at each building" extends Modelica.Icons.Example; package Medium=Buildings.Media.Water "Medium model for water"; // Chiller and cooling tower replaceable parameter Buildings.Fluid.Chillers.Data.ElectricEIR.ElectricEIRChiller_York_YT_1055kW_5_96COP_Vanes perChi "Performance data of chiller"; parameter Modelica.Units.SI.MassFlowRate mCHW_flow_nominal=18.3 "Nominal chilled water mass flow rate"; parameter Modelica.Units.SI.MassFlowRate mCW_flow_nominal=34.7 "Nominal condenser water mass flow rate"; parameter Modelica.Units.SI.PressureDifference dpCHW_nominal=44.8*1000 "Nominal chilled water side pressure"; parameter Modelica.Units.SI.PressureDifference dpCW_nominal=46.2*1000 "Nominal condenser water side pressure"; parameter Modelica.Units.SI.Pressure dpDis=30000 "Total pressure drop in the district pipes"; parameter Modelica.Units.SI.Power QChi_nominal=mCHW_flow_nominal*4200*(6.67-18.56) "Nominal cooling capaciaty (Negative means cooling)"; // Pumps 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})) "Performance data for chilled water pumps"; 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})) "Performance data for condenser water pumps"; // Network parameter Integer nLoa=3 "Number of served loads"; final parameter Modelica.Units.SI.MassFlowRate mCon_flow_nominal[nLoa]=fill(10,nLoa) "Nominal mass flow rate in each connection line"; // Buildings parameter String filNam[nLoa]={ Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/Data/DHC/Loads/Examples/MediumOffice-90.1-2010-5A.mos"), Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/Data/DHC/Loads/Examples/MediumOffice-90.1-2010-5A.mos"), Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/Data/DHC/Loads/Examples/MediumOffice-90.1-2010-5A.mos")} "Library path of the file with thermal loads as time series"; final parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal[nLoa]( each max=-Modelica.Constants.eps)={Buildings.DHC.Loads.BaseClasses.getPeakLoad( string="#Peak space cooling load", filNam=filNam[i]) for i in 1:nLoa} "Space cooling design load (<=0)"; 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} "Nominal mass flow rate of building cooling side"; Buildings.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) "District cooling plant"; 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")) "Weather data"; Modelica.Blocks.Sources.Constant TCHWSupSet(k=273.15+7) "Chilled water supply temperature setpoint"; Buildings.DHC.Networks.Distribution2PipePlugFlow_v 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], lDis=fill(30, nLoa), lEnd=30) "Distribution network for district cooling system"; Buildings.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)) "Vectorized time series building load model connected with ETS for cooling"; Modelica.Blocks.Sources.Constant TDisRetSet(k=273.15 + 16) "Setpoint for district return temperature"; Modelica.Blocks.Math.Sum QTotCoo_flow(nin=nLoa) "Total cooling flow rate for all buildings "; Buildings.Controls.OBC.CDL.Reals.LessThreshold offCoo(t=1e-4) "Threshold comparison to disable the plant"; Modelica.Blocks.Math.Gain norQFlo(k=1/sum(QCoo_flow_nominal)) "Normalized Q_flow"; HeatTransfer.Sources.FixedTemperature gnd[nLoa](each T=285.15) "Ground"; Controls.OBC.CDL.Logical.Timer tim(t=3600); Controls.OBC.CDL.Logical.Not onPla "On signal for the plant"; HeatTransfer.Sources.FixedTemperature gnd1[nLoa + 1](each T=285.15) "Ground"; protected parameter Modelica.Units.SI.SpecificHeatCapacity cp=Medium.specificHeatCapacityCp( Medium.setState_pTX( Medium.p_default, Medium.T_default, Medium.X_default)) "Default specific heat capacity of medium"; 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].TDisRetSet); end for; connect(buiETS.QCoo_flow, QTotCoo_flow.u); connect(QTotCoo_flow.y, norQFlo.u); connect(norQFlo.y, offCoo.u); connect(offCoo.y, tim.u); connect(tim.passed, onPla.u); connect(onPla.y, pla.on); connect(gnd.port, dis.heatPortsRet); connect(gnd1.port, dis.heatPortsDis); end ElectricChillersDirectETS;