[CHNOSZ-commits] r847 - in pkg/CHNOSZ: . R demo inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Nov 17 07:49:08 CET 2024
Author: jedick
Date: 2024-11-17 07:49:08 +0100 (Sun, 17 Nov 2024)
New Revision: 847
Added:
pkg/CHNOSZ/demo/uranium.R
Modified:
pkg/CHNOSZ/DESCRIPTION
pkg/CHNOSZ/R/examples.R
pkg/CHNOSZ/demo/00Index
pkg/CHNOSZ/inst/NEWS.Rd
pkg/CHNOSZ/man/examples.Rd
Log:
Add demo/uranium.R
Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION 2024-11-08 01:16:28 UTC (rev 846)
+++ pkg/CHNOSZ/DESCRIPTION 2024-11-17 06:49:08 UTC (rev 847)
@@ -1,6 +1,6 @@
-Date: 2024-11-08
+Date: 2024-11-17
Package: CHNOSZ
-Version: 2.1.0-19
+Version: 2.1.0-20
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/R/examples.R
===================================================================
--- pkg/CHNOSZ/R/examples.R 2024-11-08 01:16:28 UTC (rev 846)
+++ pkg/CHNOSZ/R/examples.R 2024-11-17 06:49:08 UTC (rev 847)
@@ -34,7 +34,8 @@
"ORP", "ionize", "buffer", "protbuff", "glycinate",
"mosaic", "copper", "arsenic", "solubility", "gold", "contour", "sphalerite", "minsol",
"Shh", "saturation", "adenine", "DEW", "lambda", "potassium", "TCA", "aluminum",
- "AD", "comproportionation", "Pourbaix", "E_coli", "yttrium", "rank.affinity"), save.png = FALSE) {
+ "AD", "comproportionation", "Pourbaix", "E_coli", "yttrium", "rank.affinity", "uranium"),
+ save.png = FALSE) {
# Run one or more demos from CHNOSZ with ask = FALSE, and return the value of the last one
out <- NULL
for(i in 1:length(which)) {
Modified: pkg/CHNOSZ/demo/00Index
===================================================================
--- pkg/CHNOSZ/demo/00Index 2024-11-08 01:16:28 UTC (rev 846)
+++ pkg/CHNOSZ/demo/00Index 2024-11-17 06:49:08 UTC (rev 847)
@@ -33,3 +33,4 @@
E_coli Gibbs energy of biomass synthesis in E. coli
rank.affinity Affinity ranking for proteins in yeast nutrient limitation
yttrium logB.to.OBIGT fits at 800 and 1000 bar and Y speciation in NaCl solution at varying pH
+uranium Total (carbonate|sulfate)-pH diagrams for uranium
Added: pkg/CHNOSZ/demo/uranium.R
===================================================================
--- pkg/CHNOSZ/demo/uranium.R (rev 0)
+++ pkg/CHNOSZ/demo/uranium.R 2024-11-17 06:49:08 UTC (rev 847)
@@ -0,0 +1,45 @@
+# CHNOSZ/demo/uranium.R
+# Total (carbonate|sulfate)-pH diagrams for U, after Migdisov et al., 2024
+# 20241116 jmd
+library(CHNOSZ)
+
+# Conditions
+logm_U <- log10(3.16e-5)
+m_tot <- 1 # mol NaCl / kg H2O
+T <- 200
+P <- "Psat"
+pH_lim <- c(2, 10)
+CS_lim <- c(-4, 1)
+res <- 500
+
+# Calculations for NaCl
+NaCl <- NaCl(m_tot = m_tot, T = T, P = P)
+IS <- NaCl$IS
+logm_Na <- log10(NaCl$m_Na)
+logm_Cl <- log10(NaCl$m_Cl)
+
+# Total carbonate-pH
+iaq <- retrieve("U", ligands = c("C", "O", "H", "Cl", "Na"), state = "aq")
+icr <- retrieve("U", ligands = c("C", "O", "H", "Cl", "Na"), state = "cr")
+basis(c("UO2+2", "CO3-2", "Na+", "Cl-", "H+", "H2O", "O2"))
+basis(c("Na+", "Cl-"), c(logm_Na, logm_Cl))
+species(iaq, logm_U)
+species(icr, add = TRUE)
+bases <- c("CO3-2", "HCO3-", "CO2")
+m <- mosaic(bases, pH = c(pH_lim, res), "CO3-2" = c(CS_lim, res), T = T, P = P, IS = IS)
+diagram(m$A.species)
+diagram(m$A.bases, add = TRUE, col = 2, lty = 2, col.names = 2)
+title("Uranyl-carbonate complexation at 200 \u00b0C, after Migdisov et al., 2024", font.main = 1)
+
+# Total sulfate-pH
+iaq <- retrieve("U", ligands = c("S", "O", "H", "Cl", "Na"), state = "aq")
+icr <- retrieve("U", ligands = c("S", "O", "H", "Cl", "Na"), state = "cr")
+basis(c("UO2+2", "SO4-2", "Na+", "Cl-", "H+", "H2O", "O2"))
+basis(c("Na+", "Cl-"), c(logm_Na, logm_Cl))
+species(iaq, logm_U)
+species(icr, add = TRUE)
+bases <- c("SO4-2", "HSO4-", "HS-", "H2S")
+m <- mosaic(bases, pH = c(pH_lim, res), "SO4-2" = c(CS_lim, res), T = T, P = P, IS = IS)
+diagram(m$A.species)
+diagram(m$A.bases, add = TRUE, col = 2, lty = 2, col.names = 2)
+title("Uranyl-sulfate complexation at 200 \u00b0C, after Migdisov et al., 2024", font.main = 1)
Modified: pkg/CHNOSZ/inst/NEWS.Rd
===================================================================
--- pkg/CHNOSZ/inst/NEWS.Rd 2024-11-08 01:16:28 UTC (rev 846)
+++ pkg/CHNOSZ/inst/NEWS.Rd 2024-11-17 06:49:08 UTC (rev 847)
@@ -15,7 +15,7 @@
\newcommand{\Cp}{\ifelse{latex}{\eqn{C_P}}{\ifelse{html}{\out{<I>C<sub>P</sub></I>}}{Cp}}}
\newcommand{\DG0}{\ifelse{latex}{\eqn{{\Delta}G^{\circ}}}{\ifelse{html}{\out{Δ<I>G</I>°}}{ΔG°}}}
-\section{Changes in CHNOSZ version 2.1.0-19 (2024-11-08)}{
+\section{Changes in CHNOSZ version 2.1.0-20 (2024-11-17)}{
\itemize{
@@ -52,6 +52,10 @@
\item OBIGT: Fix sign of \emph{c} parameter for nesquehonite. Thanks to James Leong and Grayson Boyer.
+ \item Add \file{demo/uranium.R}, total (carbonate|sulfate)-pH diagrams
+ for uranium, after
+ \href{https://doi.org/10.1016/j.gca.2024.04.023}{Migdisov et al. (2024)}.
+
}
}
Modified: pkg/CHNOSZ/man/examples.Rd
===================================================================
--- pkg/CHNOSZ/man/examples.Rd 2024-11-08 01:16:28 UTC (rev 846)
+++ pkg/CHNOSZ/man/examples.Rd 2024-11-17 06:49:08 UTC (rev 847)
@@ -65,6 +65,7 @@
\item{E_coli}{Gibbs energy of biomass synthesis in \emph{E. coli} (LaRowe and Amend, 2016)}
\item{rank.affinity}{Affinity ranking for proteins in yeast nutrient limitation (data from Tai et al., 2005)}
\item{yttrium}{\code{\link{logB.to.OBIGT}} fits at 800 and 1000 bar and Y speciation in \code{\link{NaCl}} solution at varying pH (Guan et al., 2020)}
+ \item{uranium}{Total (carbonate|sulfate)-pH diagrams for uranium (Migdisov et al., 2024)}
}
For either function, if \code{save.png} is TRUE, the plots are saved in \code{\link{png}} files whose names begin with the names of the help topics or demos.
@@ -128,6 +129,8 @@
Manning, C. E., Shock, E. L. and Sverjensky, D. A. (2013) The chemistry of carbon in aqueous fluids at crustal and upper-mantle conditions: Experimental and theoretical constraints. \emph{Rev. Mineral. Geochem.} \bold{75}, 109--148. \doi{10.2138/rmg.2013.75.5}
+Migdisov, A., Bastrakov, E., Alcorn C., Reece M., Boukhalfa H., Caporuscio, F. A. and Jove-Colon, C. (2024) A spectroscopic study of the stability of uranyl-carbonate complexes at 25--150 \degC and re-visiting the data available for uranyl-chloride, uranyl-sulfate, and uranyl-hydroxide species. \emph{Geochim. Cosmochim. Acta}. \doi{10.1016/j.gca.2024.04.023}
+
Pourbaix, M. (1974) \emph{Atlas of Electrochemical Equilibria in Aqueous Solutions}, NACE, Houston, TX and CEBELCOR, Brussels. \url{https://www.worldcat.org/oclc/563921897}
Schulte, M. D. and Shock, E. L. (1995) Thermodynamics of Strecker synthesis in hydrothermal systems. \emph{Orig. Life Evol. Biosph.} \bold{25}, 161--173. \doi{10.1007/BF01581580}
More information about the CHNOSZ-commits
mailing list