From 7d05045dca69785ea2a39d208ddeb469577f0e45 Mon Sep 17 00:00:00 2001 From: Jeffrey Dick Date: Tue, 9 Apr 2024 01:14:36 +0000 Subject: [PATCH] Update FAQ.Rmd git-svn-id: svn://scm.r-forge.r-project.org/svnroot/chnosz/pkg/CHNOSZ@836 edb9625f-4e0d-4859-8d74-9fd3b1da38cb --- DESCRIPTION | 4 ++-- demo/solubility.R | 2 +- vignettes/FAQ.Rmd | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index d54abae..d7fcd62 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ -Date: 2024-04-01 +Date: 2024-04-09 Package: CHNOSZ -Version: 2.1.0-8 +Version: 2.1.0-9 Title: Thermodynamic Calculations and Diagrams for Geochemistry Authors@R: c( person("Jeffrey", "Dick", , "j3ffdick@gmail.com", role = c("aut", "cre"), diff --git a/demo/solubility.R b/demo/solubility.R index 586ea3c..399fae5 100644 --- a/demo/solubility.R +++ b/demo/solubility.R @@ -51,7 +51,7 @@ title(main = substitute("Solubility of"~what, list(what = expr.species("CO2")))) basis(c("CO2", "Ca+2", "H2O", "O2", "H+")) species("calcite") iaq <- info(c("CO2", "HCO3-", "CO3-2")) -# Change this to dissociate = 2 to reproduce straight lines in Fig. 4A of Manning et al., 2013 +# Optional: use dissociate = 2 to get straight lines like Fig. 4A of Manning et al., 2013 s <- solubility(iaq, pH = c(pH, res), T = T1, IS = IS, dissociate = TRUE) diagram(s, ylim = c(-10, 4), type = "loga.balance", lwd = 4, col = "green2") diagram(s, add = TRUE, dy = 1) diff --git a/vignettes/FAQ.Rmd b/vignettes/FAQ.Rmd index 032263f..8d58023 100644 --- a/vignettes/FAQ.Rmd +++ b/vignettes/FAQ.Rmd @@ -831,7 +831,7 @@ This moves the KMQ buffer closer to the value shown by @HC14, but the MC buffer ## Why are mineral stability boundaries curved on mosaic diagrams? -The reason they are curved has to do with mass balance of elements in different aqueous species. +The reason they are curved has to do with mass balance of elements in aqueous solution. For example, take two reactions between pyrite (FeS~2~) and pyrrhotite (FeS), one with H~2~S and the other with HS^-^: 1. FeS~2~ + H~2~O = FeS + 0.5 O~2~ + H~2~S @@ -840,9 +840,9 @@ For example, take two reactions between pyrite (FeS~2~) and pyrrhotite (FeS), on If a pH 4 solution at 150 °C has 0.001 mol/kg H~2~S, then raising the pH to 8 would give 0.001 mol/kg of HS^-^ and essentially no H~2~S. For the remainder of this discussion we will assume that mol/kg is equivalent to activity (i.e., that activity cofficients are unity). If we use the same value (0.001) for H~2~S and HS^-^ in reactions 1 and 2 (the *constant activity* constraint), then we will get straight lines on a `r logfO2`–pH diagram. -There is nothing inherently wrong with this, but it is inconsistent with a *constant sum* constraint of activities that is often attributed to these diagrams. +However, this is inconsistent with a *constant sum* constraint of activities that is sometimes attributed to these diagrams. -The *constant activity* constraint is compatible with the *constant sum* constraint only well inside the predomince field of a given aqueous species. +The *constant activity* constraint is compatible with the *constant sum* constraint only well inside the predominance field of a given aqueous species. The equivalence breaks down near the transitions between aqueous species. For instance, if the total activity of S is 0.001, then at the p*K*~a~ of H~2~S (about 6.5 at 150 °C), the activities of H~2~S and HS^-^ are equal to each other and by mass balance are both 0.0005. The position of the stability boundary should be calculated with these activities to satisfy the *constant sum* constraint. @@ -937,7 +937,7 @@ There are relatively few published `r logfO2`–pH diagrams with curved mine An example of one is in Figure 5 of @CBLM00. The code below makes a diagram for the minerals shown in that figure: -```{r Fe-S-O-C, message = FALSE, results = "hide", fig.width = 5, fig.height = 5, fig.align = "center", pngquant = pngquant, cache = TRUE} +```{r Fe-S-O-C, message = FALSE, results = "hide", fig.width = 5, fig.height = 5, out.width = "60%", fig.align = "center", pngquant = pngquant, cache = TRUE} basis(c("FeO", "SO4-2", "CO3-2", "H2O", "H+", "oxygen")) basis("SO4-2", -3) basis("CO3-2", -0.6)