In September 1997, the International Association for the Properties of Water and Steam (IAPWS) adopted a new formulation for the thermodynamic properties of water and steam for industrial use. This new industrial standard is called "IAPWS Industrial Formulation for the Thermodynamic Properties of Water and Steam" (IAPWS-IF97). The formulation IAPWS-IF97 replaces the previous industrial standard IFC-67.
Based on this new formulation, a new steam table, titled "Properties of Water and Steam" by W. Wagner and A. Kruse, was published by the Springer-Verlag, Berlin - New-York - Tokyo in April 1998. This steam table, ref. [1] is bilingual (English / German) and contains a complete description of the equations of IAPWS-IF97. This reference is the authoritative source of information for this implementation. A mostly identical version has been published by the International Association for the Properties of Water and Steam (IAPWS) with permission granted to re-publish the information if credit is given to IAPWS. This document is distributed with this library as IF97.pdf. In addition, the equations published by IAPWS for the transport properties dynamic viscosity (standards document: visc.pdf) and thermal conductivity (standards document: thcond.pdf) and equations for the surface tension (standards document: surf.pdf) are also implemented in this library and included for reference.
The functions in BaseIF97.mo are low level functions which should only be used in those exceptions when the standard user level functions in Water.mo do not contain the wanted properties.
Based on IAPWS-IF97, Modelica functions are available for calculating the most common thermophysical properties (thermodynamic and transport properties). The implementation requires part of the common medium property infrastructure of the Modelica.Thermal.Properties library in the file Common.mo. There are a few extensions from the version of IF97 as documented in IF97.pdf in order to improve performance for dynamic simulations. Input variables for calculating the properties are only implemented for a limited number of variable pairs which make sense as dynamic states: (p,h), (p,T), (p,s) and (d,T).
1. Structure and Regions of IAPWS-IF97
The IAPWS Industrial Formulation 1997 consists of a set of equations for different regions which cover the following range of validity:
273,15 K < T < 1073,15 K | p < 100 MPa |
1073,15 K < T < 2273,15 K | p < 10 MPa |
Figure 1: Regions and equations of IAPWS-IF97
In addition to these basic equations, so-called backward
equations are provided for regions 1, 2, and 4 in form of
The complete description of the individual equations of the new industrial formulation IAPWS-IF97 is given in IF97.pdf. Comprehensive information on IAPWS-IF97 (requirements, concept, accuracy, consistency along region boundaries, and the increase of computing speed in comparison with IFC-67, etc.) can be taken from IF97.pdf or [2].
Common name |
Abbreviation |
Unit |
|
1 |
Pressure | p |
Pa |
2 |
Temperature | T |
K |
3 |
Density | d |
kg/m3 |
4 |
Specific volume | v |
m3/kg |
5 |
Specific enthalpy | h |
J/kg |
6 |
Specific entropy | s |
J/(kg K) |
7 |
Specific internal energy |
u |
J/kg |
8 |
Specific isobaric heat capacity | cp |
J/(kg K) |
9 |
Specific isochoric heat capacity | cv |
J/(kg K) |
10 |
Isentropic exponent, kappa |
kappa ( k) |
1 |
11 |
Speed of sound |
a |
m/s |
12 |
Dryness fraction |
x |
kg/kg |
13 |
Specific Helmholtz free energy, f = u - Ts | f |
J/kg |
14 |
Specific Gibbs free energy, g = h - Ts | g |
J/kg |
15 |
Isenthalpic exponent, |
theta (q) |
1 |
16 |
Isobaric volume expansion coefficient, alpha = v-1 (dv/dT)p | alpha (a) |
1/K |
17 |
Isochoric pressure coefficient, |
beta (b) |
1/K |
18 |
Isothermal compressibility, g |
gamma (g) |
1/Pa |
19 |
Dynamic viscosity | eta (h) |
Pa s |
20 |
Kinematic viscosity | nu (n) |
m2/s |
21 |
Thermal conductivity | lambda (l) |
W/(m K) |
22 |
Surface tension | sigma (s) |
N/m |
The properties 1-11 are calculated by default with the functions for dynamic simulation, 2 of these variables are the dynamic states and are the inputs to calculate all other properties. In addition to these properties of general interest, the entries to the thermodynamic Jacobian matrix which render the mass- and energy balances explicit in the input variables to the property calculation are also calculated. For an explanatory example using pressure and specific enthalpy as states, see the Examples sub-package.
The high-level calls to steam properties are grouped into records comprising both the properties of general interest and the entries to the thermodynamic Jacobian. If additional properties are needed the low level functions in BaseIF97 provide more choice.
Extends from Modelica.Icons.Library (Icon for library).
Name | Description |
---|---|
IterationData | constants for iterations internal to some functions |
data | constant IF97 data and region limits |
getTstar | get normalization temperature for region 1, 2 or 5 |
getpstar | get normalization pressure for region 1, 2 or 5 |
critical | critical point data |
triple | triple point data |
Regions | functions to find the current region for given pairs of input variables |
Basic | Base functions as described in IAWPS/IF97 |
IceBoundaries | the melting line and sublimation line curves from IAPWS |
Transport | transport properties for water according to IAPWS/IF97 |
Isentropic | functions for calculating the isentropic enthalpy from pressure p and specific entropy s |
Inverses | efficient inverses for selected pairs of variables |
ByRegion | simple explicit functions for one region only |
TwoPhase | steam properties in the two-phase rgion and on the phase boundaries |
extraDerivs_ph | function to calculate some extra thermophysical properties in regions 1, 2, 3 and 5 as f(p,h) |
extraDerivs_pT | function to calculate some extra thermophysical properties in regions 1, 2, 3 and 5 as f(p,T) |
record IterationData "constants for iterations internal to some functions" extends Modelica.Icons.Record; constant Integer IMAX=50 "maximum number of iterations for inverse functions"; constant Real DELP=1.0e-6 "maximum iteration error in pressure, Pa"; constant Real DELS=1.0e-8 "maximum iteration error in specific entropy, J/{kg.K}"; constant Real DELH=1.0e-8 "maximum iteration error in specific entthalpy, J/kg"; constant Real DELD=1.0e-8 "maximum iteration error in density, kg/m^3"; end IterationData;
Constants needed in the international steam properties IF97. SCRIT and HCRIT are calculated from Helmholtz function for region 3.
Extends from Modelica.Icons.Record (Icon for a record).
record data "constant IF97 data and region limits" extends Modelica.Icons.Record; constant SI.SpecificHeatCapacity RH2O=461.526 "specific gas constant of water vapour"; constant SI.MolarMass MH2O=0.01801528 "molar weight of water"; constant SI.Temperature TSTAR1=1386.0 "normalization temperature for region 1 IF97"; constant SI.Pressure PSTAR1=16.53e6 "normalization pressure for region 1 IF97"; constant SI.Temperature TSTAR2=540.0 "normalization temperature for region 2 IF97"; constant SI.Pressure PSTAR2=1.0e6 "normalization pressure for region 2 IF97"; constant SI.Temperature TSTAR5=1000.0 "normalization temperature for region 5 IF97"; constant SI.Pressure PSTAR5=1.0e6 "normalization pressure for region 5 IF97"; constant SI.SpecificEnthalpy HSTAR1=2.5e6 "normalization specific enthalpy for region 1 IF97"; constant Real IPSTAR=1.0e-6 "normalization pressure for inverse function in region 2 IF97"; constant Real IHSTAR=5.0e-7 "normalization specific enthalpy for inverse function in region 2 IF97"; constant SI.Temperature TLIMIT1=623.15 "temperature limit between regions 1 and 3"; constant SI.Temperature TLIMIT2=1073.15 "temperature limit between regions 2 and 5"; constant SI.Temperature TLIMIT5=2273.15 "upper temperature limit of 5"; constant SI.Pressure PLIMIT1=100.0e6 "upper pressure limit for regions 1, 2 and 3"; constant SI.Pressure PLIMIT4A=16.5292e6 "pressure limit between regions 1 and 2, important for for two-phase (region 4)"; constant SI.Pressure PLIMIT5=10.0e6 "upper limit of valid pressure in region 5"; constant SI.Pressure PCRIT=22064000.0 "the critical pressure"; constant SI.Temperature TCRIT=647.096 "the critical temperature"; constant SI.Density DCRIT=322.0 "the critical density"; constant SI.SpecificEntropy SCRIT=4412.02148223476 "the calculated specific entropy at the critical point"; constant SI.SpecificEnthalpy HCRIT=2087546.84511715 "the calculated specific enthalpy at the critical point"; constant Real[5] n=array(0.34805185628969e3, -0.11671859879975e1, 0.10192970039326e-2, 0.57254459862746e3, 0.13918839778870e2) "polynomial coefficients for boundary between regions 2 and 3";end data;
Type | Name | Default | Description |
---|---|---|---|
Integer | region | IF 97 region |
Type | Name | Description |
---|---|---|
Temperature | Tstar | normalization temperature [K] |
function getTstar "get normalization temperature for region 1, 2 or 5" extends Modelica.Icons.Function; input Integer region "IF 97 region"; output SI.Temperature Tstar "normalization temperature"; algorithm if region == 1 then Tstar := data.TSTAR1; elseif region == 2 then Tstar := data.TSTAR2; else Tstar := data.TSTAR5; end if; end getTstar;
Type | Name | Default | Description |
---|---|---|---|
Integer | region | IF 97 region |
Type | Name | Description |
---|---|---|
Pressure | pstar | normalization pressure [Pa] |
function getpstar "get normalization pressure for region 1, 2 or 5" extends Modelica.Icons.Function; input Integer region "IF 97 region"; output SI.Pressure pstar "normalization pressure"; algorithm if region == 1 then pstar := data.PSTAR1; elseif region == 2 then pstar := data.PSTAR2; else pstar := data.PSTAR5; end if; end getpstar;
Critical point data for IF97 steam properties. SCRIT and HCRIT are calculated from helmholtz function for region 3
Extends from Modelica.Icons.Record (Icon for a record).
record critical "critical point data" extends Modelica.Icons.Record; constant SI.Pressure PCRIT=22064000.0 "the critical pressure"; constant SI.Temperature TCRIT=647.096 "the critical temperature"; constant SI.Density DCRIT=322.0 "the critical density"; constant SI.SpecificEnthalpy HCRIT=2087546.84511715 "the calculated specific enthalpy at the critical point"; constant SI.SpecificEntropy SCRIT=4412.02148223476 "the calculated specific entropy at the critical point";end critical;
Vapour/liquid/ice triple point data for IF97 steam properties.
Extends from Modelica.Icons.Record (Icon for a record).
record triple "triple point data" extends Modelica.Icons.Record; constant SI.Temperature Ttriple=273.16 "the triple point temperature"; constant SI.Pressure ptriple=611.657 "the triple point temperature"; constant SI.Density dltriple=999.792520031617642 "the triple point liquid density"; constant SI.Density dvtriple=0.485457572477861372e-2 "the triple point vapour density";end triple;
Type | Name | Default | Description |
---|---|---|---|
Pressure | p | pressure [Pa] | |
SpecificEnthalpy | h | specific enthalpy [J/kg] | |
Integer | phase | 0 | phase: 2 for two-phase, 1 for one phase, 0 if unknown |
Type | Name | Description |
---|---|---|
ExtraDerivatives | dpro | thermodynamic property collection |
function extraDerivs_ph "function to calculate some extra thermophysical properties in regions 1, 2, 3 and 5 as f(p,h)" extends Modelica.Icons.Function; input SI.Pressure p "pressure"; input SI.SpecificEnthalpy h "specific enthalpy"; input Integer phase= 0 "phase: 2 for two-phase, 1 for one phase, 0 if unknown"; output Modelica.Media.Common.ExtraDerivatives dpro "thermodynamic property collection"; protected SI.Density d "density"; SI.Temperature T "temperature"; Integer region "IF97 region"; Integer error "error flag"; Modelica.Media.Common.HelmholtzDerivs f "dimensionless Helmholtz function and dervatives wrt delta and tau"; Modelica.Media.Common.GibbsDerivs g "dimensionless Gibbs funcion and dervatives wrt pi and tau"; algorithm assert(phase ==1, "extraDerivs_ph: properties are not implemented in 2 phase region"); region := Regions.region_ph(p=p,h= h,phase= phase); if region == 1 then T := Basic.tph1(p, h); g := Basic.g1(p, T); dpro := Modelica.Media.Common.gibbsToExtraDerivs(g); elseif region == 2 then T := Basic.tph2(p, h); g := Basic.g2(p, T); dpro := Modelica.Media.Common.gibbsToExtraDerivs(g); elseif region == 3 then (d,T,error) := Inverses.dtofph3(p=p,h= h,delp= 1.0e-7,delh= 1.0e-6); f := Basic.f3(d, T); dpro := Modelica.Media.Common.helmholtzToExtraDerivs(f); elseif region == 5 then // region assumed to be 5 (T,error) := Inverses.tofph5(p=p,h= h,reldh= 1.0e-7); g := Basic.g5(p, T); dpro := Modelica.Media.Common.gibbsToExtraDerivs(g); end if; end extraDerivs_ph;
Type | Name | Default | Description |
---|---|---|---|
Pressure | p | pressure [Pa] | |
Temperature | T | temperature [K] |
Type | Name | Description |
---|---|---|
ExtraDerivatives | dpro | thermodynamic property collection |
function extraDerivs_pT "function to calculate some extra thermophysical properties in regions 1, 2, 3 and 5 as f(p,T)" extends Modelica.Icons.Function; input SI.Pressure p "pressure"; input SI.Temperature T "temperature"; output Modelica.Media.Common.ExtraDerivatives dpro "thermodynamic property collection"; protected SI.Density d "density"; Integer region "IF97 region"; Integer error "error flag"; Modelica.Media.Common.HelmholtzDerivs f "dimensionless Helmholtz function and dervatives wrt delta and tau"; Modelica.Media.Common.GibbsDerivs g "dimensionless Gibbs funcion and dervatives wrt pi and tau"; algorithm region := Regions.region_pT(p=p,T= T); if region == 1 then g := Basic.g1(p, T); dpro := Modelica.Media.Common.gibbsToExtraDerivs(g); elseif region == 2 then g := Basic.g2(p, T); dpro := Modelica.Media.Common.gibbsToExtraDerivs(g); elseif region == 3 then (d,error) := Inverses.dofpt3(p=p,T= T,delp= 1.0e-7); f := Basic.f3(d, T); dpro := Modelica.Media.Common.helmholtzToExtraDerivs(f); elseif region == 5 then // region assumed to be 5 g := Basic.g5(p, T); dpro := Modelica.Media.Common.gibbsToExtraDerivs(g); end if; end extraDerivs_pT;