Skip to content

Commit

Permalink
Update FAQ.Rmd
Browse files Browse the repository at this point in the history
git-svn-id: svn://scm.r-forge.r-project.org/svnroot/chnosz/pkg/CHNOSZ@836 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
  • Loading branch information
jedick committed Apr 9, 2024
1 parent 6360579 commit 7d05045
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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", , "[email protected]", role = c("aut", "cre"),
Expand Down
2 changes: 1 addition & 1 deletion demo/solubility.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions vignettes/FAQ.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -840,9 +840,9 @@ For example, take two reactions between pyrite (FeS~2~) and pyrrhotite (FeS), on
If a pH 4 solution at 150 &deg;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`&ndash;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 &deg;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.
Expand Down Expand Up @@ -937,7 +937,7 @@ There are relatively few published `r logfO2`&ndash;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)
Expand Down

0 comments on commit 7d05045

Please sign in to comment.