Skip to content

Commit

Permalink
Add FAQ: How to I plot mineral buffers for pH?
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@814 edb9625f-4e0d-4859-8d74-9fd3b1da38cb
  • Loading branch information
jedick committed Nov 28, 2023
1 parent 4b5dd3c commit 253c7e3
Show file tree
Hide file tree
Showing 5 changed files with 122 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: 2023-11-15
Date: 2023-11-28
Package: CHNOSZ
Version: 2.0.0-33
Version: 2.0.0-34
Title: Thermodynamic Calculations and Diagrams for Geochemistry
Authors@R: c(
person("Jeffrey", "Dick", , "[email protected]", role = c("aut", "cre"),
Expand Down
83 changes: 80 additions & 3 deletions vignettes/FAQ.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ H2O <- "H<sub>2</sub>O"
S3minus <- "S<sub>3</sub><sup>-</sup>"
H2S <- "H<sub>2</sub>S"
SO4__ <- "SO<sub>4</sub><sup>-2</sup>"
Kplus <- "K<sup>+</sup>"
Naplus <- "Na<sup>+</sup>"
Clminus <- "Cl<sup>-</sup>"
H2 <- "H<sub>2</sub>"
```

This vignette was compiled on `r Sys.Date()` with CHNOSZ version `r sessionInfo()$otherPkgs$CHNOSZ$Version`.
Expand Down Expand Up @@ -529,9 +533,9 @@ diagram(e)
mod.buffer("NNO", c("nickel", "bunsenite"), state = "cr", logact = 0)
for(buffer in c("HM", "QFM", "NNO")) {
basis("O2", buffer)
logfO2 <- affinity(return.buffer = TRUE, T = T, P = P)$O2
abline(h = logfO2, lty = 3, col = 2)
text(8.5, logfO2, buffer, adj = c(0, 0), col = 2, cex = 0.9)
logfO2_ <- affinity(return.buffer = TRUE, T = T, P = P)$O2
abline(h = logfO2_, lty = 3, col = 2)
text(8.5, logfO2_, buffer, adj = c(0, 0), col = 2, cex = 0.9)
}
## BLOCK 5
Expand Down Expand Up @@ -745,4 +749,77 @@ In previous versions of CHNOSZ, values of Δ*G*° above the *C~p~* equation limi

*Answered on 2023-11-15.*

## How do I plot mineral buffers for pH?

Unlike mineral redox buffers, the K-feldspar&ndash;muscovite&ndash;quartz (KMQ) and muscovite&ndash;kaolinite (MC) buffers for pH are known as "sliding scale" buffers because they do not determine pH but rather the activity ratio of `r Kplus` to `r Hplus` [@HA05].
To add these buffers to a `r logfO2`&ndash;pH diagram in CHNOSZ, choose basis species that include Al<sup>+3</sup> (the least mobile element, which the reactions are balanced on), quartz (this is needed for the KMQ buffer), the mobile ions `r Kplus` and `r Hplus`, and the remaining elements in `r H2O` and `r O2` (`oxygen` denotes the gas in OBIGT).
The formation reactions for these minerals don't involve `r O2`, but it is required so that the number of basis species equals the number of elements plus one for charge.

```{r KMQ_basis_species, message = FALSE}
basis(c("Al+3", "quartz", "K+", "H+", "H2O", "oxygen"))
species(c("kaolinite", "muscovite", "K-feldspar"))
```

We could go right ahead and make a `r logfO2`&ndash;pH diagram, but the implied assumption would be that the `r Kplus` activity is unity, which may not be valid.
Instead, we can obtain an independent estimate for `r Kplus` activity based on 1) the activity ratio of `r Naplus` to `r Kplus` for the reaction between albite and K-feldspar and 2) charge balance among `r Naplus`, `r Kplus`, and `r Clminus` for a given activity of the latter [@HC14].
Using the variables defined below, those conditions are expressed as `K_AK = m_Na / m_K` and `m_Na + m_K = m_Cl`, which combine to give `m_K = m_Cl / (K_AK + 1)`.
The reason for writing the equations with molality instead of activity is that ionic strength (`IS`) is provided in the arguments to `subcrt()`, so the function returns a value of `r logK` adjusted for ionic strength.
Furthermore, it is assumed that this is a chloride-dominated solution, so ionic strength is taken to be equal to the molality of `r Clminus`.

```{r KMQ_m_K, message = FALSE}
# Define temperature, pressure, and molality of Cl- (==IS)
T <- 150
P <- 500
IS <- m_Cl <- 1
# Calculate equilibrium constant for Ab-Kfs reaction, corrected for ionic strength
logK_AK <- subcrt(c("albite", "K+", "K-feldspar", "Na+"), c(-1, -1, 1, 1),
T = T, P = P, IS = IS)$out$logK
K_AK <- 10 ^ logK_AK
# Calculate molality of K+
(m_K <- m_Cl / (K_AK + 1))
```

This calculation gives a molality of `r Kplus` that is lower than unity and accordingly makes the buffers less acidic [@HC14].
Now we can apply the calculated molality of `r Kplus` to the basis species and add the buffer lines to the diagram.
Note the `IS` argument is also used for `affinity()` so that activities are replaced by molalities (that is, affinity is calculated with standard Gibbs energies adjusted for ionic strength; this has the same effect as calculating activity coefficients).
```{r KMQ_diagram, eval = FALSE, echo = 2:9}
par(mfrow = c(1, 2))
basis("K+", log10(m_K))
a <- affinity(pH = c(2, 10), O2 = c(-55, -38), T = T, P = P, IS = IS)
diagram(a, srt = 90)
dTP <- as.expression(c(lT(T), lP(P)))
legend("topleft", legend = dTP, bty = "n", inset = c(-0.05, 0), cex = 0.9)
legend("topright", c("Unit molality of Cl-", "Quartz saturation"), bty = "n", cex = 0.9)
title("Mineral data from Berman (1988)\nand Sverjensky et al. (1991) (OBIGT default)",
font.main = 1, cex.main = 0.9)
add.OBIGT("SUPCRT92")
a <- affinity(pH = c(2, 10), O2 = c(-55, -38), T = T, P = P, IS = IS)
diagram(a, srt = 90)
title("Mineral data from Helgeson et al. (1978)\n(as used in SUPCRT92)",
font.main = 1, cex.main = 0.9)
OBIGT()
```
```{r KMQ_diagram, message = FALSE, fig.width = 8, fig.height = 4, results = "hide", echo = FALSE}
```

In this diagram, the gray area is below the reducing stability limit of water (i.e., where the equilibrium fugacity of `r H2` exceeds unity).
The diagram in Fig. 4 of @HC14 shows lines at somewhat higher pH; ca. 5 and 6 for the two buffers.
There are several possible reasons for the differences:

1. We used different thermodynamic data for the minerals;
2. Activity coefficients either were not calculated or were calculated differently by @HC14 (however, removing `IS` from the code moves the lines to lower rather than higher pH); or
3. We calculated `r Kplus` molality incorrectly for the MC buffer [this represents "clay-rich but feldspar-free sediments", but we used the feldspathic Ab&ndash;Kfs reaction becauase no other reaction was given by @HC14].

Addressing only the first point, note that the parameters for these minerals in the default OBIGT database come from @Ber88 and @SHD91.
```{r KMQ_refs, message = FALSE}
thermo.refs(species()$ispecies)
```

If we use the thermodynamic parameters for minerals from @HDNB78, we get the lines shown in the second plot above, representing a larger stability field for muscovite.

```{r KMQ_diagram, eval = FALSE, echo = 10:14}
```

*Answered on 2023-11-28.*

## References
4 changes: 2 additions & 2 deletions vignettes/elementa.csl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<category citation-format="author-date"/>
<category field="science"/>
<eissn>2325-1026</eissn>
<summary>Based on The Council of Science Editors style, Name-Year system: author-date in text, sorted in alphabetical order by author. Modified by Jeffrey Dick on 2020-06-29 to change disambiguation style and on 2023-11-17 to turn off sorting in citations.</summary>
<summary>Based on The Council of Science Editors style, Name-Year system: author-date in text, sorted in alphabetical order by author. Modified by Jeffrey Dick on 2020-06-29 to change disambiguation style, 2023-11-17 to turn off sorting in citations, and 2023-11-28 to add space before edition.</summary>
<updated>2016-07-26T01:00:00+00:00</updated>
<rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
</info>
Expand Down Expand Up @@ -276,7 +276,7 @@
</choose>
</else-if>
<else-if type="bill legal_case legislation" match="none">
<text macro="edition" suffix="."/>
<text macro="edition" prefix=" " suffix="."/>
</else-if>
</choose>
</macro>
Expand Down
1 change: 1 addition & 0 deletions vignettes/mklinks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,4 @@ sed -i 's/<code>info()<\/code>/<code><a href="..\/html\/info.html" style="color:
sed -i 's/<code>thermo.refs()<\/code>/<code><a href="..\/html\/util.data.html" style="color:\ green;">thermo.refs()<\/a><\/code>/g' FAQ.html
sed -i 's/<code>subcrt()<\/code>/<code><a href="..\/html\/subcrt.html" style="color:\ green;">subcrt()<\/a><\/code>/g' FAQ.html
sed -i 's/<code>check.GHS()<\/code>/<code><a href="..\/html\/util.data.html" style="color:\ green;">check.GHS()<\/a><\/code>/g' FAQ.html
sed -i 's/<code>affinity()<\/code>/<code><a href="..\/html\/affinity.html" style="color:\ green;">affinity()<\/a><\/code>/g' FAQ.html
37 changes: 37 additions & 0 deletions vignettes/vig.bib
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,17 @@ @Article{BB85
doi = {10.1007/BF00379451},
}

@Article{SHD91,
author = {Sverjensky, Dimitri A. and Hemley, J. J. and D'Angelo, W. M.},
journal = {Geochimica et Cosmochimica Acta},
title = {{T}hermodynamic assessment of hydrothermal alkali feldspar-mica-aluminosilicate equilibria},
year = {1991},
number = {4},
pages = {989--1004},
volume = {55},
doi = {10.1016/0016-7037(91)90157-Z},
}

@Article{Dic19,
author = {Dick, Jeffrey M.},
journal = {Frontiers in Earth Science},
Expand Down Expand Up @@ -838,3 +849,29 @@ @Book{PMW87
series = {Bulletin},
url = {https://www.worldcat.org/oclc/16131757},
}

@InCollection{HC14,
author = {C. A. Heinrich and P. A. Candela},
booktitle = {Treatise on Geochemistry (Vol. 13)},
publisher = {Elsevier},
title = {Fluids and ore formation in the {E}arth's crust},
year = {2014},
address = {Oxford},
chapter = {1},
edition = {2},
editor = {Heinrich D. Holland and Karl K. Turekian},
pages = {1--28},
volume = {13},
doi = {10.1016/B978-0-08-095975-7.01101-3},
}

@Article{HA05,
author = {Holm, Nils G. and Andersson, Eva},
journal = {Astrobiology},
title = {Hydrothermal simulation experiments as a tool for studies of the origin of life on {E}arth and other terrestrial planets: A review},
year = {2005},
number = {4},
pages = {444--460},
volume = {5},
doi = {10.1089/ast.2005.5.444},
}

0 comments on commit 253c7e3

Please sign in to comment.