Buildings.Experimental.DHC.Loads.Steam

Package with models for loads involving steam systems

Information

This package contains models of building loads that are used to build example models of steam district heating systems.

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

Package Content

Name Description
Buildings.Experimental.DHC.Loads.Steam.BuildingTimeSeriesAtETS BuildingTimeSeriesAtETS Steam heating building interconnection with the district piping only and the load at the ETS provided as a time series.
Buildings.Experimental.DHC.Loads.Steam.Examples Examples Collection of models that illustrate model use and test models
Buildings.Experimental.DHC.Loads.Steam.BaseClasses BaseClasses Package with base classes for Buildings.Experimental.DHC.Loads.Steam

Buildings.Experimental.DHC.Loads.Steam.BuildingTimeSeriesAtETS Buildings.Experimental.DHC.Loads.Steam.BuildingTimeSeriesAtETS

Steam heating building interconnection with the district piping only and the load at the ETS provided as a time series.

Buildings.Experimental.DHC.Loads.Steam.BuildingTimeSeriesAtETS

Information

This model is intended for existing steam district heating systems where the heating load at the energy transfer station (ETS) is availble as a time series data input. Thus, the building-side piping and equipement is not included in this model, as depicted below.

steamBuilding.

Implementation

With the time series input, this model is configured such that the control volume (representing the steam side of the heat exchanger) has steady state energy and mass balances. The steam trap also has steady state balances by design. Meanwhile, the condensate return pump allows either dynamic or steady state balances. The mass flow rate at the pump is prescribed ideally such that the heat flow rate input from the time series is rejected at the control volume based on the physical laws.

References

Kathryn Hinkelman, Saranya Anbarasu, Michael Wetter, Antoine Gautier, Wangda Zuo. 2022. “A Fast and Accurate Modeling Approach for Water and Steam Thermodynamics with Practical Applications in District Heating System Simulation,” Energy, 254(A), pp. 124227. 10.1016/j.energy.2022.124227

Kathryn Hinkelman, Saranya Anbarasu, Michael Wetter, Antoine Gautier, Baptiste Ravache, Wangda Zuo 2022. “Towards Open-Source Modelica Models For Steam-Based District Heating Systems.” Proc. of the 1st International Workshop On Open Source Modelling And Simulation Of Energy Systems (OSMSES 2022), Aachen, German, April 4-5, 2022. 10.1109/OSMSES54027.2022.9769121

Parameters

TypeNameDefaultDescription
replaceable package MediumSteBuildings.Media.SteamSteam medium
replaceable package MediumWatBuildings.Media.Specialized....Water medium
Booleanhave_prvfalseSet to true if the building has a pressure reducing valve (PRV) station
VolumeV1Total volume of the steam side of the heat exchanger [m3]
Nominal condition
PowerQ_flow_nominal Nominal heat flow rate [W]
PressureDifferencedp_nominal Pressure drop at nominal mass flow rate [Pa]
AbsolutePressurepSte_nominalMediumSte.p_defaultNominal pressure of steam entering the building [Pa]
AbsolutePressurepLow_nominal0.8*MediumSte.p_defaultNominal low pressure setpoint, downstream of PRV (if present) [Pa]
TemperatureTSte_nominalMediumSte.saturationTemperat...Nominal temperature of steam entering the building [K]
TemperatureTLow_nominalMediumSte.temperature(Medium...Nominal temperature of steam entering heat exchanger, if PRV present [K]
SpecificEnthalpydh_nominalMediumSte.specificEnthalpy(M...Nominal change in enthalpy across the heat exchanger [J/kg]
Dynamics
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Initialization
AbsolutePressurep_startMediumSte.p_defaultStart value of pressure [Pa]
TemperatureT_startMediumSte.T_defaultStart value of temperature [K]
MassFlowRatem_flow_start0Initial value of mass flow rate [kg/s]
Load Profile
Table data definition
BooleantableOnFilefalse= true, if table is defined on file or in function usertab
RealQHeaLoa[:, :]fill(0.0, 0, 2)Table matrix (time = first column; e.g., table=[0, 0; 1, 1; 2, 4])
StringtableName"NoName"Table name on file or in function usertab (see docu)
StringfileName"NoName"File where matrix is stored
Table data interpretation
Integercolumns[:]2:size(QHeaLoa, 2)Columns of table to be interpolated
SmoothnesssmoothnessModelica.Blocks.Types.Smooth...Smoothness of table interpolation
TimetimeScale1Time scale of first table column [s]
Advanced
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Nominal condition
Densityrho_a_defaultMediumSte.density(MediumSte....Default steam density [kg/m3]
Densityrho_b_defaultMediumWat.density(MediumWat....Default water density [kg/m3]

Connectors

TypeNameDescription
replaceable package MediumSteSteam medium
replaceable package MediumWatWater medium
output RealOutputQ_flowTotal heat transfer rate [W]
output RealOutputEHeaTotal heating energy [J]
FluidPort_aport_aInlet port
FluidPort_bport_bOutlet port

Modelica definition

model BuildingTimeSeriesAtETS "Steam heating building interconnection with the district piping only and the load at the ETS provided as a time series." replaceable package MediumSte = Buildings.Media.Steam constrainedby Modelica.Media.Interfaces.PartialMedium "Steam medium"; replaceable package MediumWat = Buildings.Media.Specialized.Water.TemperatureDependentDensity constrainedby Modelica.Media.Interfaces.PartialMedium "Water medium"; constant Boolean allowFlowReversal = false "= false to simplify equations, assuming, but not enforcing, no flow reversal. Set to false because the flow rate is prescribed."; parameter Boolean have_prv = false "Set to true if the building has a pressure reducing valve (PRV) station"; // Nominal conditions parameter Modelica.Units.SI.Power Q_flow_nominal "Nominal heat flow rate"; parameter Modelica.Units.SI.PressureDifference dp_nominal(displayUnit="Pa") "Pressure drop at nominal mass flow rate"; parameter Modelica.Units.SI.AbsolutePressure pSte_nominal=MediumSte.p_default "Nominal pressure of steam entering the building"; parameter Modelica.Units.SI.AbsolutePressure pLow_nominal=0.8*MediumSte.p_default "Nominal low pressure setpoint, downstream of PRV (if present)"; parameter Modelica.Units.SI.Temperature TSte_nominal= MediumSte.saturationTemperature(pSte_nominal) "Nominal temperature of steam entering the building"; parameter Modelica.Units.SI.Temperature TLow_nominal= MediumSte.temperature( MediumSte.setState_phX( p=pLow_nominal, h=MediumSte.specificEnthalpy(MediumSte.setState_pTX( p=pSte_nominal, T=TSte_nominal, X=MediumSte.X_default)), X=MediumSte.X_default)) "Nominal temperature of steam entering heat exchanger, if PRV present"; parameter Modelica.Units.SI.SpecificEnthalpy dh_nominal= MediumSte.specificEnthalpy(MediumSte.setState_pTX( p=if have_prv then pLow_nominal else pSte_nominal, T=if have_prv then TLow_nominal else TSte_nominal, X=MediumSte.X_default)) - MediumWat.specificEnthalpy(MediumWat.setState_pTX( p=if have_prv then pLow_nominal else pSte_nominal, T=if have_prv then TLow_nominal else TSte_nominal, X=MediumWat.X_default)) "Nominal change in enthalpy across the heat exchanger"; final parameter Modelica.Units.SI.MassFlowRate m_flow_nominal= Q_flow_nominal/dh_nominal "Nominal mass flow rate"; parameter Modelica.Units.SI.Volume V=1 "Total volume of the steam side of the heat exchanger"; // Assumptions parameter Modelica.Fluid.Types.Dynamics energyDynamics= Modelica.Fluid.Types.Dynamics.DynamicFreeInitial "Type of energy balance: dynamic (3 initialization options) or steady state"; // Initialization parameter MediumSte.AbsolutePressure p_start=MediumSte.p_default "Start value of pressure"; parameter MediumSte.Temperature T_start=MediumSte.T_default "Start value of temperature"; parameter Modelica.Units.SI.MassFlowRate m_flow_start=0 "Initial value of mass flow rate"; // Heating load time series parameter Boolean tableOnFile=false "= true, if table is defined on file or in function usertab"; parameter Real QHeaLoa[:, :] = fill(0.0, 0, 2) "Table matrix (time = first column; e.g., table=[0, 0; 1, 1; 2, 4])"; parameter String tableName="NoName" "Table name on file or in function usertab (see docu)"; parameter String fileName="NoName" "File where matrix is stored"; parameter Integer columns[:]=2:size(QHeaLoa, 2) "Columns of table to be interpolated"; parameter Modelica.Blocks.Types.Smoothness smoothness= Modelica.Blocks.Types.Smoothness.LinearSegments "Smoothness of table interpolation"; parameter Modelica.Units.SI.Time timeScale( min=Modelica.Constants.eps)=1 "Time scale of first table column"; // Diagnostics parameter Boolean show_T = false "= true, if actual temperature at port is computed"; MediumSte.ThermodynamicState sta_a= MediumSte.setState_phX(port_a.p, noEvent(actualStream(port_a.h_outflow)), noEvent(actualStream(port_a.Xi_outflow))) if show_T "Medium properties in port_a"; MediumWat.ThermodynamicState sta_b= MediumWat.setState_phX(port_b.p, noEvent(actualStream(port_b.h_outflow)), noEvent(actualStream(port_b.Xi_outflow))) if show_T "Medium properties in port_b"; // Advanced parameter Modelica.Units.SI.Density rho_a_default= MediumSte.density(MediumSte.setState_pTX( p=pSte_nominal,T=TSte_nominal,X=MediumSte.X_default)) "Default steam density"; parameter Modelica.Units.SI.Density rho_b_default= MediumWat.density(MediumWat.setState_pTX( p=101325,T=273.15+90,X=MediumWat.X_default)) "Default water density"; Modelica.Blocks.Interfaces.RealOutput Q_flow( final quantity="HeatFlowRate", final unit="W", displayUnit="kW") "Total heat transfer rate"; Modelica.Blocks.Interfaces.RealOutput EHea( final quantity="HeatFlow", final unit="J", displayUnit="kW.h") "Total heating energy"; Modelica.Fluid.Interfaces.FluidPort_a port_a( redeclare final package Medium = MediumSte) "Inlet port"; Modelica.Fluid.Interfaces.FluidPort_b port_b( redeclare final package Medium = MediumWat) "Outlet port"; Modelica.Blocks.Sources.CombiTimeTable QHea( final tableOnFile=tableOnFile, final table=QHeaLoa, final tableName=tableName, final fileName=fileName, final columns=columns, final smoothness=smoothness, final extrapolation=Modelica.Blocks.Types.Extrapolation.Periodic, final timeScale=timeScale) "Heating demand"; Modelica.Blocks.Continuous.Integrator IntEHea(y(unit="J")) "Integrator for heating energy of building"; Buildings.Fluid.Movers.FlowControlled_m_flow pumCNR( redeclare final package Medium = MediumWat, final energyDynamics=energyDynamics, p_start=steTra.pAtm, T_start=steTra.TSat, final allowFlowReversal=allowFlowReversal, final m_flow_nominal=m_flow_nominal, final show_T=show_T, addPowerToMedium=false, nominalValuesDefineDefaultPressureCurve=true, init=Modelica.Blocks.Types.Init.InitialOutput, final m_flow_start=m_flow_start) "Condensate return pump"; Buildings.Experimental.DHC.Loads.Steam.BaseClasses.ControlVolumeCondensation vol( redeclare final package MediumSte = MediumSte, redeclare final package MediumWat = MediumWat, final allowFlowReversal=allowFlowReversal, final energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, final p_start=if have_prv then pLow_nominal else pSte_nominal, final m_flow_nominal=m_flow_nominal, final show_T=show_T, final V=V) "Steam side of the heat exchanger, modeled as a steady state control volume"; Buildings.Experimental.DHC.Loads.Steam.BaseClasses.SteamTrap steTra( redeclare final package Medium = MediumWat, final allowFlowReversal=allowFlowReversal, final m_flow_nominal=m_flow_nominal, final show_T=show_T) "Steam trap"; Buildings.Fluid.Sensors.SpecificEnthalpyTwoPort hIn( redeclare final package Medium = MediumSte, final m_flow_nominal=m_flow_nominal) "Enthalpy in"; Buildings.Fluid.Sensors.SpecificEnthalpyTwoPort hOut( redeclare final package Medium = MediumWat, final m_flow_nominal=m_flow_nominal) "Enthalpy out"; Modelica.Blocks.Math.Add dh(final k2=-1) "Change in enthalpy with building-side fluid"; Modelica.Blocks.Math.Division m_flow "Mass flow"; Buildings.Experimental.DHC.Loads.Steam.BaseClasses.ValveSelfActing prv( redeclare final package Medium = MediumSte, final m_flow_nominal=m_flow_nominal, final show_T=show_T, final pb_nominal=pLow_nominal) if have_prv "Optional pressure reducing valve"; equation connect(Q_flow, Q_flow); connect(IntEHea.y, EHea); connect(QHea.y[1], Q_flow); connect(IntEHea.u, Q_flow); connect(pumCNR.port_b, port_b); connect(steTra.port_b, pumCNR.port_a); connect(hIn.port_b, vol.port_a); connect(vol.port_b, hOut.port_a); connect(hOut.port_b, steTra.port_a); connect(dh.y, m_flow.u2); connect(QHea.y[1], m_flow.u1); connect(m_flow.y, pumCNR.m_flow_in); connect(hIn.h_out, dh.u1); connect(hOut.h_out, dh.u2); connect(port_a, prv.port_a); if have_prv then connect(prv.port_b, hIn.port_a); else connect(port_a, hIn.port_a); end if; end BuildingTimeSeriesAtETS;