if97 {iapws}R Documentation

IAPWS-IF97 Equations for Regions 1, 2, 3 and 5

Description

Compute thermodynamic and transport properties of water and steam using the IAPWS industrial formulation 1997.

Usage

if97(what, p, t, h, state = NULL)

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.

h

a numeric vector giving the specific enthalpy values in kJ/kg.

state

NULL or a character vector giving the physical state. One of "liquid", "gas" or "supercritical". In case of NULL, the state is determined by the function if97_state().

Details

The available properties for what are:

A valid pair of p, t and h is needed: either (p, t) or (p, h).

Value

A numeric matrix of dimension c(n, length(what)) with n the maximum length of either p, t, h or state.

Note

Computing several properties in a single call may be more efficient than separately because most of the computation time is shared.

Author(s)

Jonathan Debove

References

International Association for the Properties of Water and Steam, IAPWS R7-97(2012), Revised Release on the IAPWS Industrial Formulation 1997 for the Thermodynamic Properties of Water and Steam.

International Association for the Properties of Water and Steam, IAPWS R12-08(2008), Release on the IAPWS Formulation 2008 for the Viscosity of Ordinary Water Substance.

International Association for the Properties of Water and Steam, IAPWS R15-11(2011), Release on the IAPWS Formulation 2011 for the Thermal Conductivity of Ordinary Water Substance.

Examples

what <- c("v", "h", "u", "s", "cp", "w")

# Region 1 Tab. 5
tab5 <- if97(what, t = c(300, 300, 500), p = c(3, 80, 3))
format(tab5, scientific = TRUE, digits = 9)

# Region 2 Tab. 15
tab15 <- if97(what, t = c(300, 700, 700), p = c(3.5e-3, 3.5e-3, 30))
format(tab15, scientific = TRUE, digits = 9)

# Region 2 metastable Tab. 18
tab18 <- if97(what, t = c(450, 440, 450), p = c(1, 1, 1.5), state = "gas")
format(tab18, scientific = TRUE, digits = 9)

# Region 3 Tab. 33
tab33 <- if97(what, t = c(650, 650, 750),
              p = c(0.255837018e2, 0.222930643e2, 0.783095639e2))
format(tab33, scientific = TRUE, digits = 9)

# Region 5 Tab. 42
tab42 <- if97(what, t = c(1500, 1500, 2000), p = c(0.5, 30, 30))
format(tab42, scientific = TRUE, digits = 9)



# Viscosity and thermal conductivity
what <- c("lambda", "eta")

# Region 1 Tab. 7
tab7 <- if97(what, p = c(20, 50), t = c(620, 620))
format(tab7, scientific = TRUE, digits = 9)

# Region 2 Tab. 8
tab8 <- if97(what, p = c(0.3, 50), t = c(650, 800))
format(tab8, scientific = TRUE, digits = 9)

## Region 3 Tab. 9
#tab9 <- if97_rhot(c("lambda", "rho", "cp", "cv", "eta"),
#      rho = c(0.3, 50), t = c(222, 322)),
#format(tab9, scientific = TRUE, digits = 9)



[Package iapws version 1.1 Index]