diff --git a/IBPSA/Media/Steam.mo b/IBPSA/Media/Steam.mo index 1c0853c52c..d9c3e1376e 100644 --- a/IBPSA/Media/Steam.mo +++ b/IBPSA/Media/Steam.mo @@ -8,6 +8,7 @@ package Steam reducedX=true, fixedX=true, FluidConstants={Modelica.Media.IdealGases.Common.FluidData.H2O}, + ThermoStates=Modelica.Media.Interfaces.Choices.IndependentVariables.pTX, reference_T=273.15, reference_p=101325, reference_X={1}, @@ -125,8 +126,8 @@ redeclare replaceable function extends specificEnthalpy constant Temperature TMean = 4.15555698340926E+02 "Mean temperature"; constant Real pSD = 1.13236055019318E+05 "Normalization value"; constant Real TSD = 1.32971013463839E+01 "Normalization value"; - AbsolutePressure pHat; - Temperature THat; + Modelica.Units.SI.PressureDifference pHat; + Modelica.Units.SI.TemperatureDifference THat; algorithm pHat := (state.p - pMean)/pSD; THat := (state.T - TMean)/TSD; @@ -170,8 +171,8 @@ redeclare replaceable function extends specificEntropy constant Temperature TMean = 4.15555698340926E+02 "Mean temperature"; constant Real pSD = 1.13236055019318E+05 "Normalization value"; constant Real TSD = 1.32971013463839E+01 "Normalization value"; - AbsolutePressure pHat; - Temperature THat; + Modelica.Units.SI.PressureDifference pHat; + Modelica.Units.SI.TemperatureDifference THat; algorithm pHat := (state.p - pMean)/pSD; THat := (state.T - TMean)/TSD; @@ -728,7 +729,7 @@ function temperature_ph constant Temperature TMean = 4.15555698340926E+02 "Mean temperature"; constant Real pSD = 1.13236055019318E+05 "Normalization value"; constant Real TSD = 1.32971013463839E+01 "Normalization value"; - AbsolutePressure pHat; + Modelica.Units.SI.PressureDifference pHat; algorithm pHat := (p - pMean)/pSD; T := b[1] + b[2]*pHat + b[3]*h; @@ -773,8 +774,8 @@ function temperature_ps constant Temperature TMean = 4.15555698340926E+02 "Mean temperature"; constant Real pSD = 1.13236055019318E+05 "Normalization value"; constant Real TSD = 1.32971013463839E+01 "Normalization value"; - AbsolutePressure pHat; - Temperature THat; + Modelica.Units.SI.PressureDifference pHat; + Modelica.Units.SI.TemperatureDifference THat; algorithm pHat := (p - pMean)/pSD; THat := (s - a[1] - pHat*(a[2] + a[4]*pHat))/(a[3] + a[5]*pHat); @@ -818,10 +819,14 @@ function rho_pT "Density as function of temperature and pressure" Modelica.Media.Common.GibbsDerivs g "Dimensionless Gibbs function and derivatives w.r.t. pi and tau"; SpecificHeatCapacity R "Specific gas constant of water vapor"; + function g2_smooth + extends Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.g2; + annotation(smoothOrder=2); + end g2_smooth; algorithm R := Modelica.Media.Water.IF97_Utilities.BaseIF97.data.RH2O; // Region 2 properties - g := Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic.g2(p, T); + g := g2_smooth(p, T); rho := p/(R*T*g.pi*g.gpi); annotation ( Inline=true, @@ -847,7 +852,6 @@ algorithm region=2); annotation (Inline=true); end pressure_dT; - annotation (Icon(graphics={ Line( points={{50,30},{30,10},{50,-10},{30,-30}}, @@ -913,9 +917,42 @@ steam heating processes involving low and medium pressure steam. 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 +