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 |
CoolingTowersParallel
|
Multiple identical cooling towers in parallel connection |
CoolingTowersWithBypass
|
Cooling tower system with bypass valve |
Examples
|
Example models integrating multiple components |
Multiple identical cooling towers in parallel connection
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
Type | Name | Default | Description |
replaceable package Medium | PartialMedium | Medium in the component |
Integer | num | 2 | Number of cooling towers |
PressureDifference | dpValve_nominal | | Nominal pressure difference of the valve [Pa] |
Merkel | cooTow[num] | cooTow(each final allowFlowR... | Cooling tower type |
Nominal condition |
MassFlowRate | m_flow_nominal | | Nominal mass flow rate [kg/s] |
PressureDifference | dp_nominal | | Nominal pressure difference of the tower [Pa] |
Real | ratWatAir_nominal | 0.625 | Design water-to-air ratio [1] |
Heat transfer |
Temperature | TAirInWB_nominal | | Nominal outdoor (air inlet) wetbulb temperature [K] |
Temperature | TWatIn_nominal | | Nominal water inlet temperature [K] |
TemperatureDifference | dT_nominal | | Temperature difference between inlet and outlet of the tower [K] |
Fan |
Power | PFan_nominal | | Fan power [W] |
Assumptions |
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Advanced |
MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics |
Boolean | show_T | false | = true, if actual temperature at port is computed |
Dynamics |
Conservation equations |
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Filtered opening |
Boolean | use_inputFilter | true | = true, if opening is filtered with a 2nd order CriticalDamping filter |
Connectors
Type | Name | Description |
replaceable package Medium | Medium in the component |
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
input BooleanInput | on[num] | On signal for cooling towers |
input RealInput | uFanSpe | Fan speed control signal [1] |
input RealInput | TWetBul | Entering air wetbulb temperature [K] |
output RealOutput | PFan[num] | Electric power consumed by fan [W] |
output RealOutput | TLvg | Leaving water temperature [K] |
Modelica definition
model CoolingTowersParallel
extends Buildings.Fluid.Interfaces.PartialTwoPortInterface(
redeclare replaceable package Medium=
Buildings.Media.Water);
parameter Integer num(
final min=1)=2
;
parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial
;
parameter Modelica.Units.SI.PressureDifference dp_nominal
;
parameter Modelica.Units.SI.PressureDifference dpValve_nominal
;
parameter Real ratWatAir_nominal(
final min=0,
final unit="1")=0.625
;
parameter Modelica.Units.SI.Temperature TAirInWB_nominal
;
parameter Modelica.Units.SI.Temperature TWatIn_nominal
;
parameter Modelica.Units.SI.TemperatureDifference dT_nominal
;
parameter Modelica.Units.SI.Power PFan_nominal ;
parameter Boolean use_inputFilter=true
;
Modelica.Blocks.Interfaces.BooleanInput on[num]
;
Modelica.Blocks.Interfaces.RealInput uFanSpe(
final unit="1")
;
Modelica.Blocks.Interfaces.RealInput TWetBul(
final unit="K",
displayUnit="degC")
;
Modelica.Blocks.Interfaces.RealOutput PFan[num](
each final quantity="Power",
each final unit="W")
;
Modelica.Blocks.Interfaces.RealOutput TLvg(
final unit="K",
displayUnit="degC")
;
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)
;
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 riseTime=30,
each final dpFixed_nominal=dp_nominal)
;
Buildings.Controls.OBC.CDL.Conversions.BooleanToReal booToRea[num]
;
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;
Cooling tower system with bypass valve
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
Type | Name | Default | Description |
replaceable package Medium | PartialMedium | Medium in the component |
Integer | num | 2 | Number of cooling towers |
PressureDifference | dpValve_nominal | | Nominal pressure difference of the valve [Pa] |
Nominal condition |
MassFlowRate | m_flow_nominal | | Nominal mass flow rate [kg/s] |
Pressure | dp_nominal | | Nominal pressure difference of the tower [Pa] |
Real | ratWatAir_nominal | 0.625 | Design water-to-air ratio [1] |
Heat transfer |
Temperature | TAirInWB_nominal | | Nominal outdoor (air inlet) wetbulb temperature [K] |
Temperature | TWatIn_nominal | | Nominal water inlet temperature [K] |
TemperatureDifference | dT_nominal | | Temperature difference between inlet and outlet of the tower [K] |
Fan |
Power | PFan_nominal | | Fan power [W] |
Control Settings |
TemperatureDifference | dTApp | 3 | Approach temperature [K] |
Temperature | TMin | | Minimum allowed water temperature entering chiller [K] |
SimpleController | controllerType | Modelica.Blocks.Types.Simple... | Type of fan speed controller |
Real | k | 1 | Gain of the tower PID controller [1] |
Time | Ti | 60 | Integrator time constant of the tower PID controller [s] |
Time | Td | 0.1 | Derivative time constant of the tower PID controller [s] |
Assumptions |
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Advanced |
MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics |
Boolean | show_T | false | = true, if actual temperature at port is computed |
Dynamics |
Conservation equations |
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Filtered opening |
Boolean | use_inputFilter | true | = true, if opening is filtered with a 2nd order CriticalDamping filter |
Time | riseTime | 30 | Pump rise time of the filter (time to reach 99.6 % of the speed) [s] |
Connectors
Type | Name | Description |
replaceable package Medium | Medium in the component |
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
input BooleanInput | on[num] | On signal for cooling towers |
input RealInput | TWetBul | Entering air wetbulb temperature [K] |
output RealOutput | PFan[num] | Electric power consumed by fan [W] |
output RealOutput | TLvg | Leaving water temperature [K] |
Modelica definition
model CoolingTowersWithBypass
extends Buildings.Fluid.Interfaces.PartialTwoPortInterface(
redeclare replaceable package Medium=
Buildings.Media.Water);
parameter Integer num(
final min=1)=2
;
parameter Modelica.Fluid.Types.Dynamics energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial
;
parameter Boolean use_inputFilter=true
;
parameter Modelica.Units.SI.Time riseTime=30
;
parameter Modelica.Units.SI.Pressure dp_nominal
;
parameter Modelica.Units.SI.PressureDifference dpValve_nominal
;
parameter Real ratWatAir_nominal(
final min=0,
final unit="1")=0.625
;
parameter Modelica.Units.SI.Temperature TAirInWB_nominal
;
parameter Modelica.Units.SI.Temperature TWatIn_nominal
;
parameter Modelica.Units.SI.TemperatureDifference dT_nominal
;
parameter Modelica.Units.SI.Power PFan_nominal ;
parameter Modelica.Units.SI.TemperatureDifference dTApp=3
;
parameter Modelica.Units.SI.Temperature TMin
;
parameter Modelica.Blocks.Types.SimpleController controllerType=Modelica.Blocks.Types.SimpleController.PI
;
parameter Real k(
final unit="1",
final min=0)=1
;
parameter Modelica.Units.SI.Time Ti(
final min=Modelica.Constants.small) = 60
;
parameter Modelica.Units.SI.Time Td(
final min=0) = 0.1
;
Modelica.Blocks.Interfaces.BooleanInput on[num]
;
Modelica.Blocks.Interfaces.RealInput TWetBul(
final unit="K",
displayUnit="degC")
;
Modelica.Blocks.Interfaces.RealOutput PFan[num](
each final quantity="Power",
each final unit="W")
;
Modelica.Blocks.Interfaces.RealOutput TLvg(
final unit="K",
displayUnit="degC")
;
Buildings.Experimental.DHC.Plants.Cooling.Subsystems.CoolingTowersParallel cooTowSys(
redeclare final package Medium=
Medium,
final use_inputFilter=false,
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)
;
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 riseTime=riseTime,
final use_inputFilter=use_inputFilter)
;
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)
;
Buildings.Controls.OBC.CDL.Reals.Sources.Constant TSetByp(
final k=TMin)
;
Buildings.Controls.OBC.CDL.Reals.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)
;
Buildings.Controls.OBC.CDL.Reals.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)
;
Buildings.Controls.OBC.CDL.Reals.Switch swi
;
Buildings.Controls.OBC.CDL.Reals.Hysteresis hys(
uLow=TMin-0.1,
uHigh=TMin+0.1)
;
Buildings.Controls.OBC.CDL.Reals.AddParameter addPar(
p=dTApp)
;
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)
;
protected
parameter Boolean enableTi=
controllerType == Modelica.Blocks.Types.SimpleController.PI
or
controllerType == Modelica.Blocks.Types.SimpleController.PID
;
parameter Boolean enableTd=
controllerType == Modelica.Blocks.Types.SimpleController.PD
or
controllerType == Modelica.Blocks.Types.SimpleController.PID
;
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;