Package Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions
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.FunctionsPackage (Icon for packages containing functions).
| Name | Description |
|---|---|
boilingcurve_p | Properties on the boiling curve |
boundary23ofp | Boundary function for region boundary between regions 2 and 3 (input pressure) |
boundary23ofT | Boundary function for region boundary between regions 2 and 3 (input temperature) |
d1n | Density in region 1 as function of p and T |
d2n | Density in region 2 as function of p and T |
dewcurve_p | Properties on the dew curve |
dhl_dp | Derivative of liquid specific enthalpy on the boundary between regions 4 and 3 or 1 w.r.t. pressure |
dhot1ofp | Density at upper temperature limit of region 1 |
dhv_dp | Derivative of vapour specific enthalpy on the boundary between regions 4 and 3 or 1 w.r.t. pressure |
drhol_dp | Derivative of density of saturated water w.r.t. pressure |
drhov_dp | Derivative of density of saturated steam w.r.t. pressure |
drhovl_dp | |
dupper1ofT | Density at upper pressure limit of region 1 |
hl_p | Liquid specific enthalpy on the boundary between regions 4 and 3 or 1 |
hl_p_R4b | Explicit approximation of liquid specific enthalpy on the boundary between regions 4 and 3 |
hlowerofp1 | Explicit lower specific enthalpy limit of region 1 as function of pressure |
hlowerofp2 | Explicit lower specific enthalpy limit of region 2 as function of pressure (meets region 4 saturation pressure curve at 623.15 K) |
hlowerofp5 | Explicit lower specific enthalpy limit of region 5 as function of pressure |
hupperofp1 | Explicit upper specific enthalpy limit of region 1 as function of pressure (meets region 4 saturation pressure curve at 623.15 K) |
hupperofp2 | Explicit upper specific enthalpy limit of region 2 as function of pressure |
hupperofp5 | Explicit upper specific enthalpy limit of region 5 as function of pressure |
hv_p | Vapour specific enthalpy on the boundary between regions 4 and 3 or 2 |
hv_p_R4b | Explicit approximation of vapour specific enthalpy on the boundary between regions 4 and 3 |
hvl_dp | Derivative function for the specific enthalpy along the phase boundary |
hvl_p | |
hvl_p_der | Derivative function for the specific enthalpy along the phase boundary |
region_dT | Return the current region (valid values: 1,2,3,4,5) in IF97, given density and temperature |
region_ph | Return the current region (valid values: 1,2,3,4,5) in IF97 for given pressure and specific enthalpy |
region_ps | Return the current region (valid values: 1,2,3,4,5) in IF97 for given pressure and specific entropy |
region_pT | Return the current region (valid values: 1,2,3,5) in IF97, given pressure and temperature |
rhol_p | Density of saturated water |
rhol_p_R4b | Explicit approximation of liquid density on the boundary between regions 4 and 3 |
rhol_T | Density of saturated water |
rhov_p | Density of saturated vapour |
rhov_p_R4b | Explicit approximation of vapour density on the boundary between regions 4 and 2 |
rhov_T | Density of saturated vapour |
rhovl_p | |
rhovl_p_der | |
sl_p | Liquid specific entropy on the boundary between regions 4 and 3 or 1 |
sl_p_R4b | Explicit approximation of liquid specific entropy on the boundary between regions 4 and 3 |
slowerofp1 | Explicit lower specific entropy limit of region 1 as function of pressure |
slowerofp2 | Explicit lower specific entropy limit of region 2 as function of pressure (meets region 4 saturation pressure curve at 623.15 K) |
slowerofp5 | Explicit lower specific entropy limit of region 5 as function of pressure |
supperofp1 | Explicit upper specific entropy limit of region 1 as function of pressure (meets region 4 saturation pressure curve at 623.15 K) |
supperofp2 | Explicit upper specific entropy limit of region 2 as function of pressure |
supperofp5 | Explicit upper specific entropy limit of region 5 as function of pressure |
sv_p | Vapour specific entropy on the boundary between regions 4 and 3 or 2 |
sv_p_R4b | Explicit approximation of vapour specific entropy on the boundary between regions 4 and 3 |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.boundary23ofT
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Temperature | t | Temperature (K) |
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.boundary23ofp
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
Temperature | t | Temperature (K) |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hlowerofp5
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEnthalpy | h | Specific enthalpy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp5
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEnthalpy | h | Specific enthalpy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.slowerofp5
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEntropy | s | Specific entropy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.supperofp5
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEntropy | s | Specific entropy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hlowerofp1
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEnthalpy | h | Specific enthalpy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp1
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEnthalpy | h | Specific enthalpy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.slowerofp1
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEntropy | s | Specific entropy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.supperofp1
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEntropy | s | Specific entropy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hlowerofp2
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEnthalpy | h | Specific enthalpy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hupperofp2
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEnthalpy | h | Specific enthalpy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.slowerofp2
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEntropy | s | Specific entropy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.supperofp2
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEntropy | s | Specific entropy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.d1n
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
Temperature | T | Temperature (K) |
| Type | Name | Description |
|---|---|---|
Density | d | Density |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.d2n
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
Temperature | T | Temperature (K) |
| Type | Name | Description |
|---|---|---|
Density | d | Density |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dhot1ofp
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
Density | d | Density |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dupper1ofT
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Temperature | T | Temperature (K) |
| Type | Name | Description |
|---|---|---|
Density | d | Density |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hl_p_R4b
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEnthalpy | h | Specific enthalpy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hv_p_R4b
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEnthalpy | h | Specific enthalpy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.sl_p_R4b
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEntropy | s | Specific entropy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.sv_p_R4b
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEntropy | s |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhol_p_R4b
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
Density | dl | Liquid density |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhov_p_R4b
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
Density | dv | Vapour density |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.boilingcurve_p| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
IF97PhaseBoundaryProperties | bpro | Property record |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dewcurve_p| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
IF97PhaseBoundaryProperties | bpro | Property record |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
IF97PhaseBoundaryProperties | bpro | Property record |
| Type | Name | Description |
|---|---|---|
SpecificEnthalpy | h | Specific enthalpy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hl_p
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEnthalpy | h | Specific enthalpy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hv_p
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEnthalpy | h | Specific enthalpy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_p_der
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
IF97PhaseBoundaryProperties | bpro | Property record |
Real | p_der | Derivative of pressure |
| Type | Name | Description |
|---|---|---|
Real | h_der | Time derivative of specific enthalpy along the phase boundary |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhovl_p
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
IF97PhaseBoundaryProperties | bpro | Property record |
| Type | Name | Description |
|---|---|---|
Density | rho | Density |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhol_p
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Saturation pressure |
| Type | Name | Description |
|---|---|---|
Density | rho | Density of steam at the condensation point |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhov_p
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Saturation pressure |
| Type | Name | Description |
|---|---|---|
Density | rho | Density of steam at the condensation point |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhovl_p_der
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Saturation pressure |
IF97PhaseBoundaryProperties | bpro | Property record |
Real | p_der | Derivative of pressure |
| Type | Name | Description |
|---|---|---|
Real | d_der | Time derivative of density along the phase boundary |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.sl_p
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEntropy | s | Specific entropy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.sv_p
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
SpecificEntropy | s | Specific entropy |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhol_T
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Temperature | T | Temperature |
| Type | Name | Description |
|---|---|---|
Density | d | Density of water at the boiling point |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.rhov_T
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Temperature | T | Temperature |
| Type | Name | Description |
|---|---|---|
Density | d | Density of steam at the condensation point |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.region_ph
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
SpecificEnthalpy | h | Specific enthalpy |
Integer | phase | Phase: 2 for two-phase, 1 for one phase, 0 if not known |
Integer | mode | Mode: 0 means check, otherwise assume region=mode |
| Type | Name | Description |
|---|---|---|
Integer | region | Region (valid values: 1,2,3,4,5) in IF97 |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.region_ps
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
SpecificEntropy | s | Specific entropy |
Integer | phase | Phase: 2 for two-phase, 1 for one phase, 0 if unknown |
Integer | mode | Mode: 0 means check, otherwise assume region=mode |
| Type | Name | Description |
|---|---|---|
Integer | region | Region (valid values: 1,2,3,4,5) in IF97 |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.region_pT
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
Temperature | T | Temperature (K) |
Integer | mode | Mode: 0 means check, otherwise assume region=mode |
| Type | Name | Description |
|---|---|---|
Integer | region | Region (valid values: 1,2,3,5) in IF97, region 4 is impossible! |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.region_dT
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Density | d | Density |
Temperature | T | Temperature (K) |
Integer | phase | Phase: 2 for two-phase, 1 for one phase, 0 if not known |
Integer | mode | Mode: 0 means check, otherwise assume region=mode |
| Type | Name | Description |
|---|---|---|
Integer | region | (valid values: 1,2,3,4,5) in IF97 |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.hvl_dp
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
IF97PhaseBoundaryProperties | bpro | Property record |
| Type | Name | Description |
|---|---|---|
Real | dh_dp | Derivative of specific enthalpy along the phase boundary |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dhl_dp
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
DerEnthalpyByPressure | dh_dp | Specific enthalpy derivative w.r.t. pressure |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.dhv_dp
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Pressure |
| Type | Name | Description |
|---|---|---|
DerEnthalpyByPressure | dh_dp | Specific enthalpy derivative w.r.t. pressure |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.drhovl_dp
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Saturation pressure |
IF97PhaseBoundaryProperties | bpro | Property record |
| Type | Name | Description |
|---|---|---|
Real | dd_dp | Derivative of density along the phase boundary |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.drhol_dp
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Saturation pressure |
| Type | Name | Description |
|---|---|---|
DerDensityByPressure | dd_dp | Derivative of density of water at the boiling point |
Function Modelica.Media.Water.IF97_Utilities.BaseIF97.Regions.drhov_dp
This icon indicates Modelica functions.
Extends from Modelica.Icons.Function (Icon for functions).
| Type | Name | Description |
|---|---|---|
Pressure | p | Saturation pressure |
| Type | Name | Description |
|---|---|---|
DerDensityByPressure | dd_dp | Derivative of density of water at the boiling point |