Learn R Programming

iapws (version 1.1)

ice06: Equation of State 2006 for Ice Ih

Description

Compute thermodynamic properties of ice Ih using the Equation of State 2006.

Usage

ice06(what, p, t)

Value

A numeric matrix of dimension c(n, length(what)) with n

the maximum length of either p or t.

Arguments

what

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

p

a numeric vector giving the pressure values in MPa.

t

a numeric vector giving the temperature values in K.

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.

References

International Association for the Properties of Water and Steam, IAPWS R10-06(2009), Revised Release on the Equation of State 2006 for H2O Ice Ih.

Examples

Run this code
tab <- ice06(c("g", "h", "f", "u", "s", "cp", "rho", "alpha", "beta", "kappat"),
              p = c(611.657e-6, .101325, 100), t = c(273.16, 273.152519, 100))
format(tab, scientific = TRUE, digits = 11)
# \dontshow{
stopifnot(all.equal(tab[, "f", drop = FALSE],
          matrix(c(-0.55446875e-4, -0.918701567e-2, -0.328489902347e3),
                 3, 1, dimnames = list(NULL, c("f"))), tolerance = 1e-8))
# }

Run the code above in your browser using DataLab