Functions for Properties of Water and Steam
Utility functions for properties of water and steam.
1 2 3
character, property to calculate
numeric, temperature (K)
numeric, pressure (units of bar, except MPa for
character, state or phase of H2O
numeric, density (kg m^-3)
Auxiliary equations to the IAPWS-95 formulation (Wagner and Pruß, 2002) are provided in
property for this function can be one of P.sigma (saturation vapor pressure in MPa), dP.sigma.dT (derivative of saturation vapor pressure with respect to temperature), or rho.liquid or rho.vapor (density of liquid or vapor in kg m^-3).
rho.IAPWS95 implements a root-finding technique (using
uniroot) to determine the values of density for the stable phase of H2O at the given temperature and pressure.
state option is used internally in order to determine the stable phase at conditions close to saturation (0.9999*Psat <= P <= 1.00005*Psat, where Psat is the saturation pressure calculated by
Alternatively, the user can specify a
state of liquid or vapor to force the calculation of density for the corresponding phase, even if it is metastable (e.g. superheated water, supercooled steam; this option has no effect in the supercritical region).
state is set in calls by
water.IAPWS95 to the value in
thermo$opt$IAPWS.sat (default liquid) so that higher-level functions (
subcrt) take properties for that state along the saturation curve.
Diagnostic messages are printed if
trace is positive (it is also included in the call to
water.AW90 provides values of the static dielectric constant (
diel) calculated using equations given by Archer and Wang, 1990.
Archer, D. G. and Wang, P. M. (1990) The dielectric constant of water and Debye-Hückel limiting law slopes. J. Phys. Chem. Ref. Data 19, 371–411. http://www.nist.gov/data/PDFfiles/jpcrd383.pdf
Wagner, W. and Pruß, A. (2002) The IAPWS formulation 1995 for the thermodynamic properties of ordinary water substance for general and scientific use. J. Phys. Chem. Ref. Data 31, 387–535. http://dx.doi.org/10.1063/1.1461829
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
# calculate density of stable phase at 500 K, 500 bar rho <- rho.IAPWS95(T=500, P=500) # calculate pressure (= 50 MPa) at this density IAPWS95("P", T=500, rho=rho) # calculate dielectric constant water.AW90(T=500, rho=rho, P=50) # density along saturation curve T <- seq(273.15, 623.15, 25) WP02.auxiliary(T=T) # liquid from WP02 WP02.auxiliary("rho.vapor", T) # vapor from WP02 # WP02.auxiliary gives a close estimate of saturation pressure... T <- 445:455 P.sigma <- WP02.auxiliary("P.sigma", T) # ... but alternates between being just on the liquid or vapor side # (low rho: steam; high rho: water) rho.IAPWS95(T, convert(P.sigma, "bar")) # thermo$opt$IAPWS.sat allows for choosing liquid or vapor or "" thermo$opt$IAPWS.sat <<- "" # shows artifactual vapor-liquid transition water.IAPWS95("V", T, "Psat") # the calculated Psat, while not exact, should be close enough for most # geochemical calculations to select liquid or vapor thermo$opt$water <<- "IAPWS95" thermo$opt$IAPWS.sat <<- "vapor" V.vapor <- subcrt("water", T=convert(445:455, "C"))$out[]$V thermo$opt$IAPWS.sat <<- "liquid" # the default V.liquid <- subcrt("water", T=convert(445:455, "C"))$out[]$V stopifnot(all(V.vapor > V.liquid))
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.