Learn R Programming

iapws (version 1.1)

iapws95_sat: IAPWS-95 Formulation in the Saturation Region

Description

Compute thermodynamic and transport properties of water and steam along the saturated line according to the IAPWS formulation 1995.

Usage

iapws95_sat(what, p, t)

Value

A numeric array of dimension c(n, length(what), 2L) with

n the length of either p or t. The last dimension indicate the physical state ("liquid" or "gas").

Arguments

what

a character vector listing the output properties. See Details for available properties.

t

a numeric vector giving the temperature values in K.

p

a numeric vector giving the pressure values in MPa.

Author

Jonathan Debove

Details

The available properties for what are:

  • "f": the specific free energy in kJ/kg.

  • "g": the specific Gibbs enthalpy in kJ/kg.

  • "u": the specific internal energy in kJ/kg.

  • "h": the specific enthalpy in kJ/kg.

  • "s": the specific entropy in kJ/K/kg.

  • "t": the temperature in K.

  • "p": the pressure in MPa.

  • "v": the specific volume in m\(^3\)/kg.

  • "rho": the mass density in kg/m\(^3\).

  • "cv": the specific isochoric heat capacity in kJ/K/kg.

  • "cp": the specific isobaric heat capacity in kJ/K/kg.

  • "alpha": the expansion coefficient in 1/K

  • "beta": the pressure coefficient in MPa/K.

  • "kappat": the isothermal compressibility in 1/MPa.

  • "w": the speed of sound in m/s.

  • "eta": the dynamic viscosity in \(\mu\)Pa.s.

  • "lambda": the thermal conductivity in mW/K/m.

Only one of t or p is needed. If both arguments are given, p is ignored.

References

International Association for the Properties of Water and Steam, IAPWS R6-95(2018), Revised Release on the IAPWS Formulation 1995 for the Thermodynamic Properties of Ordinary Water Substance for General and Scientific Use.

Examples

Run this code
# IAPWS-95 Tab. 8
tab <- iapws95_sat(c("p", "rho", "h", "s"), t = c(275, 450, 625))
format(tab, scientific = TRUE, digits = 9)
# \dontshow{
stopifnot(all.equal(tab[, "p", "gas", drop = FALSE],
          array(c(0.698451167e-3, 0.932203564e0, 0.169082693e2),
                c(3, 1, 1), dimnames = list(NULL, c("p"), c("gas"))),
          tolerance = 2e-9))
# }

Run the code above in your browser using DataLab