water(property = NULL, T = get("thermo")$opt$Tr, P = "Psat")
water.props(formulation = get("thermo")$opt$water)
water.SUPCRT92(property, T = 298.15, P = 1)
water.IAPWS95(property, T = 298.15, P = 1)
rho.IAPWS95(T = 298.15, P = 1)
water.AW90(T = 298.15, rho = 1000, P = 0.1)
water.AW90
), or Psat for vapor-liquid saturationwater
and water.SUPCRT92
a data frame the number of rows of which corresponds to the number of input temperature, pressure and/or density values.
water.AW90
returns a numeric vector with length corresponding to the number of temperature values.water
accepts two major computational alternatives.
The default option (i.e., thermo$opt$water
equal to SUPCRT92) is retrieve thermodynamic and electrostatic properties as a function of temperature and pressure using a FORTRAN subroutine taken from the SUPCRT92 software package (Johnson et al., 1992).
If thermo$opt$water
is set to IAPWS95, the thermodynamic properties are calculated using a (slower) implementation in Rcode of the IAPWS-95 formulation (Wagner and Pruss, 2002) and electrostatic properties are calculated using the equations of Archer and Wang, 1990.The allowed property
s for water
are one or more of those given below, depending on the computational option; availability is shown by an asterisk.
The names of properties in the arguments are not case sensitive. Note that some of the properties that can actually be calculated using the different formulations are not implemented here.
Except for rho
, the units are those used by Johnson and Norton, 1991.
A
Helmholtz energy cal mol$^{-1}$ * *
G
Gibbs energy cal mol$^{-1}$ * *
S
Entropy cal K$^{-1}$ mol$^{-1}$ * *
U
Internal energy cal mol$^{-1}$ * *
H
Enthalpy cal mol$^{-1}$ * *
Cv
Isochoric heat capacity cal K$^{-1}$ mol$^{-1}$ * *
Cp
Isobaric heat capacity cal K$^{-1}$ mol$^{-1}$ * *
Speed
Speed of sound cm s$^{-1}$ NA *
alpha
Coefficient of isobaric expansivity K$^{-1}$ NA *
beta
Coefficient of isothermal compressibility bar$^{-1}$ NA *
diel
Dielectric constant dimensionless NA *
visc
Dynamic viscosity g cm$^{-1}$ s$^{-1}$ NA *
tcond
Thermal conductivity cal cm$^{-1}$ s$^{-1}$ K$^{-1}$ NA *
tdiff
Thermal diffusivity cm$^2$ s$^{-1}$ NA *
Prndtl
Prandtl number dimensionless NA *
visck
Kinematic viscosity cm$^2$ s$^{-1}$ NA *
albe
Isochoric expansivity bar K$^{-1}$ NA *
-compressibility
ZBorn
Z Born function dimensionless NA *
YBorn
Y Born function K$^{-1}$ * *
QBorn
Q Born function bar$^{-1}$ * *
daldT
Isobaric temperature derivative K$^{-2}$ NA *
of expansibility
XBorn
X Born function K$^{-2}$ * *
NBorn
N Born function bar$^{-2}$ * NA
UBorn
U Born function bar$^{-1}$ K$^{-1}$ * NA
V
Volume cm$^3$ mol$^{-1}$ * *
rho
Density kg cm$^3$ * *
Psat
Saturation vapor pressure bar * *
E
Isobaric expansivity cm$^3$ K$^{-1}$ NA *
kT
Isothermal compressibility cm$^3$ bar$^{-1}$ NA *
de.dT
Temperature derivative K$^{-1}$ * NA
of dielectric constant
de.dP
Pressure derivative bar$^{-1}$ * NA
of dielectric constant
P
Pressure bar * NA
}
water.props
returns the names of the available properties listed in this table, reflecting the current setting of thermo$opt$water
.
water.SUPCRT92
interfaces to the FORTRAN subroutine taken from the SUPCRT92 package (H2O92D.F) for calculating properties of water.
These calculations are based on data and equations of Levelt-Sengers et al., 1983, Haar et al., 1984, and Johnson and Norton, 1991, among others (see Johnson et al., 1992).
A value of P
set to Psat refers to one bar below 100 $^{\circ}$C, otherwise to the vapor-liquid saturation pressure at temperatures below the critical point (Psat is not available at temperatures above the critical point).
water.SUPCRT92
provides a limited interface to the FORTRAN subroutine; some functions provided there are not made available here (e.g., using variable density instead of pressure, or calculating the properties of steam).
The properties of steam in CHNOSZ, as in SUPCRT92, are calculated using general equations for crystalline, gaseous and liquid species (cgl
).
The IAPWS-95 formulation also has provisions for computing the properties of steam, but these are currently not used by CHNOSZ.
water.IAPWS95
is a wrapper (a function of temperature and pressure) around IAPWS95
(a function of temperature and density), rho.IAPWS95
and water.AW90
.
rho.IAPWS95
implements a root-finding technique (using uniroot
) to determine the values of density for the given temperature and pressure.
(Note that the P property in water.IAPWS95
is calculated by first computing a density with rho.IAPWS95
for the given T
and P
, then calculating the P
given the T
and rho
.)
water.AW90
provides values of the static dielectric constant (diel
) calculated using equations given by Archer and Wang, 1990.
water.IAPWS95
contains routines for calculating the Born functions as finite-difference derivatives of the static dielectric constant with respect to temperature and pressure.
For compatibility with geochemical modeling conventions, the values of Gibbs energy, enthalpy and entropy output by IAPWS95
are converted by water.IAPWS95
to the triple point reference state adopted in SUPCRT92
(Johnson and Norton, 1991; Helgeson and Kirkham, 1974).
The stated temperature limits of validity of calculations in water.SUPCRT92
are from the greater of 0 $^{\circ}$C or the melting temperature at pressure, to 2250 $^{\circ}$C (Johnson et al., 1992).
Valid pressures are from the greater of zero bar or the melting pressure at temperature to 30000 bar (water.SUPCRT92
).
The present functions do not check these limits and will attempt calculations for any range of input parameters, but may return NA
for properties that fail to be calculated at given temperatures and pressures and/or produce warnings or even errors when problems are encountered.
Starting with version 0.9-9.4, a check for minimum pressure (in valTP function in H2O92D.f) has been bypassed so that properties of H2O can be calculated using water.SUPCRT92
at temperatures below the 0.01 $^{\circ}$C triple point.
A primary check is still enforced (Tbtm), giving a minimum valid temperature of 253.15 K.
Haar, L., Gallagher, J. S. and Kell, G. S. (1984) NBS/NRC Steam Tables. Hemisphere, Washington, D. C., 320 p.
Helgeson, H. C. and Kirkham, D. H. (1974) Theoretical prediction of the thermodynamic behavior of aqueous electrolytes at high pressures and temperatures. I. Summary of the thermodynamic/electrostatic properties of the solvent. Am. J. Sci. 274, 1089--1098.
Johnson, J. W. and Norton, D. (1991) Critical phenomena in hydrothermal systems: state, thermodynamic, electrostatic, and transport properties of H$_2$O in the critical region. Am. J. Sci. 291, 541--648.
Johnson, J. W., Oelkers, E. H. and Helgeson, H. C. (1992) SUPCRT92: A software package for calculating the standard molal thermodynamic properties of minerals, gases, aqueous species, and reactions from 1 to 5000 bar and 0 to 1000$^{\circ}$C. Comp. Geosci. 18, 899--947.
Levelt-Sengers, J. M. H., Kamgarparsi, B., Balfour, F. W. and Sengers, J. V. (1983) Thermodynamic properties of steam in the critical region. J. Phys. Chem. Ref. Data 12, 1--28.
Wagner, W. and Pruss, 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.
uniroot
is the root finder used in water
to back out values of the density (rho
) from those of T
and P
when the IAPWS option is set in thermo$opt$water
.
Equations of state for species other than water are coded in hkf
and cgl
.data(thermo)
## calculations along saturation curve
T <- seq(273.15, 623.15, 25)
# liquid density, from SUPCRT92
water("rho", T=T, P="Psat")
# values of the saturation pressure, Gibbs energy
water(c("Psat", "G"), T=T, P="Psat")
# derivatives of the dielectric constant (Born functions)
water(c("QBorn", "YBorn", "XBorn"), T=T, P="Psat")
# now at constant pressure
water(c("QBorn", "YBorn", "XBorn"), T=T, P=2000)
## comparing the formulations
T <- convert(c(25, 100, 200, 300), "K")
# use IAPWS-95 (experimental for now)
thermo$opt$water <<- "IAPWS95"
water(water.props(), T=T)
# use SUPCRT92 (the default)
thermo$opt$water <<- "SUPCRT92"
water(water.props(), T=T)
## functions of temperature, density
# calculate density 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)
## calculating Q Born function
# after Table 22 of Johnson and Norton, 1991
thermo$opt$water <<- "SUPCRT92"
T <- rep(c(375, 400, 425, 450, 475), each=5)
P <- rep(c(250, 300, 350, 400, 450), 5)
w <- water("QBorn", T=convert(T, "K"), P=P)
# the rest is to make a neat table
w <- as.data.frame(matrix(w[[1]], nrow=5))
colnames(w) <- T[1:5*5]
rownames(w) <- P[1:5]
print(w)
Run the code above in your browser using DataLab