Buildings.Applications.DataCenters.ChillerCooled.Examples.BaseClasses
Base classes for examples
Information
This package contains base models for the examples in Buildings.Applications.DataCenters.ChillerCooled.Examples.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name | Description |
---|---|
PartialDataCenter | Partial model that impliments cooling system for data centers |
PostProcess | Post-processing |
Buildings.Applications.DataCenters.ChillerCooled.Examples.BaseClasses.PartialDataCenter
Partial model that impliments cooling system for data centers
Information
This is a partial model that describes the chilled water cooling system in a data center. The sizing data are collected from the reference.
Reference
- Taylor, S. T. (2014). How to design & control waterside economizers. ASHRAE Journal, 56(6), 30-36.
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package MediumA | Buildings.Media.Air | Medium model | |
replaceable package MediumW | Buildings.Media.Water | Medium model | |
Integer | numChi | 2 | Number of chillers |
MassFlowRate | m1_flow_chi_nominal | 34.7 | Nominal mass flow rate at condenser water in the chillers [kg/s] |
MassFlowRate | m2_flow_chi_nominal | 18.3 | Nominal mass flow rate at evaporator water in the chillers [kg/s] |
PressureDifference | dp1_chi_nominal | 46.2*1000 | Nominal pressure [Pa] |
PressureDifference | dp2_chi_nominal | 44.8*1000 | Nominal pressure [Pa] |
Power | QEva_nominal | m2_flow_chi_nominal*4200*(6.... | Nominal cooling capaciaty(Negative means cooling) [W] |
MassFlowRate | m1_flow_wse_nominal | 34.7 | Nominal mass flow rate at condenser water in the chillers [kg/s] |
MassFlowRate | m2_flow_wse_nominal | 35.3 | Nominal mass flow rate at condenser water in the chillers [kg/s] |
PressureDifference | dp1_wse_nominal | 33.1*1000 | Nominal pressure [Pa] |
PressureDifference | dp2_wse_nominal | 34.5*1000 | Nominal pressure [Pa] |
Generic | perPumCW[numChi] | perPumCW(each pressure=Build... | Performance data for condenser water pumps |
Time | tWai | 1200 | Waiting time [s] |
ThermalConductance | UA_nominal | numChi*QEva_nominal/Building... | Thermal conductance at nominal flow for sensible heat, used to compute time constant [W/K] |
MassFlowRate | mAir_flow_nominal | 161.35 | Nominal air mass flowrate [kg/s] |
Real | yValMinAHU | 0.1 | Minimum valve openning position [1] |
Temperature | TCHWSet | 273.15 + 8 | Chilled water temperature setpoint [K] |
Temperature | TSupAirSet | TCHWSet + 10 | Supply air temperature setpoint [K] |
Temperature | TRetAirSet | 273.15 + 25 | Supply air temperature setpoint [K] |
Pressure | dpSetPoi | 80000 | Differential pressure setpoint [Pa] |
PartialChillerWSE | chiWSE | chiWSE(redeclare replaceable... | Chillers and waterside economizer |
Connectors
Type | Name | Description |
---|---|---|
replaceable package MediumA | Medium model | |
replaceable package MediumW | Medium model | |
Bus | weaBus | Weather data bus |
Modelica definition
partial model PartialDataCenter
"Partial model that impliments cooling system for data centers"
replaceable package MediumA = Buildings.Media.Air "Medium model";
replaceable package MediumW = Buildings.Media.Water "Medium model";
// Chiller parameters
parameter Integer numChi=2 "Number of chillers";
parameter Modelica.SIunits.MassFlowRate m1_flow_chi_nominal= 34.7
"Nominal mass flow rate at condenser water in the chillers";
parameter Modelica.SIunits.MassFlowRate m2_flow_chi_nominal= 18.3
"Nominal mass flow rate at evaporator water in the chillers";
parameter Modelica.SIunits.PressureDifference dp1_chi_nominal = 46.2*1000
"Nominal pressure";
parameter Modelica.SIunits.PressureDifference dp2_chi_nominal = 44.8*1000
"Nominal pressure";
parameter Modelica.SIunits.Power QEva_nominal = m2_flow_chi_nominal*4200*(6.67-18.56)
"Nominal cooling capaciaty(Negative means cooling)";
// WSE parameters
parameter Modelica.SIunits.MassFlowRate m1_flow_wse_nominal= 34.7
"Nominal mass flow rate at condenser water in the chillers";
parameter Modelica.SIunits.MassFlowRate m2_flow_wse_nominal= 35.3
"Nominal mass flow rate at condenser water in the chillers";
parameter Modelica.SIunits.PressureDifference dp1_wse_nominal = 33.1*1000
"Nominal pressure";
parameter Modelica.SIunits.PressureDifference dp2_wse_nominal = 34.5*1000
"Nominal pressure";
parameter Buildings.Fluid.Movers.Data.Generic[numChi] perPumCW(
each pressure=
Buildings.Fluid.Movers.BaseClasses.Characteristics.flowParameters(
V_flow=m1_flow_chi_nominal/1000*{0.2,0.6,1.0,1.2},
dp=(dp1_chi_nominal+60000+6000)*{1.2,1.1,1.0,0.6}))
"Performance data for condenser water pumps";
parameter Modelica.SIunits.Time tWai=1200 "Waiting time";
// AHU
parameter Modelica.SIunits.ThermalConductance UA_nominal=numChi*QEva_nominal/
Buildings.Fluid.HeatExchangers.BaseClasses.lmtd(
6.67,
11.56,
12,
25)
"Thermal conductance at nominal flow for sensible heat, used to compute time constant";
parameter Modelica.SIunits.MassFlowRate mAir_flow_nominal = 161.35
"Nominal air mass flowrate";
parameter Real yValMinAHU(min=0,max=1,unit="1")=0.1
"Minimum valve openning position";
// Set point
parameter Modelica.SIunits.Temperature TCHWSet = 273.15 + 8
"Chilled water temperature setpoint";
parameter Modelica.SIunits.Temperature TSupAirSet = TCHWSet + 10
"Supply air temperature setpoint";
parameter Modelica.SIunits.Temperature TRetAirSet = 273.15 + 25
"Supply air temperature setpoint";
parameter Modelica.SIunits.Pressure dpSetPoi = 80000
"Differential pressure setpoint";
replaceable Buildings.Applications.DataCenters.ChillerCooled.Equipment.BaseClasses.PartialChillerWSE
chiWSE(
redeclare replaceable package Medium1 = MediumW,
redeclare replaceable package Medium2 = MediumW,
numChi=numChi,
m1_flow_chi_nominal=m1_flow_chi_nominal,
m2_flow_chi_nominal=m2_flow_chi_nominal,
m1_flow_wse_nominal=m1_flow_wse_nominal,
m2_flow_wse_nominal=m2_flow_wse_nominal,
dp1_chi_nominal=dp1_chi_nominal,
dp1_wse_nominal=dp1_wse_nominal,
dp2_chi_nominal=dp2_chi_nominal,
dp2_wse_nominal=dp2_wse_nominal,
redeclare each Buildings.Fluid.Chillers.Data.ElectricEIR.ElectricEIRChiller_York_YT_1055kW_5_96COP_Vanes
perChi,
use_inputFilter=false,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
use_controller=false)
"Chillers and waterside economizer";
Buildings.Fluid.Sources.Boundary_pT expVesCW(
redeclare replaceable package Medium = MediumW,
nPorts=1)
"Expansion tank";
Buildings.Fluid.HeatExchangers.CoolingTowers.YorkCalc cooTow[numChi](
redeclare each replaceable package Medium = MediumW,
each TAirInWB_nominal(displayUnit="degC") = 283.15,
each TApp_nominal=6,
each energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyStateInitial,
each dp_nominal=30000,
each m_flow_nominal=0.785*m1_flow_chi_nominal,
each PFan_nominal=18000)
"Cooling tower";
Buildings.Fluid.Sensors.TemperatureTwoPort TCHWSup(
redeclare replaceable package Medium = MediumW,
m_flow_nominal=numChi*m2_flow_chi_nominal)
"Chilled water supply temperature";
Buildings.BoundaryConditions.WeatherData.ReaderTMY3 weaData(filNam=
Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_CA_San.Francisco.Intl.AP.724940_TMY3.mos"));
Buildings.BoundaryConditions.WeatherData.Bus weaBus "Weather data bus";
Buildings.Fluid.Sensors.TemperatureTwoPort TCWSup(
redeclare replaceable package Medium = MediumW,
m_flow_nominal=numChi*m1_flow_chi_nominal)
"Condenser water supply temperature";
Buildings.Fluid.Sensors.TemperatureTwoPort TCWRet(
redeclare replaceable package Medium = MediumW,
m_flow_nominal=numChi*m1_flow_chi_nominal)
"Condenser water return temperature";
Buildings.Fluid.Movers.FlowControlled_m_flow pumCW[numChi](
redeclare each replaceable package Medium = MediumW,
each m_flow_nominal=m1_flow_chi_nominal,
each addPowerToMedium=false,
per=perPumCW,
each energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
each use_inputFilter=false)
"Condenser water pump";
Buildings.Applications.DataCenters.ChillerCooled.Equipment.CoolingCoilHumidifyingHeating
ahu(
redeclare replaceable package Medium1 = MediumW,
redeclare replaceable package Medium2 = MediumA,
m1_flow_nominal=numChi*m2_flow_chi_nominal,
m2_flow_nominal=mAir_flow_nominal,
dpValve_nominal=6000,
dp2_nominal=600,
mWatMax_flow=0.01,
UA_nominal=UA_nominal,
addPowerToMedium=false,
perFan(
pressure(dp=800*{1.2,1.12,1},
V_flow=mAir_flow_nominal/1.29*{0,0.5,1}),
motorCooledByFluid=false),
yValSwi=yValMinAHU + 0.1,
yValDeaBan=0.05,
QHeaMax_flow=30000,
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
dp1_nominal=30000)
"Air handling unit";
Buildings.Fluid.Sensors.TemperatureTwoPort TCHWRet(
redeclare replaceable package Medium = MediumW,
m_flow_nominal=numChi*m2_flow_chi_nominal)
"Chilled water return temperature";
Buildings.Fluid.Sources.Boundary_pT expVesChi(
redeclare replaceable package Medium = MediumW,
nPorts=1)
"Expansion tank";
Buildings.Fluid.Sensors.RelativePressure senRelPre(
redeclare replaceable package Medium =MediumW)
"Differential pressure";
Buildings.Fluid.Sensors.TemperatureTwoPort TAirSup(
redeclare replaceable package Medium = MediumA,
m_flow_nominal=mAir_flow_nominal)
"Supply air temperature";
Buildings.Examples.ChillerPlant.BaseClasses.SimplifiedRoom roo(
redeclare replaceable package Medium = MediumA,
rooLen=50,
rooWid=30,
rooHei=3,
m_flow_nominal=mAir_flow_nominal,
QRoo_flow=500000,
nPorts=2)
"Room model";
Buildings.Fluid.Actuators.Valves.TwoWayLinear val[numChi](
redeclare each package Medium = MediumW,
each m_flow_nominal=m1_flow_chi_nominal,
each dpValve_nominal=6000)
"Shutoff valves";
Modelica.Blocks.Sources.Constant TCHWSupSet(k=TCHWSet)
"Chilled water supply temperature setpoint";
Buildings.Applications.DataCenters.ChillerCooled.Controls.ChillerStage chiStaCon(
QEva_nominal=QEva_nominal, tWai=0,
criPoiTem=TCHWSet + 1.5)
"Chiller staging control";
Modelica.Blocks.Math.RealToBoolean chiOn[numChi]
"Real value to boolean value";
Modelica.Blocks.Math.IntegerToBoolean intToBoo(
threshold=Integer(Buildings.Applications.DataCenters.Types.CoolingModes.FullMechanical))
"Inverse on/off signal for the WSE";
Modelica.Blocks.Logical.Not wseOn
"True: WSE is on; False: WSE is off ";
Buildings.Applications.DataCenters.ChillerCooled.Controls.ConstantSpeedPumpStage
CWPumCon(
tWai=0)
"Condenser water pump controller";
Modelica.Blocks.Sources.IntegerExpression chiNumOn(
y=integer(sum(chiStaCon.y)))
"The number of running chillers";
Modelica.Blocks.Math.Gain gai[numChi](
each k=m1_flow_chi_nominal) "Gain effect";
Buildings.Applications.DataCenters.ChillerCooled.Controls.CoolingTowerSpeed cooTowSpeCon(
controllerType=Modelica.Blocks.Types.SimpleController.PI,
yMin=0,
Ti=60,
k=0.1)
"Cooling tower speed control";
Modelica.Blocks.Sources.RealExpression TCWSupSet(
y=min(29.44 + 273.15, max(273.15 + 15.56, cooTow[1].TAir + 3)))
"Condenser water supply temperature setpoint";
Modelica.Blocks.Sources.Constant TAirSupSet(k=TSupAirSet)
"Supply air temperature setpoint";
Buildings.Applications.DataCenters.ChillerCooled.Controls.VariableSpeedPumpStage
varSpeCon(
tWai=tWai,
m_flow_nominal=m2_flow_chi_nominal,
deaBanSpe=0.45)
"Speed controller";
Modelica.Blocks.Sources.RealExpression mPum_flow(
y=chiWSE.port_b2.m_flow)
"Mass flowrate of variable speed pumps";
Buildings.Controls.Continuous.LimPID pumSpe(
controllerType=Modelica.Blocks.Types.SimpleController.PI,
Ti=40,
yMin=0.2,
k=0.1)
"Pump speed controller";
Modelica.Blocks.Sources.Constant dpSetSca(k=1)
"Scaled differential pressure setpoint";
Modelica.Blocks.Math.Product pumSpeSig[numChi]
"Pump speed signal";
Buildings.Controls.Continuous.LimPID ahuValSig(
controllerType=Modelica.Blocks.Types.SimpleController.PI,
Ti=40,
reverseAction=true,
yMin=yValMinAHU,
k=0.01) "Valve position signal for the AHU";
Modelica.Blocks.Math.Product cooTowSpe[numChi]
"Cooling tower speed";
Buildings.Controls.Continuous.LimPID ahuFanSpeCon(
controllerType=Modelica.Blocks.Types.SimpleController.PI,
k=0.1,
reverseAction=true,
yMin=0.2,
Ti=240) "Fan speed controller ";
Modelica.Blocks.Sources.Constant TAirRetSet(k=TRetAirSet)
"Return air temperature setpoint";
Utilities.Psychrometrics.X_pTphi XAirSupSet(use_p_in=false)
"Mass fraction setpoint of supply air ";
Modelica.Blocks.Sources.Constant phiAirRetSet(k=0.5)
"Return air relative humidity setpoint";
Modelica.Blocks.Math.Gain gai1(k=1/dpSetPoi) "Gain effect";
equation
connect(chiWSE.port_b2, TCHWSup.port_a);
connect(chiWSE.port_b1, TCWRet.port_a);
for i in 1:numChi loop
connect(cooTow[i].TAir, weaBus.TWetBul);
connect(TCWSup.port_a, cooTow[i].port_b);
connect(pumCW[i].port_a, TCWSup.port_b);
connect(TCWRet.port_b, val[i].port_a);
end for;
connect(senRelPre.port_b, ahu.port_b1);
connect(cooTow.port_a, val.port_b);
connect(TCWRet.port_b, expVesCW.ports[1]);
connect(ahu.port_b1, expVesChi.ports[1]);
connect(chiWSE.port_b2, TCHWSup.port_a);
connect(weaData.weaBus, weaBus);
connect(chiWSE.port_b1, TCWRet.port_a);
for i in 1:numChi loop
connect(TCWSup.port_a, cooTow[i].port_b);
connect(pumCW[i].port_b, chiWSE.port_a1);
connect(chiOn[i].y, chiWSE.on[i]);
connect(cooTowSpeCon.y, cooTowSpe[i].u1);
end for;
connect(chiStaCon.y, chiOn.u);
connect(intToBoo.y, wseOn.u);
connect(wseOn.y, chiWSE.on[numChi + 1]);
connect(CWPumCon.y, gai.u);
connect(gai.y, pumCW.m_flow_in);
connect(TCWSupSet.y, cooTowSpeCon.TCWSupSet);
connect(TCHWSupSet.y, cooTowSpeCon.TCHWSupSet);
connect(TCWSup.T, cooTowSpeCon.TCWSup);
connect(TCHWSup.T, cooTowSpeCon.TCHWSup);
connect(chiWSE.TSet, TCHWSupSet.y);
connect(mPum_flow.y, varSpeCon.masFloPum);
connect(senRelPre.port_a, ahu.port_a1);
connect(pumSpe.y, varSpeCon.speSig);
connect(dpSetSca.y, pumSpe.u_s);
connect(pumSpe.y, pumSpeSig[1].u2);
connect(pumSpe.y, pumSpeSig[2].u2);
connect(varSpeCon.y, pumSpeSig.u1);
connect(TAirSupSet.y, ahuValSig.u_s);
connect(TAirSup.port_a, ahu.port_b2);
connect(TAirSup.T, ahuValSig.u_m);
connect(ahuValSig.y, ahu.uVal);
connect(TAirSupSet.y, ahu.TSet);
connect(CWPumCon.y, val.y);
connect(CWPumCon.y, cooTowSpe.u2);
connect(cooTowSpe.y, cooTow.y);
connect(TCHWRet.port_a, ahu.port_b1);
connect(chiNumOn.y, CWPumCon.numOnChi);
connect(ahu.port_a2, roo.airPorts[1]);
connect(roo.airPorts[2], TAirSup.port_b);
connect(roo.TRooAir, ahuFanSpeCon.u_m);
connect(TAirRetSet.y, ahuFanSpeCon.u_s);
connect(phiAirRetSet.y, XAirSupSet.phi);
connect(XAirSupSet.X[1], ahu.XSet_w);
connect(TAirRetSet.y, XAirSupSet.T);
connect(ahuFanSpeCon.y, ahu.uFan);
connect(gai1.y, pumSpe.u_m);
connect(gai1.u, senRelPre.p_rel);
end PartialDataCenter;
Buildings.Applications.DataCenters.ChillerCooled.Examples.BaseClasses.PostProcess
Post-processing
Information
This partial model calculate performance metrics for a data center system. The performance metrics include cooling mode signal switch times, economizing hours, and total energy consumption.
Modelica definition
partial model PostProcess "Post-processing"
Buildings.Utilities.Math.IntegratorWithReset FCTim "Free cooling time";
Modelica.Blocks.Sources.RealExpression freCooSig "Free cooling signal";
Modelica.Blocks.Sources.RealExpression parMecCooSig
"Partial mechanic cooling signal";
Buildings.Utilities.Math.IntegratorWithReset PMCTim
"Partial mechanic cooling time";
Buildings.Utilities.Math.IntegratorWithReset FMCHou
"Full mechanic cooling time";
Modelica.Blocks.Sources.RealExpression fulMecCooSig
"Full mechanic cooling signal";
Modelica.Blocks.Sources.RealExpression PHVAC
"Power consumed by HVAC system";
Modelica.Blocks.Sources.RealExpression PIT
"Power consumed by IT";
Modelica.Blocks.Continuous.Integrator EHVAC(
initType=Modelica.Blocks.Types.Init.InitialState,
y_start=0)
"Energy consumed by HVAC";
Modelica.Blocks.Continuous.Integrator EIT(
initType=Modelica.Blocks.Types.Init.InitialState,
y_start=0)
"Energy consumed by IT";
Modelica.Blocks.Math.IntegerChange sigCha(
u(start=0, fixed=true))
"Signal changes";
Modelica.Blocks.MathInteger.TriggeredAdd swiTim "Triggered addition";
Buildings.Controls.OBC.CDL.Integers.Sources.Constant conInt(k=1)
"Unit signal";
equation
connect(freCooSig.y,FCTim. u);
connect(parMecCooSig.y,PMCTim. u);
connect(fulMecCooSig.y, FMCHou.u);
connect(PHVAC.y,EHVAC. u);
connect(PIT.y,EIT. u);
connect(sigCha.y, swiTim.trigger);
connect(conInt.y, swiTim.u);
end PostProcess;