Buildings.DHC.ETS.Cooling.Examples

Information

This package contains advanced examples illustrating the use of the models in Buildings.DHC.ETS.Cooling.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Buildings.DHC.ETS.Cooling.Examples.Direct Direct Example model for direct cooling energy transfer station with in-building pumping and controlled district return temperature
Buildings.DHC.ETS.Cooling.Examples.Indirect Indirect Example model for indirect cooling energy transfer station with a closed chilled water loop on the building side

Buildings.DHC.ETS.Cooling.Examples.Direct Buildings.DHC.ETS.Cooling.Examples.Direct

Example model for direct cooling energy transfer station with in-building pumping and controlled district return temperature

Buildings.DHC.ETS.Cooling.Examples.Direct

Information

This model provides an example for the direct cooling energy transfer station model, which contains in-building pumping and controls the district return temperature. The building's primary variable speed pump is modulated depending on the total cooling load and prescribed deltaT. Variation in the district supply temperature is modeled as a sinusoidal signal to test the response of system.

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

Parameters

TypeNameDefaultDescription
SpecificHeatCapacitycpMedium.specificHeatCapacityC...Default specific heat capacity of medium [J/(kg.K)]
Nominal condition
HeatFlowRateQ_flow_nominal-18000Nominal cooling load (negative for cooling) [W]
MassFlowRatemBui_flow_nominal-Q_flow_nominal/(cp*(18 - 7))Nominal mass flow rate of building cooling supply [kg/s]

Modelica definition

model Direct "Example model for direct cooling energy transfer station with in-building pumping and controlled district return temperature" extends Modelica.Icons.Example; package Medium=Buildings.Media.Water "Water medium"; parameter Modelica.Units.SI.HeatFlowRate Q_flow_nominal=-18000 "Nominal cooling load (negative for cooling)"; parameter Modelica.Units.SI.MassFlowRate mBui_flow_nominal=-Q_flow_nominal/(cp*(18-7)) "Nominal mass flow rate of building cooling supply"; 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"; Buildings.DHC.ETS.Cooling.Direct cooETS( mBui_flow_nominal=mBui_flow_nominal, QChiWat_flow_nominal=Q_flow_nominal, dpConVal_nominal=50, dpCheVal_nominal=6000, nPorts_bChiWat=1, nPorts_aChiWat=1) "Energy transfer station"; Modelica.Blocks.Sources.Constant TSetDisRet_min(k=273.15 + 16) "Minimum setpoint temperature for district return"; Buildings.Fluid.Sources.Boundary_pT sinDis( redeclare package Medium = Medium, p=340000, nPorts=1) "District-side sink"; Buildings.Fluid.Sources.Boundary_pT souDis( redeclare package Medium = Medium, p=350000, use_T_in=true, T=280.15, nPorts=1) "District-side source"; Modelica.Blocks.Sources.RealExpression TDisSupNoi( y=(273.15 + 7) + 2*sin(time*4*3.14/86400)) "Sinusoidal noise signal for district supply temperature"; Buildings.Fluid.Movers.FlowControlled_m_flow pum( redeclare replaceable package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, m_flow_nominal=mBui_flow_nominal, addPowerToMedium=false, nominalValuesDefineDefaultPressureCurve=true, constantMassFlowRate=mBui_flow_nominal) "Building primary pump"; Buildings.Fluid.HeatExchangers.HeaterCooler_u loa( redeclare package Medium = Medium, allowFlowReversal=false, m_flow_nominal=mBui_flow_nominal, show_T=true, from_dp=false, dp_nominal=100, linearizeFlowResistance=true, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, Q_flow_nominal=-1) "Aggregate building cooling load"; Modelica.Blocks.Sources.Ramp ram( height=1, duration(displayUnit="h") = 3600, startTime(displayUnit="h")) "Ramp load from zero"; Modelica.Blocks.Sources.CombiTimeTable QCoo( table=[ 0,-100E3; 6,-80E3; 6,-50E3; 12,-20E3; 18,-150E3; 24,-100E3], extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, timeScale=3600) "Cooling demand"; Modelica.Blocks.Math.Product pro "Multiplier to ramp load from zero"; Modelica.Blocks.Math.Gain gai(k=-1/(cp*(16 - 7))) "Multiplier gain for calculating m_flow"; equation connect(TSetDisRet_min.y,cooETS.TDisRetSet); connect(TDisSupNoi.y, souDis.T_in); connect(souDis.ports[1], cooETS.port_aSerCoo); connect(cooETS.port_bSerCoo, sinDis.ports[1]); connect(cooETS.ports_bChiWat[1], pum.port_a); connect(pum.port_b, loa.port_a); connect(loa.port_b, cooETS.ports_aChiWat[1]); connect(ram.y, pro.u1); connect(QCoo.y[1], pro.u2); connect(pro.y, loa.u); connect(pro.y, gai.u); connect(gai.y, pum.m_flow_in); end Direct;

Buildings.DHC.ETS.Cooling.Examples.Indirect Buildings.DHC.ETS.Cooling.Examples.Indirect

Example model for indirect cooling energy transfer station with a closed chilled water loop on the building side

Buildings.DHC.ETS.Cooling.Examples.Indirect

Information

This model provides an example for the indirect cooling energy transfer station model. The cooling load ramps up from zero and is modulated according to the QCoo table specification. The mass flow rate of chilled water in the building side is varied based on the building load/demand.

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

Parameters

TypeNameDefaultDescription
HeatFlowRateQCoo_flow_nominal-19000Cooling design flow rate [W]
TemperatureDifferencedT_nominal16 - 7Design temperature difference [K]
SpecificHeatCapacitycpMedium.specificHeatCapacityC...Default specific heat capacity of medium [J/(kg.K)]
Nominal condition
MassFlowRatemBui_flow_nominal-QCoo_flow_nominal/dT_nomina...Nominal mass flow rate of building cooling supply [kg/s]

Modelica definition

model Indirect "Example model for indirect cooling energy transfer station with a closed chilled water loop on the building side" extends Modelica.Icons.Example; package Medium=Buildings.Media.Water "Water medium"; parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal = -19000 "Cooling design flow rate"; parameter Modelica.Units.SI.TemperatureDifference dT_nominal = 16-7 "Design temperature difference"; parameter Modelica.Units.SI.MassFlowRate mBui_flow_nominal=-QCoo_flow_nominal/dT_nominal/cp "Nominal mass flow rate of building cooling supply"; 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"; Buildings.DHC.ETS.Cooling.Indirect cooETS( QChiWat_flow_nominal=QCoo_flow_nominal, mDis_flow_nominal=mBui_flow_nominal, mBui_flow_nominal=mBui_flow_nominal, dpConVal_nominal=9000, dp1_nominal=9000, dp2_nominal=9000, Q_flow_nominal=QCoo_flow_nominal, T_a1_nominal=278.15, T_a2_nominal=289.15, k=0.1, Ti=40, yMax=1, yMin=0.01, controllerType=Modelica.Blocks.Types.SimpleController.PI, nPorts_bChiWat=1, nPorts_aChiWat=1) "Direct cooling energy transfer station"; Buildings.Fluid.Sources.Boundary_pT souDis( redeclare package Medium = Medium, p(displayUnit="Pa") = 300000 + 2*9000, use_T_in=false, T=278.15, nPorts=1) "District (primary) source"; Buildings.Fluid.Sources.Boundary_pT sinDis( redeclare package Medium = Medium, T=287.15, nPorts=1) "District (primary) sink"; Modelica.Blocks.Sources.Constant TSetCHWS( k=273.15+7) "Setpoint temperature for building chilled water supply"; Buildings.Fluid.HeatExchangers.HeaterCooler_u loa( redeclare package Medium = Medium, allowFlowReversal=false, m_flow_nominal=mBui_flow_nominal, show_T=true, from_dp=false, dp_nominal=6000, linearizeFlowResistance=true, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyStateInitial, Q_flow_nominal=-1) "Aggregate building cooling load"; Buildings.Fluid.Movers.FlowControlled_m_flow pumBui( redeclare replaceable package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, allowFlowReversal=false, m_flow_nominal=mBui_flow_nominal, nominalValuesDefineDefaultPressureCurve=true, dp_nominal=6000+9000) "Building-side (secondary) pump"; Modelica.Blocks.Sources.CombiTimeTable QCoo( table=[ 0,-10E3; 6,-8E3; 6,-5E3; 12,-2E3; 18,-15E3; 24,-10E3], extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, timeScale=3600) "Cooling demand"; Modelica.Blocks.Math.Product pro "Multiplier to ramp load from zero"; Modelica.Blocks.Sources.Ramp ram( height=1, duration(displayUnit="h")=18000, startTime(displayUnit="h")=3600) "Ramp load from zero"; Modelica.Blocks.Math.Gain gai( k=-1/(cp*dT_nominal)) "Multiplier gain for calculating m_flow"; Buildings.Fluid.Sources.Boundary_pT souBui( redeclare package Medium = Medium, nPorts=1) "Building (secondary) source"; equation connect(cooETS.ports_bChiWat[1], pumBui.port_a); connect(pumBui.port_b, loa.port_a); connect(loa.port_b, cooETS.ports_aChiWat[1]); connect(QCoo.y[1], gai.u); connect(gai.y, pumBui.m_flow_in); connect(ram.y, pro.u2); connect(QCoo.y[1], pro.u1); connect(pro.y, loa.u); connect(souDis.ports[1], cooETS.port_aSerCoo); connect(cooETS.port_bSerCoo, sinDis.ports[1]); connect(TSetCHWS.y,cooETS.TBuiSupSet); connect(pumBui.port_a, souBui.ports[1]); end Indirect;