Buildings.Experimental.DHC.Plants.Cooling
Package of models for central cooling production
Information
This package contains models for central plants producing chilled water.
Extends from Modelica.Icons.VariantsPackage (Icon for package containing variants).
Package Content
Name | Description |
---|---|
ElectricChillerParallel | District cooling plant model |
Controls | Package of control sequences for cooling plants |
Subsystems | Package of models for subsystems of cooling plants |
Examples | Example models integrating multiple components |
Buildings.Experimental.DHC.Plants.Cooling.ElectricChillerParallel
District cooling plant model
Information
This model showcases a generic district central cooling plant as illustrated in the schematics below.
- The cooling is provided by two parallel chillers instantiated from Buildings.Applications.BaseClasses.Equipment.ElectricChillerParallel.
- The chilled water bypass loop is controlled to ensure a minimum flow of chilled water running through the chillers all the time.
- The condenser water is cooled by two parallel cooling towers with a bypass loop. See Buildings.Experimental.DHC.Plants.Cooling.Subsystems.CoolingTowersWithBypass for the details of the modeling of the cooling towers.
- The chilled water loop is equipped with two parallel variable speed pumps, which are controlled to maitain a use-determined pressure difference setpoint at the demand side. The condenser water pumps are constant speed with prescribed mass flow rates.
- The plant operates when it receives an
on
signal from the external control.
The staging of the chillers is based on the calculated cooling load.
See Buildings.Experimental.DHC.Plants.Cooling.Controls.ChillerStage for the detailed control logic.
.
Extends from Buildings.Experimental.DHC.Plants.BaseClasses.PartialPlant (Partial class for modeling a central plant).
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Water | Service side medium | |
replaceable package MediumHea_b | Water | Service side medium at heating supply | |
PressureDifference | dpCooTowVal_nominal | Nominal pressure difference of the cooling tower valve [Pa] | |
Configuration | |||
DistrictSystemType | typ | Buildings.Experimental.DHC.T... | Type of district system |
Boolean | have_fan | true | Set to true if fan power is computed |
Boolean | have_pum | true | Set to true if pump power is computed |
Boolean | have_eleHea | false | Set to true if the plant has electric heating system |
Boolean | have_eleCoo | true | Set to true if the plant has electric cooling system |
Boolean | have_weaBus | true | Set to true to use a weather bus |
Chiller | |||
Generic | perChi | redeclare parameter Building... | Performance data of chiller |
MassFlowRate | mCHW_flow_nominal | Nominal chilled water mass flow rate [kg/s] | |
Pressure | dpCHW_nominal | Pressure difference at the chilled water side [Pa] | |
HeatFlowRate | QChi_nominal | Nominal cooling capacity of single chiller (negative means cooling) [W] | |
MassFlowRate | mMin_flow | Minimum mass flow rate of single chiller [kg/s] | |
Cooling Tower | |||
MassFlowRate | mCW_flow_nominal | Nominal condenser water mass flow rate [kg/s] | |
Pressure | dpCW_nominal | Pressure difference at the condenser water side [Pa] | |
Temperature | TAirInWB_nominal | Nominal air wetbulb temperature [K] | |
Temperature | TCW_nominal | Nominal condenser water temperature at tower inlet [K] | |
TemperatureDifference | dT_nominal | Temperature difference between inlet and outlet of the tower [K] | |
TemperatureDifference | dTApp | Approach temperature [K] | |
Temperature | TMin | Minimum allowed water temperature entering chiller [K] | |
Power | PFan_nominal | Fan power [W] | |
Pump | |||
Generic | perCHWPum | redeclare parameter Building... | Performance data of chilled water pump |
Generic | perCWPum | redeclare parameter Building... | Performance data of condenser water pump |
Pressure | dpCHWPumVal_nominal | Nominal pressure drop of chilled water pump valve [Pa] | |
Pressure | dpCWPumVal_nominal | Nominal pressure drop of condenser water pump valve [Pa] | |
Control Settings | |||
Time | tWai | Waiting time [s] | |
PressureDifference | dpSetPoi | Demand side pressure difference setpoint [Pa] | |
Assumptions | |||
Boolean | allowFlowReversal | false | Set to true to allow flow reversal in service lines |
Dynamics | |||
Conservation equations | |||
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Advanced | |||
Dynamics | |||
Dynamics | massDynamics | energyDynamics | Type of mass balance: dynamic (3 initialization options) or steady state, must be steady state if energyDynamics is steady state |
Connectors
Type | Name | Description |
---|---|---|
FluidPort_a | port_aSerAmb | Fluid connector for ambient water service supply line |
FluidPort_b | port_bSerAmb | Fluid connector for ambient water service return line |
FluidPort_a | port_aSerHea | Fluid connector for heating service supply line |
FluidPort_b | port_bSerHea | Fluid connector for heating service return line |
FluidPort_a | port_aSerCoo | Fluid connector for cooling service supply line |
FluidPort_b | port_bSerCoo | Fluid connector for cooling service return line |
Bus | weaBus | Weather data bus |
output RealOutput | PHea | Power drawn by heating system [W] |
output RealOutput | PCoo | Power drawn by cooling system [W] |
output RealOutput | PFan | Power drawn by fan motors [W] |
output RealOutput | PPum | Power drawn by pump motors [W] |
output RealOutput | QFue_flow[nFue] | Fuel energy input rate [W] |
input BooleanInput | on | On signal of the plant |
input RealInput | TCHWSupSet | Set point for chilled water supply temperature [K] |
input RealInput | dpMea | Measured pressure difference [Pa] |
Modelica definition
model ElectricChillerParallel
"District cooling plant model"
extends Buildings.Experimental.DHC.Plants.BaseClasses.PartialPlant(
have_eleCoo=true,
have_pum=true,
have_fan=true,
have_weaBus=true,
typ=Buildings.Experimental.DHC.Types.DistrictSystemType.Cooling);
// chiller parameters
final parameter Integer numChi=2
"Number of chillers";
replaceable parameter Buildings.Fluid.Chillers.Data.ElectricEIR.Generic perChi
"Performance data of chiller";
parameter Modelica.Units.SI.MassFlowRate mCHW_flow_nominal
"Nominal chilled water mass flow rate";
parameter Modelica.Units.SI.Pressure dpCHW_nominal
"Pressure difference at the chilled water side";
parameter Modelica.Units.SI.HeatFlowRate QChi_nominal(max=0)
"Nominal cooling capacity of single chiller (negative means cooling)";
parameter Modelica.Units.SI.MassFlowRate mMin_flow
"Minimum mass flow rate of single chiller";
// cooling tower parameters
parameter Modelica.Units.SI.MassFlowRate mCW_flow_nominal
"Nominal condenser water mass flow rate";
parameter Modelica.Units.SI.Pressure dpCW_nominal
"Pressure difference at the condenser water side";
parameter Modelica.Units.SI.Temperature TAirInWB_nominal
"Nominal air wetbulb temperature";
parameter Modelica.Units.SI.Temperature TCW_nominal
"Nominal condenser water temperature at tower inlet";
parameter Modelica.Units.SI.TemperatureDifference dT_nominal
"Temperature difference between inlet and outlet of the tower";
parameter Modelica.Units.SI.TemperatureDifference dTApp
"Approach temperature";
parameter Modelica.Units.SI.Temperature TMin
"Minimum allowed water temperature entering chiller";
parameter Modelica.Units.SI.Power PFan_nominal "Fan power";
// pump parameters
replaceable parameter Buildings.Fluid.Movers.Data.Generic perCHWPum
constrainedby Buildings.Fluid.Movers.Data.Generic
"Performance data of chilled water pump";
replaceable parameter Buildings.Fluid.Movers.Data.Generic perCWPum
constrainedby Buildings.Fluid.Movers.Data.Generic
"Performance data of condenser water pump";
parameter Modelica.Units.SI.Pressure dpCHWPumVal_nominal
"Nominal pressure drop of chilled water pump valve";
parameter Modelica.Units.SI.Pressure dpCWPumVal_nominal
"Nominal pressure drop of condenser water pump valve";
parameter Modelica.Units.SI.PressureDifference dpCooTowVal_nominal
"Nominal pressure difference of the cooling tower valve";
// control settings
parameter Modelica.Units.SI.Time tWai "Waiting time";
parameter Modelica.Units.SI.PressureDifference dpSetPoi(displayUnit="Pa")
"Demand side pressure difference setpoint";
// dynamics
parameter Modelica.Fluid.Types.Dynamics energyDynamics=
Modelica.Fluid.Types.Dynamics.DynamicFreeInitial
"Type of energy balance: dynamic (3 initialization options) or steady state";
parameter Modelica.Fluid.Types.Dynamics massDynamics=energyDynamics
"Type of mass balance: dynamic (3 initialization options) or steady state, must be steady state if energyDynamics is steady state";
Modelica.Blocks.Interfaces.BooleanInput on
"On signal of the plant";
Modelica.Blocks.Interfaces.RealInput TCHWSupSet(
final unit="K",
displayUnit="degC")
"Set point for chilled water supply temperature";
Modelica.Blocks.Interfaces.RealInput dpMea(
final unit="Pa")
"Measured pressure difference";
Buildings.Applications.BaseClasses.Equipment.ElectricChillerParallel mulChiSys(
use_inputFilter=false,
final per=fill(
perChi,
numChi),
final m1_flow_nominal=mCHW_flow_nominal,
final m2_flow_nominal=mCW_flow_nominal,
final dp1_nominal=dpCHW_nominal,
final dp2_nominal=dpCW_nominal,
final num=numChi,
redeclare final package Medium1=Medium,
redeclare final package Medium2=Medium)
"Chillers connected in parallel";
Buildings.Experimental.DHC.Plants.Cooling.Subsystems.CoolingTowersWithBypass cooTowWitByp(
redeclare final package Medium=Medium,
final num=numChi,
final m_flow_nominal=mCW_flow_nominal,
final dp_nominal=dpCW_nominal,
final dpValve_nominal = dpCooTowVal_nominal,
final TAirInWB_nominal=TAirInWB_nominal,
final TWatIn_nominal=TCW_nominal,
final dT_nominal=dT_nominal,
final dTApp=dTApp,
final PFan_nominal=PFan_nominal,
final TMin=TMin)
"Cooling towers with bypass valve";
Buildings.Applications.BaseClasses.Equipment.FlowMachine_y pumCHW(
redeclare final package Medium=Medium,
final per=fill(
perCHWPum,
numChi),
use_inputFilter=false,
yValve_start=fill(
1,
numChi),
final energyDynamics=energyDynamics,
final m_flow_nominal=mCHW_flow_nominal,
final dpValve_nominal=dpCHWPumVal_nominal,
final num=numChi)
"Chilled water pumps";
Buildings.Applications.BaseClasses.Equipment.FlowMachine_m pumCW(
redeclare final package Medium=Medium,
final per=fill(
perCWPum,
numChi),
final energyDynamics=energyDynamics,
final m_flow_nominal=mCW_flow_nominal,
final dpValve_nominal=dpCWPumVal_nominal,
final num=numChi)
"Condenser water pumps";
Buildings.Fluid.Actuators.Valves.TwoWayEqualPercentage valByp(
redeclare final package Medium=Medium,
final allowFlowReversal=false,
final m_flow_nominal=mCHW_flow_nominal*0.05,
final dpValve_nominal=dpCHW_nominal)
"Chilled water bypass valve";
Buildings.Fluid.Sensors.MassFlowRate senMasFloByp(
redeclare final package Medium=Medium)
"Chilled water bypass valve mass flow meter";
Buildings.Fluid.Sensors.TemperatureTwoPort senTCHWSup(
redeclare final package Medium=Medium,
final m_flow_nominal=mCHW_flow_nominal)
"Chilled water supply temperature";
Buildings.Experimental.DHC.Plants.Cooling.Controls.ChilledWaterPumpSpeed chiWatPumCon(
tWai=0,
final m_flow_nominal=mCHW_flow_nominal,
final dpSetPoi=dpSetPoi)
"Chilled water pump controller";
Buildings.Experimental.DHC.Plants.Cooling.Controls.ChillerStage chiStaCon(
final tWai=tWai,
final QChi_nominal=QChi_nominal)
"Chiller staging controller";
Buildings.Fluid.Sensors.TemperatureTwoPort senTCHWRet(
redeclare final package Medium=Medium,
final m_flow_nominal=mCHW_flow_nominal)
"Chilled water return temperature";
Buildings.Fluid.Sources.Boundary_pT expTanCW(
redeclare final package Medium=Medium,
nPorts=1)
"Condenser water expansion tank";
Buildings.Fluid.Sources.Boundary_pT expTanCHW(
redeclare final package Medium=Medium, nPorts=1)
"Chilled water expansion tank";
Buildings.Fluid.Sensors.MassFlowRate senMasFlo(
redeclare final package Medium=Medium) "Chilled water return mass flow";
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal chiOn[numChi]
"Convert chiller on signal from boolean to real";
Buildings.Controls.OBC.CDL.Continuous.MultiSum totPPum(
nin=4)
"Total pump power";
Buildings.Controls.OBC.CDL.Continuous.MultiSum totPFan(
nin=2)
"Total fan power";
Buildings.Controls.OBC.CDL.Continuous.MultiSum totPCoo(
nin=2)
"Total cooling power";
Buildings.Fluid.FixedResistances.Junction joiCHWRet(
redeclare final package Medium=Medium,
final m_flow_nominal=mCHW_flow_nominal .* {1,-1,1},
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
dp_nominal={0,0,0})
"Flow joint for the chilled water return side";
Buildings.Fluid.FixedResistances.Junction splCHWSup(
redeclare final package Medium=Medium,
final m_flow_nominal=mCHW_flow_nominal .* {1,-1,-1},
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
dp_nominal={0,0,0})
"Flow splitter for the chilled water supply side";
Buildings.Experimental.DHC.Plants.Cooling.Controls.ChilledWaterBypass chiBypCon(
final numChi=numChi,
final mMin_flow=mMin_flow)
"Chilled water bypass control";
Fluid.Sensors.MassFlowRate senMasFloCHW(redeclare final package Medium =
Medium) "Total chilled water pump mass flow rate";
protected
final parameter Medium.ThermodynamicState sta_default=Medium.setState_pTX(
T=Medium.T_default,
p=Medium.p_default,
X=Medium.X_default)
"Medium state at default properties";
final parameter Modelica.Units.SI.SpecificHeatCapacity cp_default=
Medium.specificHeatCapacityCp(sta_default)
"Specific heat capacity of the fluid";
initial equation
assert(energyDynamics <> Modelica.Fluid.Types.Dynamics.SteadyState or
massDynamics == Modelica.Fluid.Types.Dynamics.SteadyState,
"In " + getInstanceName() +
": energyDynamics is selected as steady state, and therefore massDynamics must also be steady-state.");
equation
connect(senMasFloByp.port_b,valByp.port_a);
connect(cooTowWitByp.port_b,pumCW.port_a);
connect(on,chiStaCon.on);
connect(chiWatPumCon.dpMea,dpMea);
connect(chiWatPumCon.y,pumCHW.u);
connect(pumCHW.port_b,mulChiSys.port_a2);
connect(pumCW.port_b,mulChiSys.port_a1);
connect(mulChiSys.port_b1,cooTowWitByp.port_a);
connect(expTanCW.ports[1],pumCW.port_a);
connect(senTCHWRet.port_b,senMasFlo.port_a);
connect(chiStaCon.y,mulChiSys.on);
connect(chiStaCon.y,chiOn.u);
connect(chiOn.y,pumCW.u);
connect(chiStaCon.y,cooTowWitByp.on);
connect(weaBus.TWetBul,cooTowWitByp.TWetBul);
connect(port_aSerCoo,senTCHWRet.port_a);
connect(senTCHWSup.port_b,port_bSerCoo);
connect(TCHWSupSet,mulChiSys.TSet);
connect(totPPum.y,PPum);
connect(pumCW.P,totPPum.u[1:2]);
connect(pumCHW.P,totPPum.u[3:4]);
connect(totPFan.y,PFan);
connect(cooTowWitByp.PFan,totPFan.u[1:2]);
connect(totPCoo.y,PCoo);
connect(mulChiSys.P,totPCoo.u[1:2]);
connect(mulChiSys.port_b2,splCHWSup.port_1);
connect(splCHWSup.port_3,senTCHWSup.port_a);
connect(splCHWSup.port_2,senMasFloByp.port_a);
connect(senTCHWRet.T,chiStaCon.TChiWatRet);
connect(senTCHWSup.T,chiStaCon.TChiWatSup);
connect(senMasFlo.m_flow,chiStaCon.mFloChiWat);
connect(chiBypCon.y,valByp.y);
connect(senMasFloByp.m_flow,chiBypCon.mFloByp);
connect(chiStaCon.y,chiBypCon.chiOn);
connect(senMasFlo.port_b, joiCHWRet.port_3);
connect(valByp.port_b, joiCHWRet.port_1);
connect(joiCHWRet.port_2, senMasFloCHW.port_a);
connect(senMasFloCHW.port_b, pumCHW.port_a);
connect(expTanCHW.ports[1], senMasFloCHW.port_a);
connect(senMasFloCHW.m_flow, chiWatPumCon.masFloPum);
end ElectricChillerParallel;