[CHNOSZ-commits] r681 - in pkg/CHNOSZ: . demo inst inst/extdata/OBIGT man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Sep 27 02:17:09 CEST 2021


Author: jedick
Date: 2021-09-27 02:17:09 +0200 (Mon, 27 Sep 2021)
New Revision: 681

Modified:
   pkg/CHNOSZ/DESCRIPTION
   pkg/CHNOSZ/demo/comproportionation.R
   pkg/CHNOSZ/inst/NEWS.Rd
   pkg/CHNOSZ/inst/TODO
   pkg/CHNOSZ/inst/extdata/OBIGT/DEW.csv
   pkg/CHNOSZ/man/affinity.Rd
   pkg/CHNOSZ/man/extdata.Rd
   pkg/CHNOSZ/man/thermo.Rd
Log:
Fix formula of CaCl2 in OBIGT/DEW.csv


Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION	2021-07-09 13:08:55 UTC (rev 680)
+++ pkg/CHNOSZ/DESCRIPTION	2021-09-27 00:17:09 UTC (rev 681)
@@ -1,6 +1,6 @@
-Date: 2021-07-09
+Date: 2021-09-27
 Package: CHNOSZ
-Version: 1.4.1-7
+Version: 1.4.1-8
 Title: Thermodynamic Calculations and Diagrams for Geochemistry
 Authors at R: c(
     person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"),

Modified: pkg/CHNOSZ/demo/comproportionation.R
===================================================================
--- pkg/CHNOSZ/demo/comproportionation.R	2021-07-09 13:08:55 UTC (rev 680)
+++ pkg/CHNOSZ/demo/comproportionation.R	2021-09-27 00:17:09 UTC (rev 681)
@@ -4,48 +4,48 @@
 # 20191112 jmd first version
 library(CHNOSZ)
 
-# set basis species and activities
+# Set basis species and activities
 basis(c("H2S", "SO4-2", "H2O", "H+"))
 basis("H2S", -3)
 basis("SO4-2", -2)
-# form native sulfur from sulfide and sulfate
+# Form native sulfur from sulfide and sulfate
 species("S")
 
-# if we calculate the affinity like this, we're stuck with H2S and SO4-2
+# If we calculate the affinity like this, we're stuck with H2S and SO4-2
 #a <- affinity(T = c(0, 100), pH = c(0, 7))
-# instead, use mosaic() to speciate H2S/HS- and SO4-2/HSO4-
+# Instead, use mosaic() to speciate H2S/HS- and SO4-2/HSO4-
 bases <- list(c("H2S", "HS-"), c("SO4-2", "HSO4-"))
 m <- mosaic(bases, T = c(0, 100), pH = c(0, 7))
 a <- m$A.species
 
-# get plot values
+# Get plot values
 T <- a$vals[[1]]
 pH <- a$vals[[2]]
-# the affinity as a function of T (rows) and pH (columns)
+# The affinity as a function of T (rows) and pH (columns)
 A <- a$values[[1]]
-# convert dimensionless affinity (A/2.303RT) to delta G (cal)
+# Convert dimensionless affinity (A/2.303RT) to delta G (cal)
 TK <- convert(T, "K")
 G.cal <- convert(A, "G", T = TK)
-# convert cal to kJ
+# Convert cal to kJ
 G.J <- convert(G.cal, "J")
 G.kJ <- G.J / 1000
-# multiply by 4
+# Multiply by 4
 # (formation reaction in CHNOSZ is for 1 S; reaction in paper has 4 S)
 G.kJ.4 <- G.kJ * 4
 
-# use subcrt() to write the balanced reaction (shown on the plot)
+# Use subcrt() to write the balanced reaction (shown on the plot)
 rxn <- subcrt("S", 1)$reaction
 rxn$coeff <- rxn$coeff * 4
 rxntext <- describe.reaction(rxn)
-# set units to get label for Delta G (kJ / mol)
+# Set units to get label for Delta G (kJ / mol)
 E.units("J")
 DGlab <- axis.label("DGr", prefix = "k")
 
-# calculate pK of H2S and HSO4-
+# Calculate pK of H2S and HSO4-
 pK_H2S <- subcrt(c("HS-", "H+", "H2S"), c(-1, -1, 1), T = T)$out$logK
 pK_HSO4 <- subcrt(c("SO4-2", "H+", "HSO4-"), c(-1, -1, 1), T = T)$out$logK
 
-# make contour plot
+# Make contour plot
 filled.contour(T, pH, G.kJ.4, xlab = axis.label("T"), ylab = axis.label("pH"),
   levels = -55:0,
   color.palette = ifelse(getRversion() >= "3.6.0", function(n) hcl.colors(n), topo.colors),
@@ -66,7 +66,7 @@
   }
 )
 
-# add legend text
+# Add legend text
 par(xpd = NA)
 text(87, 7.3, DGlab)
 par(xpd = FALSE)

Modified: pkg/CHNOSZ/inst/NEWS.Rd
===================================================================
--- pkg/CHNOSZ/inst/NEWS.Rd	2021-07-09 13:08:55 UTC (rev 680)
+++ pkg/CHNOSZ/inst/NEWS.Rd	2021-09-27 00:17:09 UTC (rev 681)
@@ -19,6 +19,8 @@
 
       \item Remove OldAA.csv (superseded thermodynamic parameters for amino
       acids). This file is now available in the JMDplots package.
+
+      \item Fix formula of CaCl2 in DEW.csv. Thanks to Grayson Boyer.
       
     }
   }

Modified: pkg/CHNOSZ/inst/TODO
===================================================================
--- pkg/CHNOSZ/inst/TODO	2021-07-09 13:08:55 UTC (rev 680)
+++ pkg/CHNOSZ/inst/TODO	2021-09-27 00:17:09 UTC (rev 681)
@@ -36,3 +36,11 @@
 [20210426]
 
 - anintro.Rmd: Make bold Fe-bearing mineral names in first mosaic stacking diagram
+
+[20210711]
+
+- Merge SK95.csv into SLOP98.csv
+
+[20210722]
+
+- Add pyrobitumen properties from Helgeson et al. (2009)

Modified: pkg/CHNOSZ/inst/extdata/OBIGT/DEW.csv
===================================================================
--- pkg/CHNOSZ/inst/extdata/OBIGT/DEW.csv	2021-07-09 13:08:55 UTC (rev 680)
+++ pkg/CHNOSZ/inst/extdata/OBIGT/DEW.csv	2021-09-27 00:17:09 UTC (rev 681)
@@ -23,7 +23,7 @@
 CaOH+,Ca(OH)(+),Ca(OH)+,aq,SSWS97,DEW17.3,2017-09-26,cal,-171300,-179600,6.7,1.4,1.9,2.1051,-2.2789,6.749,-2.6848,11.1292,-2.7494,0.4496,1
 Ca+2,Ca+2,Ca+2,aq,FDM+14,DEW19.5,2020-06-30,cal,-132120,-129800,-13.5,-7.51,-18.45,-0.245,-7.252,5,-2.48,9,-2.52,1.2366,2
 CaCl+,CaCl(+),CaCl+,aq,SSH97,DEW17.5,2017-09-26,cal,-163100,-168607,4.5,17.5,11.3,3.9392,-0.5326,5.2847,-2.757,20.7297,0.5302,0.4675,1
-CaCl2,CaCl(0),CaCl,aq,SSH97,DEW17.5,2017-09-26,cal,-194000,-211060,6,29.77,33.3,7.9694,3.3045,2.0673,-2.9156,23.2636,3.0296,-0.038,0
+CaCl2,CaCl2(0),CaCl2,aq,SSH97,DEW17.5,2017-09-26,cal,-194000,-211060,6,29.77,33.3,7.9694,3.3045,2.0673,-2.9156,23.2636,3.0296,-0.038,0
 CaCO3,CaCO3(0),CaCO3,aq,FDM+14,DEW17.03,2017-09-26,cal,-262750,-287390,0,14.01,21.53,6.66,2.05,3.12,-2.86,32.8,-0.18,2,0
 CaOH+,CaO,CaO,aq,HS19,DEW19.3,2020-06-30,cal,-152800,NA,16,12,5.5,2.5406,-1.8642,6.4013,-2.7019,12.2781,-0.5902,-0.1,0
 CaSO4,CaSO4(0),CaSO4,aq,SSWS97,DEW17.10,2017-09-26,cal,-312930,-345900,5,-25,4.7,2.415,-1.9839,6.5015,-2.697,-8.835,-8.1271,-0.038,0

Modified: pkg/CHNOSZ/man/affinity.Rd
===================================================================
--- pkg/CHNOSZ/man/affinity.Rd	2021-07-09 13:08:55 UTC (rev 680)
+++ pkg/CHNOSZ/man/affinity.Rd	2021-09-27 00:17:09 UTC (rev 681)
@@ -41,7 +41,7 @@
 Zero, one, or more leading arguments to the function identify which of the chemical activities of basis species, temperature, pressure and/or ionic strength to vary.
 The names of each of these arguments may be the formula of any of the basis species of the system, or \samp{T}, \samp{P}, \samp{pe}, \samp{pH}, \samp{Eh}, or \samp{IS} (but names may not be repeated).
 The names of charged basis species such as \samp{K+} and \samp{SO4-2} should be quoted when used as arguments.
-The value of each argument is of the form \code{c(min, max)} or \code{c(min, max, res)} where \code{min} and \code{max} refer to the minimimum and maximum values of variable identified by the name of the argument, and \code{res} is the resolution, or number of points along which to do the calculations; \code{res} is assigned a default value of 128 if it is missing.
+The value of each argument is of the form \code{c(min, max)} or \code{c(min, max, res)} where \code{min} and \code{max} refer to the minimimum and maximum values of variable identified by the name of the argument, and \code{res} is the resolution, or number of points along which to do the calculations; \code{res} is assigned a default value of 256 if it is missing.
 For any arguments that refer to basis species, the numerical values are the logarithms of activity (or fugacity for gases) of that basis species.
 
 If \samp{T}, \samp{P}, and/or \samp{IS} are not among the \code{var}s, their constant values can be supplied in \code{T}, \code{P}, or \code{IS} (in mol kg\eqn{^{-1}}{^-1}).

Modified: pkg/CHNOSZ/man/extdata.Rd
===================================================================
--- pkg/CHNOSZ/man/extdata.Rd	2021-07-09 13:08:55 UTC (rev 680)
+++ pkg/CHNOSZ/man/extdata.Rd	2021-09-27 00:17:09 UTC (rev 681)
@@ -37,7 +37,7 @@
     \item \code{RH95.csv} Heat capacity data for iron taken from Robie and Hemingway, 1995. Temperature in Kelvin is in the first column, heat capacity in J K\eqn{^{-1}}{^-1} mol\eqn{^{-1}}{^-1} in the second. See \code{\link{subcrt}} for an example that uses this file.
     \item \code{SOJSH.csv} Experimental equilibrium constants for the reaction NaCl(aq) = Na+ + Cl- as a function of temperature and pressure taken from Fig. 1 of Shock et al., 1992. See \code{demo("NaCl")} for an example that uses this file.
     \item \code{Cp.CH4.HW97.csv}, \code{V.CH4.HWM96.csv} Apparent molar heat capacities and volumes of CH4 in dilute aqueous solutions reported by Hnědkovský and Wood, 1997 and Hnědkovský et al., 1996. See \code{\link{EOSregress}} and the vignette \viglink{eos-regress} for examples that use these files.
-    \item \code{SC10_Rainbow.csv} Values of temperature (\degC, pH and logarithms of activity of \CO2, \H2, \NH4plus, \H2S and \CH4 for mixing of seawater and hydrothermal fluid at Rainbow field (Mid-Atlantic Ridge), taken from Shock and Canovas, 2010. See the vignette \viglink{anintro} for an example that uses this file.
+    \item \code{SC10_Rainbow.csv} Values of temperature (\degC), pH and logarithms of activity of \CO2, \H2, \NH4plus, \H2S and \CH4 for mixing of seawater and hydrothermal fluid at Rainbow field (Mid-Atlantic Ridge), taken from Shock and Canovas, 2010. See the vignette \viglink{anintro} for an example that uses this file.
     \item \code{SS98_Fig5a.csv}, \code{SS98_Fig5b.csv} Values of logarithm of fugacity of \O2 and pH as a function of temperature for mixing of seawater and hydrothermal fluid, digitized from Figs. 5a and b of Shock and Schulte, 1998. See the vignette \viglink{anintro} for an example that uses this file.
     \item \code{rubisco.csv} UniProt IDs for Rubisco, ranges of optimal growth temperature of organisms, domain and name of organisms, and URL of reference for growth temperature, from Dick, 2014. See the vignette \viglink{anintro} for an example that uses this file.
     \item \code{bluered.txt} Blue - light grey - red color palette, computed using \CRANpkg{colorspace}\code{::diverge_hcl(1000,} \code{c = 100, l = c(50, 90), power = 1)}. This is used by \code{\link{ZC.col}}.

Modified: pkg/CHNOSZ/man/thermo.Rd
===================================================================
--- pkg/CHNOSZ/man/thermo.Rd	2021-07-09 13:08:55 UTC (rev 680)
+++ pkg/CHNOSZ/man/thermo.Rd	2021-09-27 00:17:09 UTC (rev 681)
@@ -97,7 +97,6 @@
 
   \samp{OrganoBioGeoTherm} is the name of a GUI program to use SUPCRT in Windows, produced in Harold C. Helgeson's Laboratory of Theoretical Geochemistry and Biogeochemistry at the University of California, Berkeley.
   The \acronym{OBIGT} database was originally developed for that program, and was the original basis for the database in CHNOSZ.
-  There may be an additional meaning for the acronym: \dQuote{One BIG Table} of thermodynamic data.
 
   Each entry is referenced to one or two literature sources listed in \code{thermo()$refs}.
   Use \code{\link{thermo.refs}} to look up the citation information for the references.



More information about the CHNOSZ-commits mailing list