mosaic {CHNOSZ}R Documentation

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, blend = TRUE, stable = list(), ...)

Arguments

bases

character, basis species to be changed in the calculation, or list, each element of which defines an independent group of changing basis species

blend

logical, use relative abundances of basis species?

stable

list, previously determined stable species

...

additional arguments to be passed to affinity

Details

mosaic can be used to calculate the affinities of formation of species when the relative abundances of the basis species listed in bases change 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 (i.e. most stable) basis species can described as “mosaic diagrams”.

The function calculates the affinities using all combination of basis species given as a vector argument to bases. Or, a list can be provided contain any number of vectors that specify different groups of basis species. All combinations of basis species in these groups are used for the calculations.

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). The arguments in ... are passed to affinity to specify the variable conditions, such as temperature, pressure, and activities of other basis species.

blend can be a single logical value or multiple values, in order to control the calculations for individual groups of basis species. If blend is TRUE (the default), the relative abundances of the basis species in each group are calculated using equilibrate, with the total activity taken from the corresponding basis species in the incoming basis definition. Then, the function calculates overall affinities of the formation reactions of each species by combining reactions written using individual basis species in proportion to the relative abundances of the basis species.

If blend is FALSE, the function returns the affinities calculated using the single predominant basis species in bases at each condition. This is appropriate when minerals, rather than aqueous species, are used as the changing basis species. Note, however, that mosaic is not internally recursive: the stabilities of one group of basis species (e.g. minerals) are not affected by changes in another group (e.g. aqueous species).

This limitation can be overcome by supplying the calculated stabilities (from the predominant element of the output of diagram) as an element of the list in the stable argument whose position corresponds to the appropriate group of basis species. By using the stabilities of minerals in one calculation to identify the basis species in a subsequent calculation, a series of linked mosaic diagrams with increasing complexity can be made. This is useful for diagrams for minerals with multiple metallic elements. Note that a value in any position of the stable list forces blend = FALSE for the corresponding group of basis species, so there is no need to explicity change the blend argument.

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 bases is a list, A.bases is also a list, each element of which corresponds to a group of basis species in bases. If blend is TRUE, the output also contains E.bases (the output of equilibrate for each group of basis species)

References

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

See Also

demo("mosaic"), which extends the example below with carbonate species in order to plot a siderite field. To calculate mineral solubilities with mosaic calculations that account for ligand speciation, use bases as the first argument to solubility.

Examples

# 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)
Eh <- c(-1, 1)
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"), add = TRUE)
# 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 = FALSE)
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)

[Package CHNOSZ version 1.4.3 Index]