components – Argument list consisting of each of the structural components. Can consist
of any mixture of Sites or argument tuples which can be passed to
Site __init__.
Recalculate a composition to give an elemental ionic breakdown.
Parameters:
composition – Composition to recalculate. If not provided, will try to use the mineral
composition as set.
ideal_cations (int) – Ideal number of cations to use for formulae calcuations. Will only be used
if oxygen is constrained (i.e. multiple Fe species present or
oxygen_constrained=True).
ideal_oxygens (int) – Ideal number of oxygens to use for formulae calcuations. Will only be used
if oxygen is not constrained (i.e. single Fe species present and
oxygen_constrained=False).
Fe_species (list) – List of iron species for identifying redox-defined compositions.
oxygen_constrained (bool, False) – Whether the oxygen is a closed or open system for the specific composition.
Calculate the estimated site occupancy for a given composition.
Ions will be assigned to sites according to affinities. Sites with equal
affinities should recieve equal assignment.
Parameters:
composition – Composition to calculate site occupancy for.
error (float) – Absolute error for floating point occupancy calculations.
balances (list) – List of iterables containing ions to balance across multiple sites. Note
that the partitioning will occur after non-balanced cations are assigned,
and that ions are only balanced between sites which have defined affinities
for all of the particular ions defined in the ‘balance’.
Middlemost, Eric A. K. (1989). Iron Oxidation Ratios, Norms and the
Classification of Volcanic Rocks. Chemical Geology 77, 1: 19–26.
https://doi.org/10.1016/0009-2541(89)90011-9.
This is a \(\mathrm{FeO / (FeO + Fe_2O_3)}\) mass ratio, not a standard
molar ratio \(\mathrm{Fe^{2+}/(Fe^{2+} + Fe^{3+})}\) which is more
straightfowardly used; data presented should be in mass units. For the
calculation, SiO2, Na2O and K2O are expected to be present.
References
Le Maitre, R. W (1976). Some Problems of the Projection of Chemical Data
into Mineralogical Classifications.
Contributions to Mineralogy and Petrology 56, no. 2 (1 January 1976): 181–89.
https://doi.org/10.1007/BF00399603.
Middlemost, Eric A. K. (1989). Iron Oxidation Ratios, Norms and the
Classification of Volcanic Rocks. Chemical Geology 77, 1: 19–26.
https://doi.org/10.1016/0009-2541(89)90011-9.
Le Maitre, R. W (1976). Some Problems of the Projection of Chemical Data
into Mineralogical Classifications.
Contributions to Mineralogy and Petrology 56, no. 2 (1 January 1976): 181–89.
https://doi.org/10.1007/BF00399603.
Middlemost, Eric A. K. (1989). Iron Oxidation Ratios, Norms and the
Classification of Volcanic Rocks. Chemical Geology 77, 1: 19–26.
https://doi.org/10.1016/0009-2541(89)90011-9.
Standardised calcuation of estimated mineralogy from bulk rock chemistry.
Takes a dataframe of chemistry & creates a dataframe of estimated mineralogy.
This is the CIPW norm of Verma et al. (2003). This version only uses major
elements.
Parameters:
df (pandas.DataFrame) – Dataframe containing compositions to transform.
Fe_correction (str) – Iron correction to apply, if any. Will default to ‘LeMaitre’.
Fe_correction_mode (str) – Mode for the iron correction, where applicable.
adjust_all_Fe (bool) – Where correcting iron compositions, whether to adjust all iron
compositions, or only those where singular components are specified.
return_adjusted_input (bool) – Whether to return the adjusted input chemistry with the output.
return_free_components (bool) – Whether to return the free components in the output.
rounding (int) – Rounding to be applied to input and output data.
Verma, Surendra P., Ignacio S. Torres-Alvarado, and Fernando Velasco-Tapia (2003).
A Revised CIPW Norm. Swiss Bulletin of Mineralogy and Petrology 83, 2: 197–216.
Verma, S. P., & Rivera-Gomez, M. A. (2013). Computer Programs for the
Classification and Nomenclature of Igneous Rocks. Episodes, 36(2), 115–124.
Todo
Note whether data needs to be normalised to 1 or 100?
Notes
The function expect oxide components to be in wt% and elemental data to be
in ppm.
z (int) – Optional specification of cationic valence, for calcuation of approximate
Young’s modulus using youngs_modulus_approximation(),
where the modulus is not specified.
Returns:
The strain coefficent \(e^{\frac{-\Delta G_{strain}}{RT}}\).
The lattice strain model relates changes in paritioning to differences in
ionic radii for ions of a given cationic charge, and for a for a specific site
(with Young’s modulus \(E\)). This is calcuated using the work
done to expand a spherical shell centred on the lattice site,
which alters the \(\Delta G\) for the formation of the mineral.
This can be related to changes in partition coefficients using the following
[7]:
\[D_{j^{n+}} = D_{A^{n+}} \cdot e^{\frac{-4\pi E N \Big(\frac{r_{0}}{2}(r_j - r_0)^2 + \frac{1}{3}(r_j - r_0)^3\Big)}{RT}}\]
Where \(D_{A^{n+}}\) is the partition coefficient for the ideal ion A, and
N is Avagadro’s number (6.023e23 atoms/mol). This can also
be calcuated relative to an ‘ideal’ fictive ion which has a maximum \(D\)
where this data are available. This relationship arises via i) the integration
to calcuate the strain energy mentioned above
(\(4\pi E (\frac{r_{0}}{2}(r_j - r_0)^2 + \frac{1}{3}(r_j - r_0)^3)\)),
and ii) the assumption that the changes in \(\Delta G\) occur only to size
differences, and the difference is additive. The ‘segregation coefficient’
\(K_j\) can be expressed relative to the non-doped equilibirum constant
\(K_0\)[6]:
The bulk modulus \(K\) for an an ionic crystal is esimated using [8]:
\[K = \frac{A Z_a Z_c e^2 (n-1)}{9 d_0 V_0}\]
Where \(A\) is the Madelung constant, \(Z_c\) and \(Z_a\) are the
anion and cation valences, \(e\) is the charge on the electron,
\(n\) is the Born power law coefficent, and \(d_0\) is the cation-anion
distance [8]. Using the Shannon ionic radius for oxygen (1.38 Å),
this is approximated for cations coordinated by oxygen in silicates and oxides
using the following relationship [9]:
\[K = 750 Z_c d^{-3}\]
Where \(d\) is the cation-anion distance (Å), \(Z_c\) is the
cationic valence (and \(K\) is in GPa). The Young’s modulus \(E\) is
then calculated through the relationship [10]:
\[E = 3 K (1 - 2 \sigma)\]
Where \(\sigma\) is Poisson’s ratio, which in the case of minerals can be
approimxated by 0.25 [10], and hence:
\[\begin{split}\begin{align}
E &\approx 1.5 K\\
E &\approx 1025 Z_c d^{-3}
\end{align}\end{split}\]
ys (numpy.ndarray) – Partition coefficients for given elemental data.
E (float, None) – Young’s modulus (stiffness) for the site, in pascals (Pa). Will be estimated using
youngs_modulus_approximation() if none is given.
z (int) – Optional specification of cationic valence, for calcuation of approximate
Young’s modulus using youngs_modulus_approximation(),
where the modulus is not specified.
bounds (list) – List of tuples specifying bounds on parameters ri, T and D.
Returns:
ri, tk, D – Radius, temperature and partition coefficeint describing the
lattice strain fit.
Submodule for accessing the rock forming mineral database.
Notes
Accessing and modifying the database across multiple with multiple threads/processes
could result in database corruption (e.g. through repeated truncation etc).