packageIF97_Utilities

Low level and utility computation for high accuracy water properties according to the IAPWS/IF97 standard

Extends from Modelica.Icons.UtilitiesPackage (Icon for utility packages).

Information

Package description

This package provides high accuracy physical properties for water according to the IAPWS/IF97 standard. It has been part of the ThermoFluid Modelica library and been extended, reorganized and documented to become part of the Modelica Standard library.

An important feature that distinguishes this implementation of the IF97 steam property standard is that this implementation has been explicitly designed to work well in dynamic simulations. Computational performance has been of high importance. This means that there often exist several ways to get the same result from different functions if one of the functions is called often but can be optimized for that purpose.

The original documentation of the IAPWS/IF97 steam properties can freely be distributed with computer implementations, so for curious minds the complete standard documentation is provided with the Modelica properties library. The following documents are included (in directory Modelica/Resources/Documentation/Media/Water/IF97documentation):

  • IF97.pdf The standards document for the main part of the IF97.
  • Back3.pdf The backwards equations for region 3.
  • crits.pdf The critical point data.
  • meltsub.pdf The melting- and sublimation line formulation (in IF97_Utilities.BaseIF97.IceBoundaries)
  • surf.pdf The surface tension standard definition
  • thcond.pdf The thermal conductivity standard definition
  • visc.pdf The viscosity standard definition

Package contents

  • Package BaseIF97 contains the implementation of the IAPWS-IF97 as described in IF97.pdf. The explicit backwards equations for region 3 from Back3.pdf are implemented as initial values for an inverse iteration of the exact function in IF97 for the input pairs (p,h) and (p,s). The low-level functions in BaseIF97 are not needed for standard simulation usage, but can be useful for experts and some special purposes.
  • Function water_ph returns all properties needed for a dynamic control volume model and properties of general interest using pressure p and specific entropy enthalpy h as dynamic states in the record ThermoProperties_ph.
  • Function water_ps returns all properties needed for a dynamic control volume model and properties of general interest using pressure p and specific entropy s as dynamic states in the record ThermoProperties_ps.
  • Function water_dT returns all properties needed for a dynamic control volume model and properties of general interest using density d and temperature T as dynamic states in the record ThermoProperties_dT.
  • Function water_pT returns all properties needed for a dynamic control volume model and properties of general interest using pressure p and temperature T as dynamic states in the record ThermoProperties_pT. Due to the coupling of pressure and temperature in the two-phase region, this model can obviously only be used for one-phase models or models treating both phases independently.
  • Function hl_p computes the liquid specific enthalpy as a function of pressure. For overcritical pressures, the critical specific enthalpy is returned
  • Function hv_p computes the vapour specific enthalpy as a function of pressure. For overcritical pressures, the critical specific enthalpy is returned
  • Function sl_p computes the liquid specific entropy as a function of pressure. For overcritical pressures, the critical specific entropy is returned
  • Function sv_p computes the vapour specific entropy as a function of pressure. For overcritical pressures, the critical specific entropy is returned
  • Function rhol_T computes the liquid density as a function of temperature. For overcritical temperatures, the critical density is returned
  • Function rhol_T computes the vapour density as a function of temperature. For overcritical temperatures, the critical density is returned
  • Function dynamicViscosity computes the dynamic viscosity as a function of density and temperature.
  • Function thermalConductivity computes the thermal conductivity as a function of density, temperature and pressure. Important note: Obviously only two of the three inputs are really needed, but using three inputs speeds up the computation and the three variables are known in most models anyways. The inputs d,T and p have to be consistent.
  • Function surfaceTension computes the surface tension between vapour and liquid water as a function of temperature.
  • Function isentropicEnthalpy computes the specific enthalpy h(p,s,phase) in all regions. The phase input is needed due to discontinuous derivatives at the phase boundary.
  • Function dynamicIsentropicEnthalpy computes the specific enthalpy h(p,s,,dguess,Tguess,phase) in all regions. The phase input is needed due to discontinuous derivatives at the phase boundary. Tguess and dguess are initial guess values for the density and temperature consistent with p and s. This function should be preferred in dynamic simulations where good guesses are often available.

Version Info and Revision history

  • First implemented: July, 2000 by Hubertus Tummescheit for the ThermoFluid Library with help from Jonas Eborn and Falko Jens Wagner
  • Code reorganization, enhanced documentation, additional functions: December, 2002 by Hubertus Tummescheit and moved to Modelica properties library.
Author: Hubertus Tummescheit, previously at
Modelon AB
Ideon Science Park
SE-22370 Lund, Sweden

Contents

NameDescription
BaseIF97Modelica Physical Property Model: the new industrial formulation IAPWS-IF97
iter
waterBaseProp_phIntermediate property record for water
waterBaseProp_psIntermediate property record for water
rho_props_psDensity as function of pressure and specific entropy
rho_psDensity as function of pressure and specific entropy
T_props_psTemperature as function of pressure and specific entropy
T_psTemperature as function of pressure and specific entropy
h_props_psSpecific enthalpy as function or pressure and temperature
h_psSpecific enthalpy as function or pressure and temperature
phase_psPhase as a function of pressure and specific entropy
phase_phPhase as a function of pressure and specific enthalpy
phase_dTPhase as a function of pressure and temperature
rho_props_phDensity as function of pressure and specific enthalpy
rho_phDensity as function of pressure and specific enthalpy
rho_ph_derDerivative function of rho_ph
T_props_phTemperature as function of pressure and specific enthalpy
T_phTemperature as function of pressure and specific enthalpy
T_ph_derDerivative function of T_ph
s_props_phSpecific entropy as function of pressure and specific enthalpy
s_phSpecific entropy as function of pressure and specific enthalpy
s_ph_derSpecific entropy as function of pressure and specific enthalpy
cv_props_phSpecific heat capacity at constant volume as function of pressure and specific enthalpy
cv_phSpecific heat capacity at constant volume as function of pressure and specific enthalpy
regionAssertRealAssert function for inlining
cp_props_phSpecific heat capacity at constant pressure as function of pressure and specific enthalpy
cp_phSpecific heat capacity at constant pressure as function of pressure and specific enthalpy
beta_props_phIsobaric expansion coefficient as function of pressure and specific enthalpy
beta_phIsobaric expansion coefficient as function of pressure and specific enthalpy
kappa_props_phIsothermal compressibility factor as function of pressure and specific enthalpy
kappa_phIsothermal compressibility factor as function of pressure and specific enthalpy
velocityOfSound_props_phSpeed of sound as function of pressure and specific enthalpy
velocityOfSound_ph
isentropicExponent_props_phIsentropic exponent as function of pressure and specific enthalpy
isentropicExponent_phIsentropic exponent as function of pressure and specific enthalpy
ddph_propsDensity derivative by pressure
ddphDensity derivative by pressure
ddhp_propsDensity derivative by specific enthalpy
ddhpDensity derivative by specific enthalpy
waterBaseProp_pTIntermediate property record for water (p and T preferred states)
rho_props_pTDensity as function or pressure and temperature
rho_pTDensity as function or pressure and temperature
h_props_pTSpecific enthalpy as function or pressure and temperature
h_pTSpecific enthalpy as function or pressure and temperature
h_pT_derDerivative function of h_pT
rho_pT_derDerivative function of rho_pT
s_props_pTSpecific entropy as function of pressure and temperature
s_pTTemperature as function of pressure and temperature
cv_props_pTSpecific heat capacity at constant volume as function of pressure and temperature
cv_pTSpecific heat capacity at constant volume as function of pressure and temperature
cp_props_pTSpecific heat capacity at constant pressure as function of pressure and temperature
cp_pTSpecific heat capacity at constant pressure as function of pressure and temperature
beta_props_pTIsobaric expansion coefficient as function of pressure and temperature
beta_pTIsobaric expansion coefficient as function of pressure and temperature
kappa_props_pTIsothermal compressibility factor as function of pressure and temperature
kappa_pTIsothermal compressibility factor as function of pressure and temperature
velocityOfSound_props_pTSpeed of sound as function of pressure and temperature
velocityOfSound_pTSpeed of sound as function of pressure and temperature
isentropicExponent_props_pTIsentropic exponent as function of pressure and temperature
isentropicExponent_pTIsentropic exponent as function of pressure and temperature
waterBaseProp_dTIntermediate property record for water (d and T preferred states)
h_props_dTSpecific enthalpy as function of density and temperature
h_dTSpecific enthalpy as function of density and temperature
h_dT_derDerivative function of h_dT
p_props_dTPressure as function of density and temperature
p_dTPressure as function of density and temperature
p_dT_derDerivative function of p_dT
s_props_dTSpecific entropy as function of density and temperature
s_dTTemperature as function of density and temperature
cv_props_dTSpecific heat capacity at constant volume as function of density and temperature
cv_dTSpecific heat capacity at constant volume as function of density and temperature
cp_props_dTSpecific heat capacity at constant pressure as function of density and temperature
cp_dTSpecific heat capacity at constant pressure as function of density and temperature
beta_props_dTIsobaric expansion coefficient as function of density and temperature
beta_dTIsobaric expansion coefficient as function of density and temperature
kappa_props_dTIsothermal compressibility factor as function of density and temperature
kappa_dTIsothermal compressibility factor as function of density and temperature
velocityOfSound_props_dTSpeed of sound as function of density and temperature
velocityOfSound_dTSpeed of sound as function of density and temperature
isentropicExponent_props_dTIsentropic exponent as function of density and temperature
isentropicExponent_dTIsentropic exponent as function of density and temperature
ThermoFluidSpecialprotected
hl_pCompute the saturated liquid specific h(p)
hv_pCompute the saturated vapour specific h(p)
sl_pCompute the saturated liquid specific s(p)
sv_pCompute the saturated vapour specific s(p)
rhol_TCompute the saturated liquid d(T)
rhov_TCompute the saturated vapour d(T)
rhol_pCompute the saturated liquid d(p)
rhov_pCompute the saturated vapour d(p)
dynamicViscosityCompute eta(d,T) in the one-phase region
thermalConductivityCompute lambda(d,T,p) in the one-phase region
surfaceTensionCompute sigma(T) at saturation T
isentropicEnthalpyIsentropic specific enthalpy from p,s (preferably use dynamicIsentropicEnthalpy in dynamic simulation!)
isentropicEnthalpy_props
isentropicEnthalpy_derDerivative of isentropic specific enthalpy from p,s
dynamicIsentropicEnthalpyIsentropic specific enthalpy from p,s and good guesses of d and T

Revisions

Intermediate release notes during development

Currently the Events/noEvents switch is only implemented for p-h states. Only after testing that implementation, it will be extended to dT.