diff --git a/Modelica/Media/Water/IF97_Utilities.mo b/Modelica/Media/Water/IF97_Utilities.mo
index 2fa6a7fbc5..ab52960b2c 100644
--- a/Modelica/Media/Water/IF97_Utilities.mo
+++ b/Modelica/Media/Water/IF97_Utilities.mo
@@ -22,7 +22,6 @@ package IF97_Utilities
//===================================================================
// Constant declarations
-
//===================================================================
record data "Constant IF97 data and region limits"
extends Modelica.Icons.Record;
@@ -73,25 +72,27 @@ package IF97_Utilities
0.13918839778870e2)
"Polynomial coefficients for boundary between regions 2 and 3";
annotation (Documentation(info="
-
Record description
- Constants needed in the international steam properties IF97.
- SCRIT and HCRIT are calculated from Helmholtz function for region 3.
-Version Info and Revision history
-
+Record description
+Constants needed in the international steam properties IF97.
+SCRIT and HCRIT are calculated from Helmholtz function for region 3.
+
+Version Info and Revision history
-- First implemented: July, 2000
- by Hubertus Tummescheit
-
+ -
+ First implemented: July, 2000
+ by Hubertus Tummescheit
+
- Author: Hubertus Tummescheit,
- Modelon AB
- Ideon Science Park
- SE-22370 Lund, Sweden
- email: hubertus@modelon.se
-
+
+ Author: Hubertus Tummescheit,
+ Modelon AB
+ Ideon Science Park
+ SE-22370 Lund, Sweden
+ email: hubertus@modelon.se
+
- - Initial version: July 2000
- - Documentation added: December 2002
+ - Initial version: July 2000
+ - Documentation added: December 2002
"));
end data;
@@ -134,24 +135,28 @@ package IF97_Utilities
constant SI.SpecificEntropy SCRIT=4412.02148223476
"The calculated specific entropy at the critical point";
annotation (Documentation(info="
- Record description
- Critical point data for IF97 steam properties. SCRIT and HCRIT are calculated from Helmholtz function for region 3
-Version Info and Revision history
-
+Record description
+
+Critical point data for IF97 steam properties. SCRIT and HCRIT are calculated from Helmholtz function for region 3.
+
+
+Version Info and Revision history
-- First implemented: July, 2000
- by Hubertus Tummescheit
-
+ -
+ First implemented: July, 2000
+ by Hubertus Tummescheit
+
- Author: Hubertus Tummescheit,
- Modelon AB
- Ideon Science Park
- SE-22370 Lund, Sweden
- email: hubertus@modelon.se
-
+
+Author: Hubertus Tummescheit,
+Modelon AB
+Ideon Science Park
+SE-22370 Lund, Sweden
+email: hubertus@modelon.se
+
- - Initial version: July 2000
- - Documentation added: December 2002
+ - Initial version: July 2000
+ - Documentation added: December 2002
"));
end critical;
@@ -165,24 +170,26 @@ package IF97_Utilities
constant SI.Density dvtriple=0.485457572477861372e-2
"The triple point vapour density";
annotation (Documentation(info="
- Record description
- Vapour/liquid/ice triple point data for IF97 steam properties.
-Version Info and Revision history
-
+Record description
+Vapour/liquid/ice triple point data for IF97 steam properties.
+
+Version Info and Revision history
-- First implemented: July, 2000
- by Hubertus Tummescheit
-
+ -
+ First implemented: July, 2000
+ by Hubertus Tummescheit
+
- Author: Hubertus Tummescheit,
- Modelon AB
- Ideon Science Park
- SE-22370 Lund, Sweden
- email: hubertus@modelon.se
-
+
+Author: Hubertus Tummescheit,
+Modelon AB
+Ideon Science Park
+SE-22370 Lund, Sweden
+email: hubertus@modelon.se
+
- - Initial version: July 2000
- - Documentation added: December 2002
+ - Initial version: July 2000
+ - Documentation added: December 2002
"));
end triple;
@@ -194,7 +201,6 @@ package IF97_Utilities
//===================================================================
// "Public" functions
-
//===================================================================
function boundary23ofT
@@ -1531,91 +1537,197 @@ package IF97_Utilities
dd_dp := drhovl_dp(p, dewcurve_p(p));
annotation (Inline=true);
end drhov_dp;
- annotation (Documentation(info="Package description
- Package Regions contains a large number of auxiliary functions which are needed to compute the current region
- of the IAPWS/IF97 for a given pair of input variables as quickly as possible. The focus of this implementation was on
- computational efficiency, not on compact code. Many of the function values calculated in these functions could be obtained
- using the fundamental functions of IAPWS/IF97, but with considerable overhead. If the region of IAPWS/IF97 is known in advance,
- the input variable mode can be set to the region, then the somewhat costly region checks are omitted.
- The checking for the phase has to be done outside the region functions because many properties are not
- differentiable at the region boundary. If the input phase is 2, the output region will be set to 4 immediately.
- Package contents
- The main 4 functions in this package are the functions returning the appropriate region for two input variables.
-
- - Function region_ph compute the region of IAPWS/IF97 for input pair pressure and specific enthalpy.
- - Function region_ps compute the region of IAPWS/IF97 for input pair pressure and specific entropy
- - Function region_dT compute the region of IAPWS/IF97 for input pair density and temperature.
- - Function region_pT compute the region of IAPWS/IF97 for input pair pressure and temperature (only in phase region).
-
- In addition, functions of the boiling and condensation curves compute the specific enthalpy, specific entropy, or density on these
- curves. The functions for the saturation pressure and temperature are included in the package Basic because they are part of
- the original IAPWS/IF97 standards document. These functions are also aliased to
- be used directly from package Water.
+ annotation (Documentation(info="
+
Package description
+
+Package Regions contains a large number of auxiliary functions which are needed to compute the current region
+of the IAPWS/IF97 for a given pair of input variables as quickly as possible. The focus of this implementation was on
+computational efficiency, not on compact code. Many of the function values calculated in these functions could be obtained
+using the fundamental functions of IAPWS/IF97, but with considerable overhead. If the region of IAPWS/IF97 is known in advance,
+the input variable mode can be set to the region, then the somewhat costly region checks are omitted.
+The checking for the phase has to be done outside the region functions because many properties are not
+differentiable at the region boundary. If the input phase is 2, the output region will be set to 4 immediately.
-
- - Function hl_p computes the liquid specific enthalpy as a function of pressure. For overcritical pressures,
- the critical specific enthalpy is returned. An approximation is used for temperatures > 623.15 K.
- - Function hv_p computes the vapour specific enthalpy as a function of pressure. For overcritical pressures,
- the critical specific enthalpy is returned. An approximation is used for temperatures > 623.15 K.
- - Function sl_p computes the liquid specific entropy as a function of pressure. For overcritical pressures,
- the critical specific entropy is returned. An approximation is used for temperatures > 623.15 K.
- - Function sv_p computes the vapour specific entropy as a function of pressure. For overcritical pressures,
- the critical specific entropy is returned. An approximation is used for temperatures > 623.15 K.
- - Function rhol_T computes the liquid density as a function of temperature. For overcritical temperatures,
- the critical density is returned. An approximation is used for temperatures > 623.15 K.
- - Function rhol_T computes the vapour density as a function of temperature. For overcritical temperatures,
- the critical density is returned. An approximation is used for temperatures > 623.15 K.
-
- All other functions are auxiliary functions called from the region functions to check a specific boundary.
-
- - Function boundary23ofT computes the boundary pressure between regions 2 and 3 (input temperature)
- - Function boundary23ofp computes the boundary temperature between regions 2 and 3 (input pressure)
- - Function hlowerofp5 computes the lower specific enthalpy limit of region 5 (input p, T=1073.15 K)
- - Function hupperofp5 computes the upper specific enthalpy limit of region 5 (input p, T=2273.15 K)
- - Function slowerofp5 computes the lower specific entropy limit of region 5 (input p, T=1073.15 K)
- - Function supperofp5 computes the upper specific entropy limit of region 5 (input p, T=2273.15 K)
- - Function hlowerofp1 computes the lower specific enthalpy limit of region 1 (input p, T=273.15 K)
- - Function hupperofp1 computes the upper specific enthalpy limit of region 1 (input p, T=623.15 K)
- - Function slowerofp1 computes the lower specific entropy limit of region 1 (input p, T=273.15 K)
- - Function supperofp1 computes the upper specific entropy limit of region 1 (input p, T=623.15 K)
- - Function hlowerofp2 computes the lower specific enthalpy limit of region 2 (input p, T=623.15 K)
- - Function hupperofp2 computes the upper specific enthalpy limit of region 2 (input p, T=1073.15 K)
- - Function slowerofp2 computes the lower specific entropy limit of region 2 (input p, T=623.15 K)
- - Function supperofp2 computes the upper specific entropy limit of region 2 (input p, T=1073.15 K)
- - Function d1n computes the density in region 1 as function of pressure and temperature
- - Function d2n computes the density in region 2 as function of pressure and temperature
- - Function dhot1ofp computes the hot density limit of region 1 (input p, T=623.15 K)
- - Function dupper1ofTcomputes the high pressure density limit of region 1 (input T, p=100MPa)
- - Function hl_p_R4b computes a high accuracy approximation to the liquid enthalpy for temperatures > 623.15 K (input p)
- - Function hv_p_R4b computes a high accuracy approximation to the vapour enthalpy for temperatures > 623.15 K (input p)
- - Function sl_p_R4b computes a high accuracy approximation to the liquid entropy for temperatures > 623.15 K (input p)
- - Function sv_p_R4b computes a high accuracy approximation to the vapour entropy for temperatures > 623.15 K (input p)
- - Function rhol_p_R4b computes a high accuracy approximation to the liquid density for temperatures > 623.15 K (input p)
- - Function rhov_p_R4b computes a high accuracy approximation to the vapour density for temperatures > 623.15 K (input p)
-
+
+Package contents
+
+The main 4 functions in this package are the functions returning the appropriate region for two input variables.
+
+
+ -
+ Function region_ph compute the region of IAPWS/IF97 for
+ input pair pressure and specific enthalpy.
+
+ -
+ Function region_ps compute the region of IAPWS/IF97 for
+ input pair pressure and specific entropy.
+
+ -
+ Function region_dT compute the region of IAPWS/IF97 for
+ input pair density and temperature.
+
+ -
+ Function region_pT compute the region of IAPWS/IF97 for
+ input pair pressure and temperature (only in phase region).
+
+
+
+In addition, functions of the boiling and condensation curves compute the specific enthalpy, specific entropy, or density on these
+curves. The functions for the saturation pressure and temperature are included in the package Basic because they are part of
+the original IAPWS/IF97 standards document.
+These functions are also aliased to be used directly from package Water.
+
+
+ -
+ Function hl_p computes the liquid specific enthalpy as a function of pressure. For overcritical pressures,
+ the critical specific enthalpy is returned. An approximation is used for temperatures > 623.15 K.
+
+ -
+ Function hv_p computes the vapour specific enthalpy as a function of pressure. For overcritical pressures,
+ the critical specific enthalpy is returned. An approximation is used for temperatures > 623.15 K.
+
+ -
+ Function sl_p computes the liquid specific entropy as a function of pressure. For overcritical pressures,
+ the critical specific entropy is returned. An approximation is used for temperatures > 623.15 K.
+
+ -
+ Function sv_p computes the vapour specific entropy as a function of pressure. For overcritical pressures,
+ the critical specific entropy is returned. An approximation is used for temperatures > 623.15 K.
+
+ -
+ Function rhol_T computes the liquid density as a function of temperature. For overcritical temperatures,
+ the critical density is returned. An approximation is used for temperatures > 623.15 K.
+
+ -
+ Function rhol_T computes the vapour density as a function of temperature. For overcritical temperatures,
+ the critical density is returned. An approximation is used for temperatures > 623.15 K.
+
+
+
+All other functions are auxiliary functions called from the region functions to check a specific boundary.
+
+
+ -
+ Function boundary23ofT computes the boundary pressure between
+ regions 2 and 3 (input temperature).
+
+ -
+ Function boundary23ofp computes the boundary temperature between
+ regions 2 and 3 (input pressure).
+
+ -
+ Function hlowerofp5 computes the lower specific enthalpy limit
+ of region 5 (input p, T=1073.15 K).
+
+ -
+ Function hupperofp5 computes the upper specific enthalpy limit
+ of region 5 (input p, T=2273.15 K).
+
+ -
+ Function slowerofp5 computes the lower specific entropy limit
+ of region 5 (input p, T=1073.15 K).
+
+ -
+ Function supperofp5 computes the upper specific entropy limit
+ of region 5 (input p, T=2273.15 K).
+
+ -
+ Function hlowerofp1 computes the lower specific enthalpy limit
+ of region 1 (input p, T=273.15 K).
+
+ -
+ Function hupperofp1 computes the upper specific enthalpy limit
+ of region 1 (input p, T=623.15 K).
+
+ -
+ Function slowerofp1 computes the lower specific entropy limit
+ of region 1 (input p, T=273.15 K).
+
+ -
+ Function supperofp1 computes the upper specific entropy limit
+ of region 1 (input p, T=623.15 K).
+
+ -
+ Function hlowerofp2 computes the lower specific enthalpy limit
+ of region 2 (input p, T=623.15 K).
+
+ -
+ Function hupperofp2 computes the upper specific enthalpy limit
+ of region 2 (input p, T=1073.15 K).
+
+ -
+ Function slowerofp2 computes the lower specific entropy limit
+ of region 2 (input p, T=623.15 K).
+
+ -
+ Function supperofp2 computes the upper specific entropy limit
+ of region 2 (input p, T=1073.15 K).
+
+ -
+ Function d1n computes the density in region 1 as function
+ of pressure and temperature.
+
+ -
+ Function d2n computes the density in region 2 as function
+ of pressure and temperature.
+
+ -
+ Function dhot1ofp computes the hot density limit of
+ region 1 (input p, T=623.15 K).
+
+ -
+ Function dupper1ofTcomputes the high pressure density limit
+ of region 1 (input T, p=100MPa).
+
+ -
+ Function hl_p_R4b computes a high accuracy approximation to
+ the liquid enthalpy for temperatures > 623.15 K (input p).
+
+ -
+ Function hv_p_R4b computes a high accuracy approximation to
+ the vapour enthalpy for temperatures > 623.15 K (input p).
+
+ -
+ Function sl_p_R4b computes a high accuracy approximation to
+ the liquid entropy for temperatures > 623.15 K (input p).
+
+ -
+ Function sv_p_R4b computes a high accuracy approximation to
+ the vapour entropy for temperatures > 623.15 K (input p).
+
+ -
+ Function rhol_p_R4b computes a high accuracy approximation
+ to the liquid density for temperatures > 623.15 K (input p).
+
+ -
+ Function rhov_p_R4b computes a high accuracy approximation
+ to the vapour density for temperatures > 623.15 K (input p).
+
+
Version Info and Revision history
-- First implemented: July, 2000
- by Hubertus Tummescheit
-
+ -
+ First implemented: July, 2000
+ by Hubertus Tummescheit
+
-Authors: Hubertus Tummescheit, Jonas Eborn and Falko Jens Wagner
- Modelon AB
- Ideon Science Park
- SE-22370 Lund, Sweden
- email: hubertus@modelon.se
-
-
- - Initial version: July 2000
- - Revised and extended for inclusion in Modelica.Thermal: December 2002
+
+Authors: Hubertus Tummescheit, Jonas Eborn and Falko Jens Wagner
+Modelon AB
+Ideon Science Park
+SE-22370 Lund, Sweden
+email: hubertus@modelon.se
+
+
+ - Initial version: July 2000
+ - Revised and extended for inclusion in Modelica.Thermal: December 2002
"));
end Regions;
//===================================================================
// Base functions
-
//===================================================================
package Basic "Base functions as described in IAWPS/IF97"
@@ -3124,15 +3236,15 @@ package IF97_Utilities
pstar;
annotation (Documentation(info="
- Equation number 1 from:
- The International Association for the Properties of Water and Steam
- Gaithersburg, Maryland, USA
- September 2001
- Supplementary Release on Backward Equations for Pressure as a
- Function of Enthalpy and Entropy p(h,s) to the IAPWS Industrial
- Formulation 1997 for the Thermodynamic Properties of Water and Steam
+Equation number 1 from:
+The International Association for the Properties of Water and Steam
+Gaithersburg, Maryland, USA
+September 2001
+Supplementary Release on Backward Equations for Pressure as a
+Function of Enthalpy and Entropy p(h,s) to the IAPWS Industrial
+Formulation 1997 for the Thermodynamic Properties of Water and Steam
- "));
+"));
end p1_hs;
function h2ab_s "Boundary between regions 2a and 2b"
@@ -3148,16 +3260,16 @@ package IF97_Utilities
algorithm
h := (n[1] + n[2]*sigma + n[3]*sigma^2 + n[4]*sigma^3)*hstar;
annotation (Documentation(info="
-
- Equation number 2 from:
- The International Association for the Properties of Water and Steam
- Gaithersburg, Maryland, USA
- September 2001
- Supplementary Release on Backward Equations for Pressure as a
- Function of Enthalpy and Entropy p(h,s) to the IAPWS Industrial
- Formulation 1997 for the Thermodynamic Properties of Water and Steam
+
+Equation number 2 from:
+The International Association for the Properties of Water and Steam
+Gaithersburg, Maryland, USA
+September 2001
+Supplementary Release on Backward Equations for Pressure as a
+Function of Enthalpy and Entropy p(h,s) to the IAPWS Industrial
+Formulation 1997 for the Thermodynamic Properties of Water and Steam
- "));
+