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 polymorphic transitions

To enable the calculation of thermodynamic properties of polymorphic transitions, higher-temperature polymorphs of minerals are listed in OBIGT with states ‘⁠cr2⁠’, ‘⁠cr3⁠’, etc. The standard thermodynamic properties of high-temperature polymorphs at 25 °C and 1 bar are apparent values that are consistent with given values of enthalpy of transition (where available) at the transition temperature (T_{tr}). See the FAQ question “How can minerals with polymorphic transitions be added to the database?” for details of the retrieval of standard thermodynamic properties of polymorphs used in OBIGT.

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.1.0 Index]