Buildings.Experimental.DHC.CentralPlants.Cooling.Subsystems

Package of models for subsystems of cooling plants

Information

This package contains models for subsystems composing central cooling plants.

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

Package Content

Name Description
Buildings.Experimental.DHC.CentralPlants.Cooling.Subsystems.CoolingTowersParallel CoolingTowersParallel Multiple identical cooling towers in parallel connection
Buildings.Experimental.DHC.CentralPlants.Cooling.Subsystems.CoolingTowersWithBypass CoolingTowersWithBypass Cooling tower system with bypass valve
Buildings.Experimental.DHC.CentralPlants.Cooling.Subsystems.Examples Examples Example models integrating multiple components

Buildings.Experimental.DHC.CentralPlants.Cooling.Subsystems.CoolingTowersParallel Buildings.Experimental.DHC.CentralPlants.Cooling.Subsystems.CoolingTowersParallel

Multiple identical cooling towers in parallel connection

Buildings.Experimental.DHC.CentralPlants.Cooling.Subsystems.CoolingTowersParallel

Information

This model implements a parallel cooling tower system with num identical cooling towers.

The cooling tower type is replaceable. Buildings.Fluid.HeatExchangers.CoolingTowers.Merkel is currently used in this model.

Extends from Buildings.Fluid.Interfaces.PartialTwoPortInterface (Partial model transporting fluid between two ports without storing mass or energy).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
Integernum2Number of cooling towers
PressureDifferencedpValve_nominal Nominal pressure difference of the valve [Pa]
MerkelcooTow[num]cooTow(each final allowFlowR...Cooling tower type
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
PressureDifferencedp_nominal Nominal pressure difference of the tower [Pa]
RealratWatAir_nominal0.625Design water-to-air ratio [1]
Heat transfer
TemperatureTAirInWB_nominal Nominal outdoor (air inlet) wetbulb temperature [K]
TemperatureTWatIn_nominal Nominal water inlet temperature [K]
TemperatureDifferencedT_nominal Temperature difference between inlet and outlet of the tower [K]
Fan
PowerPFan_nominal Fan power [W]
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal
Advanced
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Dynamics
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Filtered opening
Booleanuse_inputFiltertrue= true, if opening is filtered with a 2nd order CriticalDamping filter

Connectors

TypeNameDescription
replaceable package MediumMedium in the component
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
input BooleanInputon[num]On signal for cooling towers
input RealInputuFanSpeFan speed control signal [1]
input RealInputTWetBulEntering air wetbulb temperature [K]
output RealOutputPFan[num]Electric power consumed by fan [W]
output RealOutputTLvgLeaving water temperature [K]

Modelica definition

model CoolingTowersParallel "Multiple identical cooling towers in parallel connection" extends Buildings.Fluid.Interfaces.PartialTwoPortInterface( redeclare replaceable package Medium=Buildings.Media.Water); parameter Integer num( final min=1)=2 "Number of cooling towers"; parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial "Type of energy balance: dynamic (3 initialization options) or steady state"; parameter Modelica.SIunits.PressureDifference dp_nominal "Nominal pressure difference of the tower"; parameter Modelica.SIunits.PressureDifference dpValve_nominal "Nominal pressure difference of the valve"; parameter Real ratWatAir_nominal( final min=0, final unit="1")=0.625 "Design water-to-air ratio"; parameter Modelica.SIunits.Temperature TAirInWB_nominal "Nominal outdoor (air inlet) wetbulb temperature"; parameter Modelica.SIunits.Temperature TWatIn_nominal "Nominal water inlet temperature"; parameter Modelica.SIunits.TemperatureDifference dT_nominal "Temperature difference between inlet and outlet of the tower"; parameter Modelica.SIunits.Power PFan_nominal "Fan power"; parameter Boolean use_inputFilter=true "= true, if opening is filtered with a 2nd order CriticalDamping filter"; Modelica.Blocks.Interfaces.BooleanInput on[num] "On signal for cooling towers"; Modelica.Blocks.Interfaces.RealInput uFanSpe( final unit="1") "Fan speed control signal"; Modelica.Blocks.Interfaces.RealInput TWetBul( final unit="K", displayUnit="degC") "Entering air wetbulb temperature"; Modelica.Blocks.Interfaces.RealOutput PFan[num]( each final quantity="Power", each final unit="W") "Electric power consumed by fan"; Modelica.Blocks.Interfaces.RealOutput TLvg( final unit="K", displayUnit="degC") "Leaving water temperature"; replaceable Buildings.Fluid.HeatExchangers.CoolingTowers.Merkel cooTow[num]( each final allowFlowReversal=allowFlowReversal, each final m_flow_small=m_flow_small, each final ratWatAir_nominal=ratWatAir_nominal, each final TAirInWB_nominal=TAirInWB_nominal, each final TWatIn_nominal=TWatIn_nominal, each final TWatOut_nominal=TWatIn_nominal-dT_nominal, each final PFan_nominal=PFan_nominal, each final dp_nominal=0) constrainedby Buildings.Fluid.HeatExchangers.CoolingTowers.BaseClasses.CoolingTowerVariableSpeed ( redeclare each final package Medium=Medium, each final show_T=show_T, each final m_flow_nominal=m_flow_nominal, each final energyDynamics=energyDynamics) "Cooling tower type"; Buildings.Fluid.Actuators.Valves.TwoWayEqualPercentage val[num]( redeclare each final package Medium=Medium, each final allowFlowReversal=allowFlowReversal, each final m_flow_nominal=m_flow_nominal, each final dpValve_nominal=dpValve_nominal, each final use_inputFilter=use_inputFilter, each final dpFixed_nominal=dp_nominal) "Cooling tower valves"; Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea[num] "Boolean signal to real signal"; Buildings.Fluid.Sensors.TemperatureTwoPort senTem( redeclare final package Medium=Medium, final allowFlowReversal=allowFlowReversal, final m_flow_nominal=m_flow_nominal, final m_flow_small=m_flow_small, final T_start=Medium.T_default); equation for i in 1:num loop connect(port_a,val[i].port_a); connect(val[i].port_b,cooTow[i].port_a); connect(uFanSpe,cooTow[i].y); connect(TWetBul,cooTow[i].TAir); connect(cooTow[i].PFan,PFan[i]); connect(cooTow[i].port_b, senTem.port_a); end for; connect(on,booToRea.u); connect(senTem.port_b, port_b); connect(senTem.T, TLvg); connect(booToRea.y, val.y); end CoolingTowersParallel;

Buildings.Experimental.DHC.CentralPlants.Cooling.Subsystems.CoolingTowersWithBypass Buildings.Experimental.DHC.CentralPlants.Cooling.Subsystems.CoolingTowersWithBypass

Cooling tower system with bypass valve

Buildings.Experimental.DHC.CentralPlants.Cooling.Subsystems.CoolingTowersWithBypass

Information

This model simulates parallel connected cooling tower subsystem with a bypass valve.

The bypass valve is controlled to enforce that the leaving condenser water temperature does not drop below the minimum temperature TMin.

By default, the condenser water setpoint is the ambient wet bulb temperature TWetBul plus the approach temperature dTApp.

Inside the model, a cooling tower fan speed controller is also implemented to maintain the condenser water at its setpoint.

Extends from Buildings.Fluid.Interfaces.PartialTwoPortInterface (Partial model transporting fluid between two ports without storing mass or energy).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium in the component
Integernum2Number of cooling towers
PressureDifferencedpValve_nominal Nominal pressure difference of the valve [Pa]
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
Pressuredp_nominal Nominal pressure difference of the tower [Pa]
RealratWatAir_nominal0.625Design water-to-air ratio [1]
Heat transfer
TemperatureTAirInWB_nominal Nominal outdoor (air inlet) wetbulb temperature [K]
TemperatureTWatIn_nominal Nominal water inlet temperature [K]
TemperatureDifferencedT_nominal Temperature difference between inlet and outlet of the tower [K]
Fan
PowerPFan_nominal Fan power [W]
Control Settings
TemperatureDifferencedTApp3Approach temperature [K]
TemperatureTMin Minimum allowed water temperature entering chiller [K]
SimpleControllercontrollerTypeModelica.Blocks.Types.Simple...Type of fan speed controller
Realk1Gain of the tower PID controller [1]
TimeTi60Integrator time constant of the tower PID controller [s]
TimeTd0.1Derivative time constant of the tower PID controller [s]
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal
Advanced
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Dynamics
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Filtered opening
Booleanuse_inputFiltertrue= true, if opening is filtered with a 2nd order CriticalDamping filter

Connectors

TypeNameDescription
replaceable package MediumMedium in the component
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
input BooleanInputon[num]On signal for cooling towers
input RealInputTWetBulEntering air wetbulb temperature [K]
output RealOutputPFan[num]Electric power consumed by fan [W]
output RealOutputTLvgLeaving water temperature [K]

Modelica definition

model CoolingTowersWithBypass "Cooling tower system with bypass valve" extends Buildings.Fluid.Interfaces.PartialTwoPortInterface( redeclare replaceable package Medium=Buildings.Media.Water); parameter Integer num( final min=1)=2 "Number of cooling towers"; parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial "Type of energy balance: dynamic (3 initialization options) or steady state"; parameter Boolean use_inputFilter=true "= true, if opening is filtered with a 2nd order CriticalDamping filter"; parameter Modelica.SIunits.Pressure dp_nominal "Nominal pressure difference of the tower"; parameter Modelica.SIunits.PressureDifference dpValve_nominal "Nominal pressure difference of the valve"; parameter Real ratWatAir_nominal( final min=0, final unit="1")=0.625 "Design water-to-air ratio"; parameter Modelica.SIunits.Temperature TAirInWB_nominal "Nominal outdoor (air inlet) wetbulb temperature"; parameter Modelica.SIunits.Temperature TWatIn_nominal "Nominal water inlet temperature"; parameter Modelica.SIunits.TemperatureDifference dT_nominal "Temperature difference between inlet and outlet of the tower"; parameter Modelica.SIunits.Power PFan_nominal "Fan power"; parameter Modelica.SIunits.TemperatureDifference dTApp=3 "Approach temperature"; parameter Modelica.SIunits.Temperature TMin "Minimum allowed water temperature entering chiller"; parameter Modelica.Blocks.Types.SimpleController controllerType=Modelica.Blocks.Types.SimpleController.PI "Type of fan speed controller"; parameter Real k( final unit="1", final min=0)=1 "Gain of the tower PID controller"; parameter Modelica.SIunits.Time Ti( final min=Modelica.Constants.small)=60 "Integrator time constant of the tower PID controller"; parameter Modelica.SIunits.Time Td( final min=0)=0.1 "Derivative time constant of the tower PID controller"; Modelica.Blocks.Interfaces.BooleanInput on[num] "On signal for cooling towers"; Modelica.Blocks.Interfaces.RealInput TWetBul( final unit="K", displayUnit="degC") "Entering air wetbulb temperature"; Modelica.Blocks.Interfaces.RealOutput PFan[num]( each final quantity="Power", each final unit="W") "Electric power consumed by fan"; Modelica.Blocks.Interfaces.RealOutput TLvg( final unit="K", displayUnit="degC") "Leaving water temperature"; Buildings.Experimental.DHC.CentralPlants.Cooling.Subsystems.CoolingTowersParallel cooTowSys( final use_inputFilter=use_inputFilter, redeclare final package Medium=Medium, final num=num, final show_T=show_T, final m_flow_small=m_flow_nominal, final allowFlowReversal=allowFlowReversal, final m_flow_nominal=m_flow_nominal/num, final dpValve_nominal=dpValve_nominal, final dp_nominal=dp_nominal, final ratWatAir_nominal=ratWatAir_nominal, final TAirInWB_nominal=TAirInWB_nominal, final TWatIn_nominal=TWatIn_nominal, final dT_nominal=dT_nominal, final PFan_nominal=PFan_nominal, final energyDynamics=energyDynamics) "Cooling tower system"; Buildings.Fluid.Actuators.Valves.TwoWayEqualPercentage valByp( redeclare final package Medium=Medium, final allowFlowReversal=allowFlowReversal, final m_flow_nominal=m_flow_nominal, final show_T=show_T, final dpValve_nominal=dpValve_nominal, final dpFixed_nominal=dp_nominal, final use_inputFilter=use_inputFilter) "Condenser water bypass valve"; Buildings.Fluid.Sensors.TemperatureTwoPort senTCWSup( redeclare final package Medium=Medium, final allowFlowReversal=allowFlowReversal, final m_flow_nominal=m_flow_nominal, final m_flow_small=m_flow_nominal, final T_start=Medium.T_default) "Temperature sensor"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant TSetByp( final k=TMin) "Bypass loop temperature setpoint"; Buildings.Controls.OBC.CDL.Continuous.PIDWithReset bypValCon( u_s( final unit="K", displayUnit="degC"), u_m( final unit="K", displayUnit="degC"), controllerType=Modelica.Blocks.Types.SimpleController.PI, final k=k, final Ti=Ti, final y_reset=0) "Bypass valve controller"; Buildings.Controls.OBC.CDL.Continuous.PID cooTowSpeCon( u_s( final unit="K", displayUnit="degC"), u_m( final unit="K", displayUnit="degC"), final reverseActing=false, final controllerType=controllerType, final k=k, final Ti=Ti) "Cooling tower fan speed controller"; Buildings.Controls.OBC.CDL.Logical.Switch swi "Output the input of higher value"; Buildings.Controls.OBC.CDL.Continuous.Hysteresis hys( uLow=TMin-0.1, uHigh=TMin+0.1) "Compare if (TWetBul+dTApp) is greater than TMin"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar( p=dTApp, k=1) "Add approach temperature on top of wetbulb temperature"; Buildings.Fluid.FixedResistances.Junction jun( redeclare final package Medium=Medium, m_flow_nominal=m_flow_nominal .* {1,-1,-1}, dp_nominal={0,0,0}, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) "Upstream mixing point of cooTowSys and valByp"; protected parameter Boolean enableTi= controllerType == Modelica.Blocks.Types.SimpleController.PI or controllerType == Modelica.Blocks.Types.SimpleController.PID "Flag to enable controller parameter Ti"; parameter Boolean enableTd= controllerType == Modelica.Blocks.Types.SimpleController.PD or controllerType == Modelica.Blocks.Types.SimpleController.PID "Flag to enable controller parameter Td"; equation connect(cooTowSys.TWetBul,TWetBul); connect(cooTowSys.port_b,senTCWSup.port_a); connect(senTCWSup.port_b,port_b); connect(TSetByp.y,bypValCon.u_s); connect(senTCWSup.T,bypValCon.u_m); connect(valByp.port_b,senTCWSup.port_a); connect(cooTowSpeCon.y,cooTowSys.uFanSpe); connect(cooTowSys.PFan,PFan); connect(bypValCon.y,valByp.y); connect(senTCWSup.T,cooTowSpeCon.u_m); connect(hys.y, swi.u2); connect(cooTowSpeCon.u_s,swi.y); connect(TSetByp.y,swi.u3); connect(TWetBul,addPar.u); connect(addPar.y,swi.u1); connect(on,cooTowSys.on); connect(on[1],bypValCon.trigger); connect(port_a, jun.port_1); connect(cooTowSys.port_a, jun.port_2); connect(valByp.port_a, jun.port_3); connect(addPar.y, hys.u); connect(senTCWSup.T, TLvg); end CoolingTowersWithBypass;