thermo {CHNOSZ}R Documentation

Thermodynamic Database and System Settings

Description

Run reset() to reset all of the data used in CHNOSZ to default values. This includes the computational settings, thermodynamic database, and system settings (chemical species).

The system settings are changed using basis and species. To clear the system settings (the default, i.e. no species loaded), run basis(""); to clear only the formed species, run species(delete = TRUE)

The thermodynamic database is changed using add.OBIGT and mod.OBIGT. To restore the default database without altering the species settings, run OBIGT().

The computational settings are changed using water, P.units, T.units, E.units, and some other commands (e.g. mod.buffer).

All the data are stored in the thermo data object in an environment named CHNOSZ. thermo() is a convenience function to access or modify parts of this object, in particular some computational settings, for example, thermo("opt$ideal.H" = FALSE) (see nonideal).

The source data are provided with CHNOSZ as *.csv files in the extdata/thermo and extdata/OBIGT directories of the package. These files are used to build the thermo object, which is described below.

Usage

  reset()
  OBIGT(no.organics = FALSE)
  thermo(...)

Arguments

no.organics

logical, load the database without data files for organic species (NOTE: CH4 is listed as an “inorganic” species)?

...

list, one or more arguments whose names correspond to the setting to modify

Format

Note on phase transitions

In order to represent thermodynamic data for minerals with phase transitions, the higher-temperature phases of these minerals are represented as phase species that have states denoted by ‘⁠cr2⁠’, ‘⁠cr3⁠’, etc. The standard molar thermodynamic properties at 25 °C and 1 bar (T_r and P_r) of the ‘⁠cr2⁠’ phase species of minerals were generated by first calculating those of the ‘⁠cr⁠’ (lowest-T) phase species at the transition temperature (T_{tr}) and 1 bar then taking account of the volume and entropy of transition (the latter can be retrieved by combining the former with the Clausius-Clapeyron equation and values of (dP/dT) of transitions taken from the SUPCRT92 data file) to calculate the standard molar entropy of the ‘⁠cr2⁠’ phase species at T_{tr}, and taking account of the enthalpy of transition ({\Delta}H^{\circ}, taken from the SUPCRT92 data file) to calculate the standard molar enthalpy of the ‘⁠cr2⁠’ phase species at T_{tr}. The standard molar properties of the ‘⁠cr2⁠’ phase species at T_{tr} and 1 bar calculated in this manner were combined with the equations-of-state parameters of the species to generate values of the standard molar properties at 25 °C and 1 bar. This process was repeated as necessary to generate the standard molar properties of phase species represented by ‘⁠cr3⁠’ and ‘⁠cr4⁠’, referencing at each iteration the previously calculated values of the standard molar properties of the lower-temperature phase species (i.e., ‘⁠cr2⁠’ and ‘⁠cr3⁠’). A consequence of tabulating the standard molar thermodynamic properties of the phase species is that the values of (dP/dT) and {\Delta}H^{\circ} of phase transitions can be calculated using the equations of state and therefore do not need to be stored in the thermodynamic database. However, the transition temperatures (T_{tr}) generally can not be assessed by comparing the Gibbs energies of phase species; instead, they are tabulated in the database.

References

Cox, J. D., Wagman, D. D. and Medvedev, V. A., eds. (1989) CODATA Key Values for Thermodynamics. Hemisphere Publishing Corporation, New York, 271 p. https://www.worldcat.org/oclc/18559968

Garrels, R. M. and Christ, C. L. (1965) Solutions, Minerals, and Equilibria, Harper & Row, New York, 450 p. https://www.worldcat.org/oclc/517586

Thoenen, T., Hummel, W., Berner, U. and Curti, E. (2014) The PSI/Nagra Chemical Thermodynamic Database 12/07. Paul Scherrer Institut. https://www.psi.ch/en/les/database

Wagman, D. D., Evans, W. H., Parker, V. B., Schumm, R. H., Halow, I., Bailey, S. M., Churney, K. L. and Nuttall, R. L. (1982) The NBS tables of chemical thermodynamic properties. Selected values for inorganic and C1 and C2 organic substances in SI units. J. Phys. Chem. Ref. Data 11 (supp. 2), 1–392. https://srd.nist.gov/JPCRD/jpcrdS2Vol11.pdf

See Also

Other data files, including those supporting the examples and vignettes, are documented separately at extdata.

Examples

## Where are the data files in CHNOSZ?
system.file("extdata", package = "CHNOSZ")
# What files make up OBIGT?
# Note: file names with _aq, _cr, _gas, or _liq
# are used in the default database
dir(system.file("extdata/OBIGT", package = "CHNOSZ"))

## Exploring thermo()$OBIGT
# What physical states are present
unique(thermo()$OBIGT$state)
# Formulas of ten random species
n <- nrow(thermo()$OBIGT)
thermo()$OBIGT$formula[runif(10)*n]

## Adding an element
old <- thermo()$element
# Element symbol, state, source (can be anything),
# mass, entropy, and number in compound
Xprops <- data.frame(element = "X", state = "cr",
  source = "user", mass = 100, s = 100, n = 1)
new <- rbind(old, Xprops)
thermo(element = new)
# Now "X" is recognized as an element in other functions
mass("X10")
# Restore default settings to remove X
reset()

[Package CHNOSZ version 2.0.0 Index]