Buildings.Experimental.DHC.Plants.Steam.BaseClasses

Package with base classes for Buildings.Experimental.DHC.Plants.Steam

Information

This package contains base classes that are used to construct the models in Buildings.Experimental.DHC.Plants.Steam.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.Experimental.DHC.Plants.Steam.BaseClasses.BoilerPolynomial BoilerPolynomial A equilibrium boiler with water phase change from liquid to vapor, discharging saturated steam vapor, with the efficiency curve described by a polynomial.
Buildings.Experimental.DHC.Plants.Steam.BaseClasses.ControlVolumeEvaporation ControlVolumeEvaporation Control volume model exhibiting the evaporation process of water
Buildings.Experimental.DHC.Plants.Steam.BaseClasses.Examples Examples Collection of models that illustrate model use and test models

Buildings.Experimental.DHC.Plants.Steam.BaseClasses.BoilerPolynomial Buildings.Experimental.DHC.Plants.Steam.BaseClasses.BoilerPolynomial

A equilibrium boiler with water phase change from liquid to vapor, discharging saturated steam vapor, with the efficiency curve described by a polynomial.

Buildings.Experimental.DHC.Plants.Steam.BaseClasses.BoilerPolynomial

Information

This model represents a steam boiler that discharges saturated steam and has an efficiency curve defined by a polynomial. The efficiency in this model represents the fuel-to-water efficiency (e.g., thermal efficiency). This model is similar to the Buildings.Fluid.Boilers.BoilerPolynomial for the efficiency and fuel mass flow rate computation with the following exceptions:

Boiler polynomial steam with blocks in green conditionally removed if steady state

Implementation

In order to improve the numerical efficiency, this model follows the split-medium approach using the Buildings.Experimental.DHC.BaseClasses.Steam.PartialTwoPortTwoMedium interface model. The saturated mixing volume for an evaporation process Buildings.Experimental.DHC.Plants.Steam.BaseClasses.ControlVolumeEvaporation represents the phase change process of water from liquid to vapor at equilibrium.

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

Extends from Buildings.BaseClasses.BaseIconLow (Base icon with model name below the icon), Buildings.Experimental.DHC.BaseClasses.Steam.PartialTwoPortTwoMedium (Partial model with two ports with two separate medium models without storing mass or energy).

Parameters

TypeNameDefaultDescription
replaceable package Medium_aPartialMediumMedium model for port_a (inlet)
replaceable package Medium_bPartialMediumMedium model for port_b (outlet)
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
replaceable package MediumWatBuildings.Media.Specialized....Water medium - port_a (inlet)
replaceable package MediumSteBuildings.Media.SteamSteam medium - port_b (oulet)
PowerQ_flow_nominal Nominal heating power [W]
TemperatureT_nominal373.15Temperature used to compute nominal efficiency (only used if efficiency curve depends on temperature) [K]
EfficiencyCurveseffCurBuildings.Fluid.Types.Effici...Curve used to compute the efficiency
Reala[:]{0.9}Coefficients for efficiency curve
Genericfue Fuel type
ThermalConductanceUA0.05*Q_flow_nominal/30Overall UA value [W/K]
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
PressureDifferencedp_nominal Pressure drop at nominal mass flow rate [Pa]
Advanced
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal. Used only if model has two ports.
Dynamics
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
DynamicsmassDynamicsenergyDynamicsType of mass balance: dynamic (3 initialization options) or steady state
VolumeV1.5E-6*Q_flow_nominalTotal internal volume of boiler [m3]
MassmDry1.5E-3*Q_flow_nominalMass of boiler that will be lumped to water heat capacity [kg]
Initialization
AbsolutePressurep_startMedium_b.p_defaultStart value of pressure [Pa]
TemperatureT_startMediumSte.saturationTemperat...Start value of temperature [K]
Booleanfixed_p_startfalseSet to true if p_start is to be used as an explicit initial equation, not an initial guess

Connectors

TypeNameDescription
replaceable package Medium_aMedium model for port_a (inlet)
replaceable package Medium_bMedium model for port_b (outlet)
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
replaceable package MediumWatWater medium - port_a (inlet)
replaceable package MediumSteSteam medium - port_b (oulet)
input RealInputyPart load ratio
output RealOutputVLiqOutput liquid water volume [m3]
HeatPort_aheatPortHeat port, can be used to connect to ambient
output RealOutputQFueFloHeat flow rate of the fuel [W]

Modelica definition

model BoilerPolynomial "A equilibrium boiler with water phase change from liquid to vapor, discharging saturated steam vapor, with the efficiency curve described by a polynomial." extends Buildings.BaseClasses.BaseIconLow; extends Buildings.Experimental.DHC.BaseClasses.Steam.PartialTwoPortTwoMedium( redeclare final package Medium_a=MediumWat, redeclare final package Medium_b=MediumSte, final T_start=MediumSte.saturationTemperature(p_start)); // Medium declarations replaceable package MediumWat = Buildings.Media.Specialized.Water.TemperatureDependentDensity "Water medium - port_a (inlet)"; replaceable package MediumSte = Buildings.Media.Steam "Steam medium - port_b (oulet)"; // Initialization parameter Boolean fixed_p_start=false "Set to true if p_start is to be used as an explicit initial equation, not an initial guess"; // Nominal conditions parameter Modelica.Units.SI.PressureDifference dp_nominal(displayUnit="Pa") "Pressure drop at nominal mass flow rate"; parameter Modelica.Units.SI.Power Q_flow_nominal "Nominal heating power"; parameter Modelica.Units.SI.Temperature T_nominal = 373.15 "Temperature used to compute nominal efficiency (only used if efficiency curve depends on temperature)"; // Efficiency, fuel, and boiler properties parameter Buildings.Fluid.Types.EfficiencyCurves effCur= Buildings.Fluid.Types.EfficiencyCurves.Constant "Curve used to compute the efficiency"; parameter Real a[:] = {0.9} "Coefficients for efficiency curve"; parameter Buildings.Fluid.Data.Fuels.Generic fue "Fuel type"; parameter Modelica.Units.SI.ThermalConductance UA=0.05*Q_flow_nominal/30 "Overall UA value"; parameter Modelica.Units.SI.Volume V = 1.5E-6*Q_flow_nominal "Total internal volume of boiler"; parameter Modelica.Units.SI.Mass mDry = 1.5E-3*Q_flow_nominal "Mass of boiler that will be lumped to water heat capacity"; // Variables Modelica.Units.SI.Efficiency eta= if effCur == Buildings.Fluid.Types.EfficiencyCurves.Constant then a[1] elseif effCur == Buildings.Fluid.Types.EfficiencyCurves.Polynomial then Buildings.Utilities.Math.Functions.polynomial(a=a, x=y_internal) elseif effCur == Buildings.Fluid.Types.EfficiencyCurves.QuadraticLinear then Buildings.Utilities.Math.Functions.quadraticLinear( a=aQuaLin, x1=y_internal, x2=MediumSte.saturationTemperature(port_a.p)) else 0 "Boiler efficiency"; Modelica.Units.SI.Power QFue_flow = y_internal * Q_flow_nominal/eta_nominal "Heat released by fuel"; Modelica.Units.SI.Power QWat_flow = eta * QFue_flow "Heat transfer from gas into water"; Modelica.Units.SI.MassFlowRate mFue_flow = QFue_flow/fue.h "Fuel mass flow rate"; Modelica.Units.SI.VolumeFlowRate VFue_flow = mFue_flow/fue.d "Fuel volume flow rate"; Modelica.Blocks.Interfaces.RealInput y(min=0, max=1) if not steadyDynamics "Part load ratio"; Modelica.Blocks.Interfaces.RealOutput VLiq( final quantity="Volume", final unit="m3", min=0) "Output liquid water volume"; Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_a heatPort if not steadyDynamics "Heat port, can be used to connect to ambient"; Modelica.Thermal.HeatTransfer.Components.HeatCapacitor heaCapDry( C=500*mDry, T(start=T_start)) if not steadyDynamics "Heat capacity of boiler metal"; Buildings.Experimental.DHC.Plants.Steam.BaseClasses.ControlVolumeEvaporation vol( redeclare final package MediumSte = MediumSte, redeclare final package MediumWat = MediumWat, final allowFlowReversal=allowFlowReversal, final energyDynamics=energyDynamics, final massDynamics=massDynamics, final p_start=p_start, final m_flow_nominal=m_flow_nominal, final show_T=show_T, final V=V, final fixed_p_start=fixed_p_start) "Steam/water control volume"; Buildings.Fluid.FixedResistances.PressureDrop res( redeclare final package Medium = MediumWat, final allowFlowReversal=allowFlowReversal, final m_flow_nominal=m_flow_nominal, final show_T=show_T, final dp_nominal=dp_nominal) "Flow resistance"; Modelica.Blocks.Interfaces.RealOutput QFueFlo( final quantity="HeatFlowRate", final unit="W", min=0) "Heat flow rate of the fuel"; protected final parameter Boolean steadyDynamics= if energyDynamics == Modelica.Fluid.Types.Dynamics.SteadyState then true else false "= true, if steady state formulation"; parameter Real eta_nominal(fixed=false) "Boiler efficiency at nominal condition"; parameter Real aQuaLin[6] = if size(a, 1) == 6 then a else fill(0, 6) "Auxiliary variable for efficiency curve because quadraticLinear requires exactly 6 elements"; Modelica.Blocks.Interfaces.RealInput y_internal(min=0, max=1) "Internal block needed for conditional input part load ratio"; Buildings.HeatTransfer.Sources.PrescribedHeatFlow preHeaFlo if not steadyDynamics "Prescribed heat flow (if heatPort is connected)"; Modelica.Blocks.Sources.RealExpression Q_flow_in(y=QWat_flow) if not steadyDynamics "Heat transfer from gas into water (if heatPort is connected)"; Modelica.Thermal.HeatTransfer.Components.ThermalConductor UAOve(G=UA) if not steadyDynamics "Overall thermal conductance (if heatPort is connected)"; Modelica.Blocks.Sources.RealExpression QFue_flow_out(y=QFue_flow) "Heat flow rate of the fuel"; initial equation if effCur == Buildings.Fluid.Types.EfficiencyCurves.QuadraticLinear then assert(size(a, 1) == 6, "The boiler has the efficiency curve set to 'Buildings.Fluid.Types.EfficiencyCurves.QuadraticLinear', and hence the parameter 'a' must have exactly 6 elements. However, only " + String(size(a, 1)) + " elements were provided."); end if; if effCur == Buildings.Fluid.Types.EfficiencyCurves.Constant then eta_nominal = a[1]; elseif effCur == Buildings.Fluid.Types.EfficiencyCurves.Polynomial then eta_nominal = Buildings.Utilities.Math.Functions.polynomial( a=a, x=1); elseif effCur == Buildings.Fluid.Types.EfficiencyCurves.QuadraticLinear then // For this efficiency curve, a must have 6 elements. eta_nominal = Buildings.Utilities.Math.Functions.quadraticLinear( a=aQuaLin, x1=1, x2=T_nominal); else eta_nominal = 999; end if; equation assert(eta > 0.001, "Efficiency curve is wrong."); connect(y,y_internal); if steadyDynamics then if allowFlowReversal then -QWat_flow = port_a.m_flow*actualStream(port_a.h_outflow) + port_b.m_flow*actualStream(port_b.h_outflow); else -QWat_flow = port_a.m_flow*inStream(port_a.h_outflow) + port_b.m_flow*port_b.h_outflow; end if; end if; connect(UAOve.port_a, heatPort); connect(Q_flow_in.y,preHeaFlo. Q_flow); connect(heaCapDry.port, UAOve.port_b); connect(preHeaFlo.port, UAOve.port_b); connect(vol.heatPort, UAOve.port_b); connect(vol.port_b, port_b); connect(port_a, res.port_a); connect(res.port_b, vol.port_a); connect(vol.VLiq,VLiq); connect(QFue_flow_out.y, QFueFlo); end BoilerPolynomial;

Buildings.Experimental.DHC.Plants.Steam.BaseClasses.ControlVolumeEvaporation Buildings.Experimental.DHC.Plants.Steam.BaseClasses.ControlVolumeEvaporation

Control volume model exhibiting the evaporation process of water

Buildings.Experimental.DHC.Plants.Steam.BaseClasses.ControlVolumeEvaporation

Information

This model represents an evaporation process of water with liquid and vapor phases in equilibrium and at a saturated state. Further information regarding the model formulation and assumptions are in the base class Buildings.Experimental.DHC.BaseClasses.Steam.PartialSaturatedControlVolume.

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

Extends from Buildings.Experimental.DHC.BaseClasses.Steam.PartialSaturatedControlVolume (Partial control volume for evaporation/condensation processes).

Parameters

TypeNameDefaultDescription
replaceable package Medium_aPartialMediumMedium model for port_a (inlet)
replaceable package Medium_bPartialMediumMedium model for port_b (outlet)
MassFlowRatem_flow_small1E-4*abs(m_flow_nominal)Small mass flow rate for regularization of zero flow [kg/s]
replaceable package MediumWatTemperatureDependentDensityLiquid water medium
replaceable package MediumSteSteamSteam medium
VolumeV Total volume [m3]
Nominal condition
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
Initialization
AbsolutePressurep.startp_startPressure inside volume [Pa]
VolumeFlowRateVWat_flow.start0Volumetric flow rate of liquid water [m3/s]
SpecificEnthalpyhSte.startMediumSte.h_defaultSpecific enthalpy of steam vapor [J/kg]
SpecificEnthalpyhWat.startMediumWat.h_defaultSpecific enthalpy of liquid water [J/kg]
Advanced
Diagnostics
Booleanshow_Tfalse= true, if actual temperature at port is computed
Assumptions
BooleanallowFlowReversaltrue= false to simplify equations, assuming, but not enforcing, no flow reversal. Used only if model has two ports.
Dynamics
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
DynamicsmassDynamicsenergyDynamicsType of mass balance: dynamic (3 initialization options) or steady state
Initialization
AbsolutePressurep_startMediumSte.p_defaultStart value of pressure [Pa]
VolumeVWat_startV/2Start value of liquid volume [m3]
Booleanfixed_p_startfalseSet to true if p_start is to be used as an explicit initial equation, not an initial guess

Connectors

TypeNameDescription
replaceable package Medium_aMedium model for port_a (inlet)
replaceable package Medium_bMedium model for port_b (outlet)
FluidPort_aport_aFluid connector a (positive design flow direction is from port_a to port_b)
FluidPort_bport_bFluid connector b (positive design flow direction is from port_a to port_b)
HeatPort_aheatPortHeat port
output RealOutputVLiqLiquid volume [m3]

Modelica definition

model ControlVolumeEvaporation "Control volume model exhibiting the evaporation process of water" extends Buildings.Experimental.DHC.BaseClasses.Steam.PartialSaturatedControlVolume ( redeclare final package Medium_a=MediumWat, redeclare final package Medium_b=MediumSte, hSte(start = MediumSte.h_default), hWat(start = MediumWat.h_default), p(final fixed=fixed_p_start)); parameter Boolean fixed_p_start = false "Set to true if p_start is to be used as an explicit initial equation, not an initial guess"; equation // boundary conditions at the ports port_a.m_flow = mWat_flow; port_a.h_outflow = hWat; port_b.m_flow = mSte_flow; port_b.h_outflow = hSte; end ControlVolumeEvaporation;