CHNOSZ (version 1.3.2)

mosaic: Chemical Affinities with Changing Basis Species

Description

Calculate chemical affinities of formation reactions of species using basis species that change with the conditions.

Usage

mosaic(bases, bases2 = NULL, blend = TRUE, mixing = TRUE, ...)

Arguments

bases

character, basis species to be changed in the calculation, or list, containing vectors for each group of changing basis species

bases2

character, second set of changing basis species

blend

logical, use relative abundances of basis species?

mixing

logical, include a term for the Gibbs energy of mixing?

...

additional arguments to be passed to affinity

Value

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 affinity. If bases2 is provided, the list also contains A.bases2 (affinities of formation of the second set of basis species).

Details

mosaic can be used to calculate the affinities of formation of species when the relative abundances of basis species listed in bases changes over the range of conditions, due to e.g. ionization, complexation or redox reactions. 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. Chemical activity diagrams constructed by assembling sub-diagrams corresponding to the predominant basis species can described as “mosaic diagrams”.

The function calculates the affinities using all combination of basis species given as vector arguments to bases and bases2. The first species listed in each group should be in the current basis definition, and all the basis species in each group should 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 arguments in ... are passed to affinity to specify the conditions.

If blend is TRUE (the default), the function combines the affinities of the formation reactions in proportion to the relative abundances of the basis species at each condition. Additionally, if mixing is TRUE (the default), a term is included to account for the Gibbs energy of ideal mixing. See the second example in solubility for a numerical test of the calculations using blend and mixing. If blend is FALSE, the function returns the affinities calculated using the single predominant basis species in bases at each condition (in this case, the mixing argument has no effect).

A more flexible method of specifying multiple sets of basis species is now available. Instead of using bases and bases2, supply a list for just the bases argument. The list should contain any number of vectors specifying the groups of basis species. All combinations of basis species in these groups are used for the calculations. This overcomes the prior limitation of only having two changing groups of basis species.

References

Garrels, R. M. and Christ, C. L. (1965) Solutions, Minerals, and Equilibria, Harper & Row, New York, 450 p. http://www.worldcat.org/oclc/517586

See Also

demo("mosaic"), extending the example below by addition of carbonate species in bases2, and using thermodynamic data from Garrels and Christ, 1965.

Examples

Run this code
# NOT RUN {
# 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, 250)
Eh <- c(-1, 1, 250)
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 relative abundances of the basis species
# NOTE: set blend = FALSE for sharp transitions between the basis species
# (looks more like the diagram in GC65)
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"))
legend("bottomleft", c("log(act_Fe) = -4", "log(act_Fe) = -6"), lwd = c(2, 1), bty = "n")
# we could overlay the basis species predominance fields
#diagram(m1$A.bases, add=TRUE, col="blue", col.names="blue", lty=3)
# }

Run the code above in your browser using DataLab