[CHNOSZ-commits] r159 - in pkg/CHNOSZ: . R demo inst inst/extdata/thermo man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Feb 17 20:16:30 CET 2017
Author: jedick
Date: 2017-02-17 20:16:30 +0100 (Fri, 17 Feb 2017)
New Revision: 159
Modified:
pkg/CHNOSZ/DESCRIPTION
pkg/CHNOSZ/R/transfer.R
pkg/CHNOSZ/demo/activity_ratios.R
pkg/CHNOSZ/inst/NEWS
pkg/CHNOSZ/inst/extdata/thermo/OBIGT-2.csv
pkg/CHNOSZ/man/transfer.Rd
pkg/CHNOSZ/man/util.data.Rd
Log:
OBIGT-2.csv: name H4SiO4 as a pseudospecies
Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION 2017-02-17 13:49:45 UTC (rev 158)
+++ pkg/CHNOSZ/DESCRIPTION 2017-02-17 19:16:30 UTC (rev 159)
@@ -1,6 +1,6 @@
-Date: 2017-02-17
+Date: 2017-02-18
Package: CHNOSZ
-Version: 1.0.8-48
+Version: 1.0.8-49
Title: Chemical Thermodynamics and Activity Diagrams
Author: Jeffrey Dick
Maintainer: Jeffrey Dick <j3ffdick at gmail.com>
Modified: pkg/CHNOSZ/R/transfer.R
===================================================================
--- pkg/CHNOSZ/R/transfer.R 2017-02-17 13:49:45 UTC (rev 158)
+++ pkg/CHNOSZ/R/transfer.R 2017-02-17 19:16:30 UTC (rev 159)
@@ -809,7 +809,7 @@
basis(delete=TRUE)
# SLS89 use H4SiO4 instead of SiO2 - use the secondary database
add.obigt()
- basis(c('Al+3','H4SiO4','K+','H2O','H+','O2'))
+ basis(c('Al+3','pseudo-H4SiO4_25C','K+','H2O','H+','O2'))
# some of SLS89's initial conditions
basis(c('K+','H4SiO4'),c(-6,-6))
# the candidate species
@@ -818,7 +818,7 @@
# setup a diagram on which to plot a reaction path
basis('pH',0)
a <- affinity(H4SiO4=c(-6,-2),'K+'=c(-3,8))
- diagram(a)
+ diagram(a, ylab=ratlab("K+"))
# identify the basis species whose activities will
# be plotted by transfer()
plot <- c(2,3)
Modified: pkg/CHNOSZ/demo/activity_ratios.R
===================================================================
--- pkg/CHNOSZ/demo/activity_ratios.R 2017-02-17 13:49:45 UTC (rev 158)
+++ pkg/CHNOSZ/demo/activity_ratios.R 2017-02-17 19:16:30 UTC (rev 159)
@@ -4,20 +4,20 @@
par(mfrow = c(2, 2))
res <- 200
-fill <- "heat"
+fill <- "terrain"
## K2O-Al2O3-SiO2-H2O, 25 degree C, 1 bar
## Steinmann et al., 1994 (http://ccm.geoscienceworld.org/content/42/2/197)
## Garrels and Christ, p. 361 (http://www.worldcat.org/oclc/517586)
## https://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc/html/final-75.html
-# use add.obigt to get H4SiO4
+# use add.obigt to make H4SiO4 pseudospecies available as a basis species
add.obigt()
-basis(c("Al+3", "H4SiO4", "K+", "H2O", "H+", "O2"))
-species(c("gibbsite", "kaolinite", "pyrophyllite", "k-feldspar", "muscovite"))
-a <- affinity(H4SiO4 = c(-6, 0, res), `K+` = c(0, 8, res))
+basis(c("Al+3", "pseudo-H4SiO4_25C", "K+", "H2O", "H+", "O2"))
+species(c("gibbsite", "muscovite", "kaolinite", "pyrophyllite", "k-feldspar"))
+a <- affinity(H4SiO4 = c(-6, -2, res), `K+` = c(-3, 6, res))
diagram(a, ylab = ratlab("K+"), fill = fill)
title(main = syslab(c("K2O", "Al2O3", "SiO2", "H2O")))
-legend("topright", describe.property(c("T", "P"), c(25, 1)), bty = "n")
+legend("bottomleft", describe.property(c("T", "P"), c(25, 1)), bty = "n")
# reset database
data(thermo)
@@ -25,8 +25,8 @@
## Helgeson et al., 1969, p. 136 (http://www.worldcat.org/oclc/902423149)
## Bowers et al., 1984, p. 246 (http://www.worldcat.org/oclc/224591948)
basis(c("H2O", "Ca+2", "Mg+2", "SiO2", "O2", "H+"))
-species(c("quartz", "talc", "chrysotile", "forsterite", "monticellite",
- "merwinite", "wollastonite", "diopside", "tremolite"))
+species(c("quartz", "talc", "chrysotile", "forsterite", "tremolite",
+ "diopside", "wollastonite", "monticellite", "merwinite"))
# calculate the chemical affinities of formation reactions
a <- affinity("Mg+2" = c(4, 9, res), "Ca+2" = c(5, 14, res), T = 300, P = 1000)
diagram(a, xlab = ratlab("Mg+2"), ylab = ratlab("Ca+2"), fill = fill)
Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS 2017-02-17 13:49:45 UTC (rev 158)
+++ pkg/CHNOSZ/inst/NEWS 2017-02-17 19:16:30 UTC (rev 159)
@@ -1,4 +1,4 @@
-CHANGES IN CHNOSZ 1.0.8-48 (2017-02-17)
+CHANGES IN CHNOSZ 1.0.8-49 (2017-02-18)
---------------------------------------
DOCUMENTATION:
@@ -79,6 +79,9 @@
- extdata: Add fasta/rubisco.fasta and cpetc/*.csv files SS98_Fig5a,
SS98_Fig5b, PM90 (all used by anintro.Rmd).
+- OBIGT-2.csv: Make pseudospecies for H4SiO4: rename existing H4SiO4 to
+ pseudo-H4SiO4_highT, and add pseudo-H4SiO4_25C.
+
CLEANUP AND BUG FIXES:
- subcrt() returns `loggam` using the common logarithm; add
Modified: pkg/CHNOSZ/inst/extdata/thermo/OBIGT-2.csv
===================================================================
--- pkg/CHNOSZ/inst/extdata/thermo/OBIGT-2.csv 2017-02-17 13:49:45 UTC (rev 158)
+++ pkg/CHNOSZ/inst/extdata/thermo/OBIGT-2.csv 2017-02-17 19:16:30 UTC (rev 159)
@@ -229,7 +229,7 @@
YbCl2+,NA,YbCl2+,aq,MWW09,NA,03.Jul.10,-216360,NA,-19.22,-4.55,-0.6,1.9985,-2.9017,6.8906,-2.659,11.1191,-3.9614,0.8351,1
LuCl2+,NA,LuCl2+,aq,MWW09,NA,03.Jul.10,-222750,NA,-30.31,11.26,-1.23,1.9757,-2.9572,6.9124,-2.6567,21.9175,-0.7409,1.0031,1
Ti(OH)4,NA,Ti(OH)4,aq,Ste01,NA,31.Aug.06,-313690.248565966,-361331.022944551,5.23900573613767,48.4942638623327,40.6,7.36687380497132,10.210086042065,1.15296367112811,-3.20100382409178,51.2762906309751,-1.27652963671128,0.0149856596558317,0
-H4SiO4,NA,H4SiO4,aq,Ste01,NA,31.Aug.06,-312919.933078394,-348676.147227533,45.1003824091778,15.0095602294455,52.3,18.7299235181644,-21.2600382409178,18.6199808795411,-1.20004780114723,58.0305927342256,-20.789913957935,0.0869024856596558,0
+pseudo-H4SiO4_highT,NA,H4SiO4,aq,Ste01,NA,31.Aug.06,-312919.933078394,-348676.147227533,45.1003824091778,15.0095602294455,52.3,18.7299235181644,-21.2600382409178,18.6199808795411,-1.20004780114723,58.0305927342256,-20.789913957935,0.0869024856596558,0
arsenolite,NA,As2O3,cr,PGS+96,NA,25.Aug.06,-137640,-156930,25.67,23.15,51.12,20.9,17.73,-2.7,0,0,0,0,548
claudetite,NA,As2O3,cr,PGS+96,NA,25.Aug.06,-137730,-156600,27.09,23.19,47.26,23.86,10.74,-3.44,0,0,0,0,588
orpiment,NA,As2S3,cr,PGS+96,NA,25.Aug.06,-20550,-20700,39.1,27.53,70.5,22.73,13.82,0.605,0,0,0,0,580
@@ -289,3 +289,4 @@
starkeyite,NA,MgSO4*4H2O,cr,GM09,NA,24.Nov.15,-514770,-596580,62.12,NA,NA,0,0,0,0,0,0,0,400
hexahydrite,NA,MgSO4*6H2O,cr,GM09,NA,24.Nov.15,-629130,-737880,83.29,NA,NA,48.56,1.6,-10.68,0,0,0,0,400
epsomite,NA,MgSO4*7H2O,cr,GM09,NA,24.Nov.15,-686190,-809920,88.74,NA,NA,52.29,1.78,-11.67,0,0,0,0,400
+pseudo-H4SiO4_25C,NA,H4SiO4,aq,CHNOSZ,NA,17.Feb.17,-312565.4,-346408.5,51.42456,-40.096352,52.19983,NA,NA,NA,NA,NA,NA,NA,0
Modified: pkg/CHNOSZ/man/transfer.Rd
===================================================================
--- pkg/CHNOSZ/man/transfer.Rd 2017-02-17 13:49:45 UTC (rev 158)
+++ pkg/CHNOSZ/man/transfer.Rd 2017-02-17 19:16:30 UTC (rev 159)
@@ -71,9 +71,9 @@
\examples{\dontshow{data(thermo)}
## react potassium feldspar in a closed system
## after Steinmann et al., 1994 and Helgeson et al., 1969
-# load the secondary database to use H4SiO4
+# load the secondary database to use pseudo-H4SiO4 as a basis species
add.obigt()
-basis(c("Al+3", "H4SiO4", "K+", "H2O", "H+", "O2"), c(0, -6, -6, 0, 0, 0))
+basis(c("Al+3", "pseudo-H4SiO4_25C", "K+", "H2O", "H+", "O2"), c(0, -6, -6, 0, 0, 0))
species(c("k-feldspar", "muscovite", "pyrophyllite", "kaolinite", "gibbsite"))
a <- affinity(H4SiO4=c(-6, -2), "K+"=c(-3, 8))
diagram(a, fill="heat")
Modified: pkg/CHNOSZ/man/util.data.Rd
===================================================================
--- pkg/CHNOSZ/man/util.data.Rd 2017-02-17 13:49:45 UTC (rev 158)
+++ pkg/CHNOSZ/man/util.data.Rd 2017-02-17 19:16:30 UTC (rev 159)
@@ -49,6 +49,12 @@
\code{add.obigt} reads data from the specified \code{file} and adds it to \code{\link{thermo}$obigt}. Set \code{force} to TRUE to replace species that exist in the thermodynamic database (each unique combination of a name and a state in the database is considered to be a unique species). \code{force}, if not specified, reverts to TRUE if the \code{file} is left at its default. Given the default setting of \code{E.units}, the function does not perform any unit conversions. If \code{E.units} is set to \samp{J}, then the thermodynamic parameters are converted from units of Joules to calories, as used in the CHNOSZ database.
+ Notes on the secondary database added by \code{add.obigt} (OBIGT-2.csv):
+
+ \itemize{
+ \item pseudo-H4SiO4_25T and pseudo-H4SiO4-highT are approximate pseudospecies for H4SiO4. They are chosen to minimize the properties of the reaction H4SiO4 = SiO2 + 2H2O at two temperature conditions. The properties of the 25T species, calculated using \code{\link{subcrt}}, are valid only at 25 \eqn{^{\circ}}{°}C. The highT species, taken from Steffánson, 2001, is applicable near 300 \eqn{^{\circ}}{°}C (see Figure 3 of that paper). These pseudospecies can be used to make diagrams with H4SiO4 as a basis species, instead of SiO2(aq).
+ }
+
\code{mod.obigt} changes one or more of the properties of species or adds species to the thermodynamic database.
These changes are lost if you reload the database by calling \code{\link{data}(thermo)} or if you quit the \R session without saving it.
The name of the species to add or change must be supplied as the first argument of \code{...} or as a named argument (named \samp{name}).
@@ -90,7 +96,7 @@
}
\seealso{
- The default supplementary thermodynamic database for \code{add.obigt} (\code{\link{extdata}/thermo/OBIGT-2.csv}) is used in some of the example calculations in the help page for \code{\link{diagram}} and also in \code{\link{anim.TCA}}.
+ The secondary thermodynamic database for \code{add.obigt} (\code{\link{extdata}/thermo/OBIGT-2.csv}) is used in some of the example calculations in the help page for \code{\link{diagram}} and also in \code{\link{anim.TCA}}.
\code{\link{mod.buffer}} for updating the list of available buffers.
}
@@ -130,6 +136,8 @@
Richard, L. and Helgeson, H. C. (1998) Calculation of the thermodynamic properties at elevated temperatures and pressures of saturated and aromatic high molecular weight solid and liquid hydrocarbons in kerogen, bitumen, petroleum, and other organic matter of biogeochemical interest. \emph{Geochim. Cosmochim. Acta} \bold{62}, 3591--3636. \url{http://dx.doi.org/10.1016/S0016-7037(97)00345-1}
+ Stefánsson, Andri (2001) Dissolution of primary minerals of basalt in natural waters. I. Calculation of mineral solubilities from 0°C to 350°C \emph{Chem. Geol.} \bold{172}, 225--250. \url{http://dx.doi.org/10.1016/S0009-2541(00)00263-1}
+
}
More information about the CHNOSZ-commits
mailing list