Calculate chemical affinities of formation reactions of species using basis species that change with the conditions.
character, basis species to be changed in the calculation
character, second set of changing basis species
logical, use relative abundances of basis species?
additional arguments to be passed to
mosaic can be used to calculate the reaction affinities when the basis species listed in
bases change in relative abundance over the range of conditions, due to e.g. ionization, complexation or redox reactions.
Chemical activity or predominance diagrams constructed by assembling sub-diagrams corresponding to the predominant basis species have sometimes been described as “mosaic diagrams” in the literature.
This is a way to “speciate the basis species”.
For example, the speciation of sulfur (SO4-2, HSO4-, HS- and H2S) as a function of Eh and pH affects the formation affinities, and therefore relative stabilities of iron oxide and sulfide minerals.
The function calculates the affinities using each basis species listed in
bases in turn, changing them via
The first species listed in
bases should be in the current basis definition.
The arguments in
... are passed to
affinity to specify the conditions.
blend is FALSE (the default), the function returns the affinities calculated using the single predominant basis species in
bases at each condition.
blend is TRUE, the function combines the affinities of the formation reactions weighted by the relative abundances of the basis species at each condition.
This tends to produce curved boundaries.
The basis species listed in
bases should all be related to the first basis species there (i.e. all share the same element).
A second, independent set of basis species can be provided in
bases2 (for example CO3-2, HCO3-, CO2, if the first set of basis species are the sulfur-bearing ones listed above).
The function then works recursively, by calling itself instead of
affinity, so that the inner loop changes the basis species in
In this way, all possible combinations of the two sets of basis species are used in the calculation.
A list containing
A.species (affinities of formation of the species with changing basis species) and
A.bases (affinities of formation of the basis species in terms of the first basis species), each having same structure as the list returned by
bases2 is provided, the list also contains
A.bases2 (affinities of formation of the second set of basis species, in terms of the first one in that set).
Garrels, R. M. and Christ, C. L. (1965) Solutions, Minerals, and Equilibria, Harper & Row, New York, 450 p. http://www.worldcat.org/oclc/517586
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
# Fe-minerals and aqueous species in Fe-S-O-H system # speciate SO4-2, HSO4-, HS-, H2S as a function of Eh and pH # after Garrels and Christ, 1965 Figure 7.20 pH <- c(0, 14, 200) Eh <- c(-1, 1, 200) T <- 25 basis(c("FeO", "SO4-2", "H2O", "H+", "e-")) basis("SO4-2", -6) species(c("Fe+2", "Fe+3"), -6) species(c("pyrrhotite", "pyrite", "hematite", "magnetite")) # the basis species we'll swap through bases <- c("SO4-2", "HSO4-", "HS-", "H2S") # calculate affinities using the predominant basis species m1 <- mosaic(bases, pH=pH, Eh=Eh, T=T) # make a diagram and add water stability lines d <- diagram(m1$A.species, lwd=2) water.lines(d, col="seagreen", lwd=1.5) # show lines for Fe(aq) = 10^-4 M species(c("Fe+2", "Fe+3"), -4) m2 <- mosaic(bases, pH=pH, Eh=Eh, T=T) diagram(m2$A.species, add=TRUE, names=NULL) title(main=paste("Iron oxides and sulfides in water, log(total S) = -6", "After Garrels and Christ, 1965", sep="\n")) # we could overlay the basis species predominance fields #diagram(m1$A.bases, add=TRUE, col="blue", col.names="blue", lty=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.