Functions to find the current region for given pairs of input variables
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.
The main 4 functions in this package are the functions returning the appropriate region for two input variables.
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.
All other functions are auxiliary functions called from the region functions to check a specific boundary.
Extends from Modelica.Icons.Package (Icon for standard packages).
| Name | Description |
|---|---|
| Boundary function for region boundary between regions 2 and 3 (input temperature) | |
| Boundary function for region boundary between regions 2 and 3 (input pressure) | |
| Explicit lower specific enthalpy limit of region 5 as function of pressure | |
| Explicit upper specific enthalpy limit of region 5 as function of pressure | |
| Explicit lower specific entropy limit of region 5 as function of pressure | |
| Explicit upper specific entropy limit of region 5 as function of pressure | |
| Explicit lower specific enthalpy limit of region 1 as function of pressure | |
| Explicit upper specific enthalpy limit of region 1 as function of pressure (meets region 4 saturation pressure curve at 623.15 K) | |
| Explicit lower specific entropy limit of region 1 as function of pressure | |
| Explicit upper specific entropy limit of region 1 as function of pressure (meets region 4 saturation pressure curve at 623.15 K) | |
| Explicit lower specific enthalpy limit of region 2 as function of pressure (meets region 4 saturation pressure curve at 623.15 K) | |
| Explicit upper specific enthalpy limit of region 2 as function of pressure | |
| Explicit lower specific entropy limit of region 2 as function of pressure (meets region 4 saturation pressure curve at 623.15 K) | |
| Explicit upper specific entropy limit of region 2 as function of pressure | |
| Density in region 1 as function of p and T | |
| Density in region 2 as function of p and T | |
| Density at upper temperature limit of region 1 | |
| Density at upper pressure limit of region 1 | |
| Explicit approximation of liquid specific enthalpy on the boundary between regions 4 and 3 | |
| Explicit approximation of vapour specific enthalpy on the boundary between regions 4 and 3 | |
| Explicit approximation of liquid specific entropy on the boundary between regions 4 and 3 | |
| Explicit approximation of vapour specific entropy on the boundary between regions 4 and 3 | |
| Explicit approximation of liquid density on the boundary between regions 4 and 3 | |
| Explicit approximation of vapour density on the boundary between regions 4 and 2 | |
| Properties on the boiling curve | |
| Properties on the dew curve | |
| Liquid specific enthalpy on the boundary between regions 4 and 3 or 1 | |
| Vapour specific enthalpy on the boundary between regions 4 and 3 or 2 | |
| Derivative function for the specific enthalpy along the phase boundary | |
| Density of saturated water | |
| Density of saturated vapour | |
| Liquid specific entropy on the boundary between regions 4 and 3 or 1 | |
| Vapour specific entropy on the boundary between regions 4 and 3 or 2 | |
| Density of saturated water | |
| Density of saturated vapour | |
| Return the current region (valid values: 1,2,3,4,5) in IF97 for given pressure and specific enthalpy | |
| Return the current region (valid values: 1,2,3,4,5) in IF97 for given pressure and specific entropy | |
| Return the current region (valid values: 1,2,3,5) in IF97, given pressure and temperature | |
| Return the current region (valid values: 1,2,3,4,5) in IF97, given density and temperature | |
| Derivative function for the specific enthalpy along the phase boundary | |
| Derivative of liquid specific enthalpy on the boundary between regions 4 and 3 or 1 w.r.t. pressure | |
| Derivative of vapour specific enthalpy on the boundary between regions 4 and 3 or 1 w.r.t. pressure | |
| Derivative of density of saturated water w.r.t. pressure | |
| Derivative of density of saturated steam w.r.t. pressure |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.boundary23ofTBoundary function for region boundary between regions 2 and 3 (input temperature)
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| t | Temperature (K) [K] |
| Name | Description |
|---|---|
| p | Pressure [Pa] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.boundary23ofpBoundary function for region boundary between regions 2 and 3 (input pressure)
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| t | Temperature (K) [K] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hlowerofp5Explicit lower specific enthalpy limit of region 5 as function of pressure
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| h | Specific enthalpy [J/kg] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp5Explicit upper specific enthalpy limit of region 5 as function of pressure
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| h | Specific enthalpy [J/kg] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.slowerofp5Explicit lower specific entropy limit of region 5 as function of pressure
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| s | Specific entropy [J/(kg.K)] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.supperofp5Explicit upper specific entropy limit of region 5 as function of pressure
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| s | Specific entropy [J/(kg.K)] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hlowerofp1Explicit lower specific enthalpy limit of region 1 as function of pressure
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| h | Specific enthalpy [J/kg] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp1Explicit upper specific enthalpy limit of region 1 as function of pressure (meets region 4 saturation pressure curve at 623.15 K)
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| h | Specific enthalpy [J/kg] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.slowerofp1Explicit lower specific entropy limit of region 1 as function of pressure
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| s | Specific entropy [J/(kg.K)] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.supperofp1Explicit upper specific entropy limit of region 1 as function of pressure (meets region 4 saturation pressure curve at 623.15 K)
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| s | Specific entropy [J/(kg.K)] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hlowerofp2Explicit lower specific enthalpy limit of region 2 as function of pressure (meets region 4 saturation pressure curve at 623.15 K)
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| h | Specific enthalpy [J/kg] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp2Explicit upper specific enthalpy limit of region 2 as function of pressure
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| h | Specific enthalpy [J/kg] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.slowerofp2Explicit lower specific entropy limit of region 2 as function of pressure (meets region 4 saturation pressure curve at 623.15 K)
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| s | Specific entropy [J/(kg.K)] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.supperofp2Explicit upper specific entropy limit of region 2 as function of pressure
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| s | Specific entropy [J/(kg.K)] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.d1nDensity in region 1 as function of p and T
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| T | Temperature (K) [K] |
| Name | Description |
|---|---|
| d | Density [kg/m3] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.d2nDensity in region 2 as function of p and T
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| T | Temperature (K) [K] |
| Name | Description |
|---|---|
| d | Density [kg/m3] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dhot1ofpDensity at upper temperature limit of region 1
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| d | Density [kg/m3] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dupper1ofTDensity at upper pressure limit of region 1
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| T | Temperature (K) [K] |
| Name | Description |
|---|---|
| d | Density [kg/m3] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hl_p_R4bExplicit approximation of liquid specific enthalpy on the boundary between regions 4 and 3
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| h | Specific enthalpy [J/kg] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hv_p_R4bExplicit approximation of vapour specific enthalpy on the boundary between regions 4 and 3
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| h | Specific enthalpy [J/kg] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.sl_p_R4bExplicit approximation of liquid specific entropy on the boundary between regions 4 and 3
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| s | Specific entropy [J/(kg.K)] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.sv_p_R4bExplicit approximation of vapour specific entropy on the boundary between regions 4 and 3
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| s | [J/(kg.K)] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhol_p_R4bExplicit approximation of liquid density on the boundary between regions 4 and 3
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| dl | Liquid density [kg/m3] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhov_p_R4bExplicit approximation of vapour density on the boundary between regions 4 and 2
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| dv | Vapour density [kg/m3] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.boilingcurve_pProperties on the boiling curve
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| bpro | Property record |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dewcurve_pProperties on the dew curve
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| bpro | Property record |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_pExtends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| bpro | Property record |
| Name | Description |
|---|---|
| h | Specific enthalpy [J/kg] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hl_pLiquid specific enthalpy on the boundary between regions 4 and 3 or 1
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| h | Specific enthalpy [J/kg] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hv_pVapour specific enthalpy on the boundary between regions 4 and 3 or 2
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| h | Specific enthalpy [J/kg] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p_derDerivative function for the specific enthalpy along the phase boundary
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| bpro | Property record |
| p_der | Derivative of pressure |
| Name | Description |
|---|---|
| h_der | Time derivative of specific enthalpy along the phase boundary |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhovl_pExtends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| bpro | Property record |
| Name | Description |
|---|---|
| rho | Density [kg/m3] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhol_pDensity of saturated water
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Saturation pressure [Pa] |
| Name | Description |
|---|---|
| rho | Density of steam at the condensation point [kg/m3] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhov_pDensity of saturated vapour
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Saturation pressure [Pa] |
| Name | Description |
|---|---|
| rho | Density of steam at the condensation point [kg/m3] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhovl_p_derExtends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Saturation pressure [Pa] |
| bpro | Property record |
| p_der | Derivative of pressure |
| Name | Description |
|---|---|
| d_der | Time derivative of density along the phase boundary |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.sl_pLiquid specific entropy on the boundary between regions 4 and 3 or 1
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| s | Specific entropy [J/(kg.K)] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.sv_pVapour specific entropy on the boundary between regions 4 and 3 or 2
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| s | Specific entropy [J/(kg.K)] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhol_TDensity of saturated water
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| T | Temperature [K] |
| Name | Description |
|---|---|
| d | Density of water at the boiling point [kg/m3] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhov_TDensity of saturated vapour
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| T | Temperature [K] |
| Name | Description |
|---|---|
| d | Density of steam at the condensation point [kg/m3] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.region_phReturn the current region (valid values: 1,2,3,4,5) in IF97 for given pressure and specific enthalpy
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| h | Specific enthalpy [J/kg] |
| phase | Phase: 2 for two-phase, 1 for one phase, 0 if not known |
| mode | Mode: 0 means check, otherwise assume region=mode |
| Name | Description |
|---|---|
| region | Region (valid values: 1,2,3,4,5) in IF97 |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.region_psReturn the current region (valid values: 1,2,3,4,5) in IF97 for given pressure and specific entropy
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| s | Specific entropy [J/(kg.K)] |
| phase | Phase: 2 for two-phase, 1 for one phase, 0 if unknown |
| mode | Mode: 0 means check, otherwise assume region=mode |
| Name | Description |
|---|---|
| region | Region (valid values: 1,2,3,4,5) in IF97 |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.region_pTReturn the current region (valid values: 1,2,3,5) in IF97, given pressure and temperature
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| T | Temperature (K) [K] |
| mode | Mode: 0 means check, otherwise assume region=mode |
| Name | Description |
|---|---|
| region | Region (valid values: 1,2,3,5) in IF97, region 4 is impossible! |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.region_dTReturn the current region (valid values: 1,2,3,4,5) in IF97, given density and temperature
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| d | Density [kg/m3] |
| T | Temperature (K) [K] |
| phase | Phase: 2 for two-phase, 1 for one phase, 0 if not known |
| mode | Mode: 0 means check, otherwise assume region=mode |
| Name | Description |
|---|---|
| region | (valid values: 1,2,3,4,5) in IF97 |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_dpDerivative function for the specific enthalpy along the phase boundary
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| bpro | Property record |
| Name | Description |
|---|---|
| dh_dp | Derivative of specific enthalpy along the phase boundary |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dhl_dpDerivative of liquid specific enthalpy on the boundary between regions 4 and 3 or 1 w.r.t. pressure
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| dh_dp | Specific enthalpy derivative w.r.t. pressure [J.m.s2/kg2] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dhv_dpDerivative of vapour specific enthalpy on the boundary between regions 4 and 3 or 1 w.r.t. pressure
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Pressure [Pa] |
| Name | Description |
|---|---|
| dh_dp | Specific enthalpy derivative w.r.t. pressure [J.m.s2/kg2] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.drhovl_dpExtends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Saturation pressure [Pa] |
| bpro | Property record |
| Name | Description |
|---|---|
| dd_dp | Derivative of density along the phase boundary [kg/(m3.Pa)] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.drhol_dpDerivative of density of saturated water w.r.t. pressure
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Saturation pressure [Pa] |
| Name | Description |
|---|---|
| dd_dp | Derivative of density of water at the boiling point [s2/m2] |
Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.drhov_dpDerivative of density of saturated steam w.r.t. pressure
Extends from Modelica.Icons.Function (Icon for functions).
| Name | Description |
|---|---|
| p | Saturation pressure [Pa] |
| Name | Description |
|---|---|
| dd_dp | Derivative of density of water at the boiling point [s2/m2] |