packageSteam

Package with model for pure steam water vapor

Extends from Modelica.Media.Interfaces.PartialMedium (Partial medium properties (base package of all media packages)), Modelica.Icons.Package (Icon for standard packages).

Information

This medium package models water vapor (pure steam, region 2, quality=1).

Thermodynamic properties are calculated primarily in terms of pressure and temperature. For thermodynamic property functions, the IAPWS-IF97 formulations are adapted, and approximate relationships are provided for commonly used functions to improve computational efficiency and provide backward compatability.

Detailed functions from Modelica.Media.Water.WaterIF97_R2pT are generally used, except for Buildings.Media.Steam.specificEnthalpy and Buildings.Media.Steam.specificEntropy (both "forward" functions), as well as their "backward" inverse functions Buildings.Media.Steam.temperature_ph and Buildings.Media.Steam.temperature_ps, which are numerically consistent with the forward functions. The following modifications were made relative to the Modelica.Media.Water.WaterIF97_R2pT medium package:

  1. Analytic expressions for the derivatives are provided for all thermodynamic property functions.
  2. The implementation is generally simpler in order to increase the likelihood of more efficient simulations.

Limitations

  • The valid temperature range is 100°C ≤ T ≤ 160°C, and the valid pressure range is 100 kPa ≤ p ≤ 550 kPa.
  • When phase change is required, this model is to be used in combination with Buildings.Media.Water for the liquid phase (quality=0). Please note that the maximum temperature for liquid water is T_max=130°C. This is suitable for real-world condensate return and boiler feedwater systems, which are typically vented to the atmosphere with steam contained via steam traps (thus, T_max=100°C for the condensate or feedwater in properly functioning systems).

Applications

This model is intended for first generation district heating systems and other steam heating processes involving low and medium pressure steam.

References

W. Wagner et al., “The IAPWS industrial formulation 1997 for the thermodynamic properties of water and steam,” J. Eng. Gas Turbines Power, vol. 122, no. 1, pp. 150–180, 2000.

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
Modelica.Media.Interfaces.Choices.IndependentVariablesThermoStates (from PartialMedium)Enumeration type for independent variables
StringmediumName (from PartialMedium)"unusablePartialMedium"Name of the medium
String[:]substanceNames (from PartialMedium){mediumName}Names of the mixture substances. Set substanceNames={mediumName} if only one substance.
String[:]extraPropertiesNames (from PartialMedium)fill("", 0)Names of the additional (extra) transported properties. Set extraPropertiesNames=fill("",0) if unused
BooleansingleState (from PartialMedium)= true, if u and d are not a function of pressure
BooleanreducedX (from PartialMedium)true= true, if medium contains the equation sum(X) = 1.0; set reducedX=true, if only one substance (see docu for details)
BooleanfixedX (from PartialMedium)false= true, if medium contains the equation X = reference_X
AbsolutePressurereference_p (from PartialMedium)101325Reference pressure of Medium: default 1 atmosphere
Temperaturereference_T (from PartialMedium)298.15Reference temperature of Medium: default 25 deg Celsius
MassFraction[nX]reference_X (from PartialMedium)fill(1/nX, nX)Default mass fractions of medium
AbsolutePressurep_default (from PartialMedium)101325Default value for pressure of medium (for initialization)
TemperatureT_default (from PartialMedium)Modelica.Units.Conversions.from_degC(20)Default value for temperature of medium (for initialization)
SpecificEnthalpyh_default (from PartialMedium)specificEnthalpy_pTX(p_default, T_default, X_default)Default value for specific enthalpy of medium (for initialization)
MassFraction[nX]X_default (from PartialMedium)reference_XDefault value for mass fractions of medium (for initialization)
ExtraProperty[nC]C_default (from PartialMedium)fill(0, nC)Default value for trace substances of medium (for initialization)
IntegernS (from PartialMedium)size(substanceNames, 1)Number of substances
IntegernX (from PartialMedium)nSNumber of mass fractions
IntegernXi (from PartialMedium)if fixedX then 0 else if reducedX then nS - 1 else nSNumber of structurally independent mass fractions (see docu for details)
IntegernC (from PartialMedium)size(extraPropertiesNames, 1)Number of extra (outside of standard mass-balance) transported properties
Real[nC]C_nominal (from PartialMedium)1.0e-6*ones(nC)Default for the nominal values for the extra properties

Contents

NameDescription
ThermodynamicStateThermodynamic state variables
BasePropertiesBase properties (p, d, T, h, u, R, MM) of water
densityReturns density
dynamicViscosityReturn dynamic viscosity
molarMassReturn the molar mass of the medium
pressureReturn pressure
saturationPressureReturn saturation pressure of condensing fluid
saturationTemperatureReturn saturation temperature
specificEnthalpyReturns specific enthalpy
specificEntropyReturn specific entropy
specificInternalEnergyReturn specific internal energy
specificHeatCapacityCpSpecific heat capacity at constant pressure
specificHeatCapacityCvSpecific heat capacity at constant volume
specificGibbsEnergySpecific Gibbs energy
specificHelmholtzEnergySpecific Helmholtz energy
setState_dTXReturn the thermodynamic state as function of d and T
setState_pTXReturn the thermodynamic state as function of p and T
setState_phXReturn the thermodynamic state as function of p and h
setState_psXReturn the thermodynamic state as function of p and s
temperatureReturn temperature
thermalConductivityReturn thermal conductivity
density_derh_pDensity derivative by specific enthalpy
density_derp_hDensity derivative by pressure
isentropicExponentReturn isentropic exponent
isothermalCompressibilityIsothermal compressibility of water
isobaricExpansionCoefficientIsobaric expansion coefficient of water
isentropicEnthalpyIsentropic enthalpy
GasPropertiesprotectedCoefficient data record for properties of perfect gases
g2protectedGibbs function for region 2: g(p,T)
temperature_phprotectedReturn temperature from p and h, inverse function of h(p,T)
temperature_psprotectedReturn temperature from p and s, inverse function of s(p,T)
rho_pTprotectedDensity as function of temperature and pressure
pressure_dTprotectedComputes pressure as a function of density and temperature

Revisions

  • September 29, 2023, by Kathryn Hinkelman:
    Added publication references.
  • March 10, 2023, by Saranya Anbarasu:
    Changed the variable type definition of pHat and THat from absolute to Modelica.Units.SI.PressureDifference and Modelica.Units.SI.TemperatureDifference to prevent min/max assertion errors during initilization.
  • May 9, 2022, by David Blum:
    In function rho_pT, created and used new function extending Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.g2 with an annotation smoothOrder=2. This is to specifically pass on the smoothOrder=2 annotion placed on rho_pT to the g2 function.
  • April 13, 2021, by Kathryn Hinkelman:
    Changed pressure from constant to variable and reduced applicable pressure-temperature range to improve accuracy of polynomial approximations.
  • October 30, 2020, by Kathryn Hinkelman:
    Complete new reimplementation to eliminate numerical inefficiencies and improve accuracy of property function calculations.