WOLFRAM SYSTEM MODELER

# Basic

Base functions as described in IAWPS/IF97 # Package Contents Gibbs function for region 1: g(p,T) Gibbs function for region 2: g(p,T) Gibbs function for metastable part of region 2: g(p,T) Helmholtz function for region 3: f(d,T) Base function for region 5: g(p,T) Gibbs function for region 1, 2 or 5: g(p,T,region) Derivative of g w.r.t. pi and tau Derivative of g w.r.t. pi and tau Derivative of g w.r.t. pi and tau 1st derivatives of f w.r.t. delta and tau Inverse function for region 1: T(p,h) Inverse function for region 1: T(p,s) Reverse function for region 2: T(p,h) Reverse function for region 2a: T(p,s) Reverse function for region 2b: T(p,s) Reverse function for region 2c: T(p,s) Reverse function for region 2: T(p,s) Region 4 saturation temperature as a function of pressure Derivative of saturation temperature w.r.t. pressure Derivative function for tsat Region 4 saturation pressure as a function of temperature Derivative of pressure w.r.t. temperature along the saturation pressure curve Derivative function for psat Pressure as a function of enthalpy and entropy in region 1 Boundary between regions 2a and 2b Pressure as a function of enthalpy and entropy in subregion 2a Pressure as a function of enthalpy and entropy in subregion 2a Pressure as a function of enthalpy and entropy in subregion 2c Region 3 a b boundary for pressure/enthalpy Region 3 a: inverse function T(p,h) Region 3 b: inverse function T(p,h) Region 3 a: inverse function v(p,h) Region 3 b: inverse function v(p,h) Region 3 a: inverse function T(p,s) Region 3 b: inverse function T(p,s) Region 3 a: inverse function v(p,s) Region 3 b: inverse function v(p,s)

# Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

#### Package description

Package BaseIF97/Basic computes the fundamental functions for the 5 regions of the steam tables as described in the standards document IF97.pdf. The code of these functions has been generated using Mathematica and the add-on packages "Format" and "Optimize" to generate highly efficient, expression-optimized C-code from a symbolic representation of the thermodynamic functions. The C-code has than been transformed into Modelica code. An important feature of this optimization was to simultaneously optimize the functions and the directional derivatives because they share many common subexpressions.

#### Package contents

• Function g1 computes the dimensionless Gibbs function for region 1 and all derivatives up to order 2 w.r.t. pi and tau. Inputs: p and T.
• Function g2 computes the dimensionless Gibbs function for region 2 and all derivatives up to order 2 w.r.t. pi and tau. Inputs: p and T.
• Function g2metastable computes the dimensionless Gibbs function for metastable vapour (adjacent to region 2 but 2-phase at equilibrium) and all derivatives up to order 2 w.r.t. pi and tau. Inputs: p and T.
• Function f3 computes the dimensionless Helmholtz function for region 3 and all derivatives up to order 2 w.r.t. delta and tau. Inputs: d and T.
• Function g5computes the dimensionless Gibbs function for region 5 and all derivatives up to order 2 w.r.t. pi and tau. Inputs: p and T.
• Function tph1 computes the inverse function T(p,h) in region 1.
• Function tph2 computes the inverse function T(p,h) in region 2.
• Function tps2a computes the inverse function T(p,s) in region 2a.
• Function tps2b computes the inverse function T(p,s) in region 2b.
• Function tps2c computes the inverse function T(p,s) in region 2c.
• Function tps2 computes the inverse function T(p,s) in region 2.
• Function tsat computes the saturation temperature as a function of pressure.
• Function dtsatofp computes the derivative of the saturation temperature w.r.t. pressure as a function of pressure.
• Function tsat_der computes the Modelica derivative function of tsat.
• Function psat computes the saturation pressure as a function of temperature.
• Function dptofT computes the derivative of the saturation pressure w.r.t. temperature as a function of temperature.
• Function psat_der computes the Modelica derivative function of psat.

#### Version Info and Revision history

• First implemented: July, 2000 by Hubertus Tummescheit
Author: Hubertus Tummescheit,
Modelon AB
Ideon Science Park
SE-22370 Lund, Sweden
email: hubertus@modelon.se
• Initial version: July 2000

Equation from:

 The international Association for the Properties of Water and Steam
Vejle, Denmark
August 2003
Supplementary Release on Backward Equations for the Functions T(p,h), v(p,h) and T(p,s),
v(p,s) for Region 3 of the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of
Water and Steam

# Wolfram Language

In:= `SystemModel["Modelica.Media.Water.IF97_Utilities.BaseIF97.Basic"]`
Out:= 