Buildings.Experimental.DHC.EnergyTransferStations.Heating.Examples

Information

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

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

Package Content

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

Buildings.Experimental.DHC.EnergyTransferStations.Heating.Examples.Direct Buildings.Experimental.DHC.EnergyTransferStations.Heating.Examples.Direct

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

Buildings.Experimental.DHC.EnergyTransferStations.Heating.Examples.Direct

Information

This model provides an example for the direct heating 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 heating 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_nominal18000Nominal heating load [W]
MassFlowRatemBui_flow_nominalQ_flow_nominal/(cp*(50 - 40))Nominal mass flow rate of building heating supply [kg/s]

Modelica definition

model Direct "Example model for direct heating 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 heating load"; parameter Modelica.Units.SI.MassFlowRate mBui_flow_nominal=Q_flow_nominal/(cp*(50-40)) "Nominal mass flow rate of building heating 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.Experimental.DHC.EnergyTransferStations.Heating.Direct heaETS( mBui_flow_nominal=mBui_flow_nominal, QHeaWat_flow_nominal=Q_flow_nominal, dpConVal_nominal=50, dpCheVal_nominal=6000, nPorts_bHeaWat=1, nPorts_aHeaWat=1) "Energy transfer station"; Modelica.Blocks.Sources.Constant TSetDisRet_max(k=273.15 + 40) "Maximum 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 + 50) + 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 heating load"; Modelica.Blocks.Sources.Ramp ram( height=1, duration(displayUnit="h") = 3600, startTime(displayUnit="h")) "Ramp load from zero"; Modelica.Blocks.Sources.CombiTimeTable QHea( table=[0,100E3; 6,80E3; 6,50E3; 12,20E3; 18,150E3; 24,100E3], extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, timeScale=3600) "Heating demand"; Modelica.Blocks.Math.Product pro "Multiplier to ramp load from zero"; Modelica.Blocks.Math.Gain gai(k=1/(cp*(50 - 40))) "Multiplier gain for calculating m_flow"; equation connect(TSetDisRet_max.y,heaETS. TSetDisRet); connect(TDisSupNoi.y, souDis.T_in); connect(pum.port_b, loa.port_a); connect(ram.y, pro.u1); connect(QHea.y[1], pro.u2); connect(pro.y, loa.u); connect(pro.y, gai.u); connect(gai.y, pum.m_flow_in); connect(heaETS.ports_bHeaWat[1], pum.port_a); connect(heaETS.ports_aHeaWat[1], loa.port_b); connect(heaETS.port_aSerHea, souDis.ports[1]); connect(sinDis.ports[1], heaETS.port_bSerHea); end Direct;

Buildings.Experimental.DHC.EnergyTransferStations.Heating.Examples.Indirect Buildings.Experimental.DHC.EnergyTransferStations.Heating.Examples.Indirect

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

Buildings.Experimental.DHC.EnergyTransferStations.Heating.Examples.Indirect

Information

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

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

Parameters

TypeNameDefaultDescription
HeatFlowRateQHea_flow_nominal19000Heating design flow rate [W]
TemperatureDifferencedT_nominal50 - 40Design temperature difference [K]
SpecificHeatCapacitycpMedium.specificHeatCapacityC...Default specific heat capacity of medium [J/(kg.K)]
Nominal condition
MassFlowRatemBui_flow_nominalQHea_flow_nominal/dT_nominal...Nominal mass flow rate of building heating supply [kg/s]

Modelica definition

model Indirect "Example model for indirect heating 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 QHea_flow_nominal = 19000 "Heating design flow rate"; parameter Modelica.Units.SI.TemperatureDifference dT_nominal = 50-40 "Design temperature difference"; parameter Modelica.Units.SI.MassFlowRate mBui_flow_nominal=QHea_flow_nominal/dT_nominal/cp "Nominal mass flow rate of building heating 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.Experimental.DHC.EnergyTransferStations.Heating.Indirect heaETS( QHeaWat_flow_nominal=QHea_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=QHea_flow_nominal, T_a1_nominal=328.15, T_a2_nominal=313.15, k=0.1, Ti=40, yMax=1, yMin=0.01, controllerType=Modelica.Blocks.Types.SimpleController.PI, nPorts_aHeaWat=1, nPorts_bHeaWat=1) "Direct heating energy transfer station"; Buildings.Fluid.Sources.Boundary_pT souDis( redeclare package Medium = Medium, p(displayUnit="Pa") = 300000 + 2*9000, use_T_in=false, T=328.15, nPorts=1) "District (primary) source"; Buildings.Fluid.Sources.Boundary_pT sinDis( redeclare package Medium = Medium, T=314.15, nPorts=1) "District (primary) sink"; Modelica.Blocks.Sources.Constant TSetHWS(k=273.15 + 50) "Setpoint temperature for building heating 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 heating 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 QHea( table=[0,10E3; 6,8E3; 6,5E3; 12,2E3; 18,15E3; 24,10E3], extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, timeScale=3600) "Heating 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(pumBui.port_b, loa.port_a); connect(QHea.y[1], gai.u); connect(gai.y, pumBui.m_flow_in); connect(ram.y, pro.u2); connect(QHea.y[1], pro.u1); connect(pro.y, loa.u); connect(pumBui.port_a, souBui.ports[1]); connect(TSetHWS.y, heaETS.TSetBuiSup); connect(souDis.ports[1], heaETS.port_aSerHea); connect(sinDis.ports[1], heaETS.port_bSerHea); connect(loa.port_b, heaETS.ports_aHeaWat[1]); connect(heaETS.ports_bHeaWat[1], pumBui.port_a); end Indirect;