Skip to content
MAGEMin framework

Problem Definition

Finding the most stable phase assemblage is a challenging constrained optimization problem including both equality and inequality constraints. One has to minimize the Gibbs energy (1) of the system while satisfying the Gibbs-Duhem (2) and mass equality constraints (3) while also satisfying the mixing-in-sites inequality constraints (4).

1. Total Gibbs Energy

The Gibbs energy of a multi-component multiphase system is given by the weighted summation of the chemical potentials of all end-members and pure phases:

Gsys=λ=1Λnλi=1Nλμi(λ)pi(λ)+ω=1Ωnωμω

where nλ is the molar fraction of the solution phase, pλ is the molar fraction of the endmembers, and nω is the molar fraction of the pure phase.

The chemical potential of a phase is either a constant for a condensed (pure) phase:

μi=Gi0

or a function for a phase within a solution:

μi=Gi0+RTlog(ai)+Giex

where ai is the thermochemical activity related to the mole fraction and the activity coefficient by:

ai=xiγi

For the case of ideal mixing between the end-members, the activity coefficient is unity. The mixing of a species dissolved in a condensed phase, however, rarely behaves ideally and is typically a function of both temperature and composition (mixing-on-sites formulation).

2. Gibbs-Duhem Constraint

The Gibbs-Duhem constraint is defined as:

j=1CΓjaijμi=0

where Γj is the chemical potential of pure component (oxide) j and aij is the molar composition of component j in end-member/pure phase i.

3. Mass Constraint

The mass equality constraint is defined as:

λ=1Λnλi=1Nλaij(λ)pi(λ)+ω=1Ωnωaωjbj=0

where aij is the molar composition of component j in end-member i, and aωj is the molar composition of component j in a pure phase.

Minimization Approach

The Gibbs minimization approach employed in MAGEMin combines discretization of the equations of state in composition space with linear programming and extends the mass-constrained Gibbs-hyperplane rotation method to account for the mixing-on-sites that takes place in silicate mineral solid solutions. For an exhaustive description of the methodology, see Riel et al. (2022).

MAGEMin framework

Algorithm Demonstration

A simplified example of the Gibbs energy minimization approach used in MAGEMin is provided at:

GitHub Repository

This MATLAB application includes two pure phases, sillimanite and quartz, and activity-composition (a-x) relations for feldspar (pl4T, Holland et al., 2021) in a reduced Na2O-CaO-K2O-Al2O3-SiO2 (NCKAS) chemical system.

Solvus phase naming

A solvus is a boundary that defines the limit of solid solubility (miscibility) of phases described by the same solution model (or a-x model). It separates a single solid phase from a region where two (or more) distinct solid phases coexist due to compositional differences.

ternary_feldspar

Properly naming demixed phases is important as it allows to differentiate multiple stable instances of the same solution model e.g., plagioclase and alkali-felspar (feldspar) or muscovite and paragonite (muscovite) etc. While for some solution models, naming (or classifying) the demixed phases is relatively straigthforward (e.g., for feldspar) for other solution phases, such as amphibole, the classification rules are more complex and sometimes not fully accurate.

Igneous, igneous alkali dry (ig, igad)

x = SS_vec.compVariables

  • spinel: spl
julia
if x[3] - 0.5 > 0.0;        mineral_name = "cm"
elseif x[4] - 0.5 > 0.0;    mineral_name = "usp"
elseif x[2] - 0.5 > 0.0;    mineral_name = "mgt"
else                        mineral_name = "spl"
  • feldspar: fsp
julia
if x[2] - 0.5 > 0.0;        mineral_name = "afs"
else                        mineral_name = "pl";
  • muscovite: mu
julia
if x[4] - 0.5 > 0.0;        mineral_name = "pat"
else                        mineral_name = "mu"
  • amphibole: amp
julia
if x[3] - 0.5 > 0.0;        mineral_name = "gl"
elseif -x[3] -x[4] + 0.2 > 0.0;   mineral_name = "act"
else
    if x[6] < 0.1;          mineral_name = "cumm"
    elseif -1/2*x[4]+x[6]-x[7]-x[8]-x[2]+x[3]>0.5;      mineral_name = "tr"    
    else                    mineral_name = "amp"
  • ilmenite: ilm
julia
if -x[1] + 0.5 > 0.0;       mineral_name = "hem"
else                        mineral_name = "ilm"
  • nepheline: nph
julia
if x[2] - 0.5 > 0.0;       mineral_name = "K-nph"
else                        mineral_name = "nph"
  • clinopyroxene: cpx
julia
if x[3] - 0.6 > 0.0;        mineral_name = "pig"
elseif x[4] - 0.5 > 0.0;    mineral_name = "Na-cpx"
else                        mineral_name = "cpx"

metapelite, metabasite, ultramafic (mp, mb, um, mpe, mbe, ume)

x = SS_vec.compVariables

  • feldspar: fsp
julia
if x[2] - 0.5 > 0.0;        mineral_name = "afs"
else                        mineral_name = "pl";
  • muscovite: mu
julia
if x[4] - 0.5 > 0.0;        mineral_name = "pat"
else                        mineral_name = "mu"
  • spinel: sp
julia
if x[2] - 0.5 > 0.0;        mineral_name = "sp"
else                        mineral_name = "mt"
  • amphibole: amp
julia
if x[3] - 0.5 > 0.0;        mineral_name = "gl"
elseif -x[3] -x[4] + 0.2 > 0.0;   mineral_name = "act"
else
    if x[6] < 0.1;          mineral_name = "cumm"
    elseif -1/2*x[4]+x[6]-x[7]-x[8]-x[2]+x[3]>0.5;      mineral_name = "tr"    
    else                    mineral_name = "amp"
  • ilmenitem: ilmm
julia
if x[1] - 0.5 > 0.0;        mineral_name = "ilmm"
else                        mineral_name = "hemm"
  • ilmenite: ilm
julia
if 1.0 - x[1] > 0.5;        mineral_name = "hem"
else                        mineral_name = "ilm"
  • diopside: dio
julia
if x[2] > 0.0 && x[2] <= 0.3;       mineral_name = "dio"
elseif x[2] > 0.3 && x[2] <= 0.7;   mineral_name = "omph"
else                                mineral_name = "jd"
  • diopside: occm
julia
if x[2] > 0.5;              mineral_name = "sid"
elseif x[3] > 0.5;          mineral_name = "ank"
elseif x[1] > 0.25 && x[3] < 0.01;         mineral_name = "mag"
else                        mineral_name = "cc"
  • ortho-amphibole: oamp
julia
if x[2] < 0.3;              mineral_name = "anth"
else                        mineral_name = "ged"

List of mineral abbreviations (for solvus)

AcronymFull Mineral Name
actActinolite
afsAlkali Feldspar
ampAmphibole
ankAnkerite
anthAnthophyllite
ccCalcite
cmChromite
cpxClinopyroxene
cummCummingtonite
dioDiopside
fspFeldspar
gedGedrite
glGlaucophane
hem/hemmHematite
ilm/ilmmIlmenite
jdJadeite
K-nphPotassic Nepheline
mt/mgt/magMagnetite
muMuscovite
nphNepheline
Na-cpxSodium Clinopyroxene
occmCarbonate (calcite group)
oampOrtho-amphibole
omphOmphacite
patParagonite
pigPigeonite
plPlagioclase
sidSiderite
sp/splSpinel
trTremolite
uspUlvöspinel

References

  • Holland, T. J. B., Green, E. C. R., & Powell, R. (2021). A thermodynamic model for feldspars in KAlSi3O8-NaAlSi3O8-CaAl2Si2O8 for mineral equilibrium calculations.

  • Riel N., Kaus B.J.P., Green E.C.R., Berlie N., (2022) MAGEMin, an Efficient Gibbs Energy Minimizer: Application to Igneous Systems. Geochemistry, Geophysics, Geosystems 23, e2022GC010427 https://doi.org/10.1029/2022GC010427