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 |
Direct
|
Example model for direct cooling energy transfer station
with in-building pumping and controlled district return temperature |
Indirect
|
Example model for indirect cooling energy transfer station
with a closed chilled water loop on the building side |
Example model for direct cooling energy transfer station
with in-building pumping and controlled district return temperature
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
Type | Name | Default | Description |
SpecificHeatCapacity | cp | Medium.specificHeatCapacityC... | Default specific heat capacity of medium [J/(kg.K)] |
Nominal condition |
HeatFlowRate | Q_flow_nominal | -18000 | Nominal cooling load (negative for cooling) [W] |
MassFlowRate | mBui_flow_nominal | -Q_flow_nominal/(cp*(18 - 7)) | Nominal mass flow rate of building cooling supply [kg/s] |
Modelica definition
model Direct
extends Modelica.Icons.Example;
package Medium=
Buildings.Media.Water
;
parameter Modelica.Units.SI.HeatFlowRate Q_flow_nominal=-18000
;
parameter Modelica.Units.SI.MassFlowRate mBui_flow_nominal=-Q_flow_nominal/(cp*(18-7))
;
parameter Modelica.Units.SI.SpecificHeatCapacity cp=
Medium.specificHeatCapacityCp(
Medium.setState_pTX(
Medium.p_default,
Medium.T_default,
Medium.X_default))
;
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) ;
Modelica.Blocks.Sources.Constant TSetDisRet_min(k=273.15 + 16)
;
Buildings.Fluid.Sources.Boundary_pT sinDis(
redeclare package Medium = Medium,
p=340000,
nPorts=1)
;
Buildings.Fluid.Sources.Boundary_pT souDis(
redeclare package Medium = Medium,
p=350000,
use_T_in=true,
T=280.15,
nPorts=1)
;
Modelica.Blocks.Sources.RealExpression TDisSupNoi(
y=(273.15 + 7) + 2*
sin(time*4*3.14/86400))
;
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)
;
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)
;
Modelica.Blocks.Sources.Ramp ram(
height=1,
duration(displayUnit="h") = 3600,
startTime(displayUnit="h"))
;
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)
;
Modelica.Blocks.Math.Product pro
;
Modelica.Blocks.Math.Gain gai(k=-1/(cp*(16 - 7)))
;
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;
Example model for indirect cooling energy transfer station
with a closed chilled water loop on the building side
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
Type | Name | Default | Description |
HeatFlowRate | QCoo_flow_nominal | -19000 | Cooling design flow rate [W] |
TemperatureDifference | dT_nominal | 16 - 7 | Design temperature difference [K] |
SpecificHeatCapacity | cp | Medium.specificHeatCapacityC... | Default specific heat capacity of medium [J/(kg.K)] |
Nominal condition |
MassFlowRate | mBui_flow_nominal | -QCoo_flow_nominal/dT_nomina... | Nominal mass flow rate of building cooling supply [kg/s] |
Modelica definition
model Indirect
extends Modelica.Icons.Example;
package Medium=
Buildings.Media.Water
;
parameter Modelica.Units.SI.HeatFlowRate QCoo_flow_nominal = -19000
;
parameter Modelica.Units.SI.TemperatureDifference dT_nominal = 16-7
;
parameter Modelica.Units.SI.MassFlowRate mBui_flow_nominal=-QCoo_flow_nominal/dT_nominal/cp
;
parameter Modelica.Units.SI.SpecificHeatCapacity cp=
Medium.specificHeatCapacityCp(
Medium.setState_pTX(
Medium.p_default,
Medium.T_default,
Medium.X_default))
;
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) ;
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)
;
Buildings.Fluid.Sources.Boundary_pT sinDis(
redeclare package Medium = Medium,
T=287.15,
nPorts=1)
;
Modelica.Blocks.Sources.Constant TSetCHWS(
k=273.15+7)
;
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)
;
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)
;
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)
;
Modelica.Blocks.Math.Product pro
;
Modelica.Blocks.Sources.Ramp ram(
height=1,
duration(displayUnit="h")=18000,
startTime(displayUnit="h")=3600) ;
Modelica.Blocks.Math.Gain gai(
k=-1/(cp*dT_nominal))
;
Buildings.Fluid.Sources.Boundary_pT souBui(
redeclare package Medium = Medium,
nPorts=1)
;
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;