
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:
where
The chemical potential of a phase is either a constant for a condensed (pure) phase:
or a function for a phase within a solution:
where
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:
where
3. Mass Constraint
The mass equality constraint is defined as:
where
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).

Algorithm Demonstration
A simplified example of the Gibbs energy minimization approach used in MAGEMin is provided at:
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.

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
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
if x[2] - 0.5 > 0.0; mineral_name = "afs"
else mineral_name = "pl";
- muscovite:
mu
if x[4] - 0.5 > 0.0; mineral_name = "pat"
else mineral_name = "mu"
- amphibole:
amp
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
if -x[1] + 0.5 > 0.0; mineral_name = "hem"
else mineral_name = "ilm"
- nepheline:
nph
if x[2] - 0.5 > 0.0; mineral_name = "K-nph"
else mineral_name = "nph"
- clinopyroxene:
cpx
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
if x[2] - 0.5 > 0.0; mineral_name = "afs"
else mineral_name = "pl";
- muscovite:
mu
if x[4] - 0.5 > 0.0; mineral_name = "pat"
else mineral_name = "mu"
- spinel:
sp
if x[2] - 0.5 > 0.0; mineral_name = "sp"
else mineral_name = "mt"
- amphibole:
amp
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
if x[1] - 0.5 > 0.0; mineral_name = "ilmm"
else mineral_name = "hemm"
- ilmenite:
ilm
if 1.0 - x[1] > 0.5; mineral_name = "hem"
else mineral_name = "ilm"
- diopside:
dio
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
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
if x[2] < 0.3; mineral_name = "anth"
else mineral_name = "ged"
List of mineral abbreviations (for solvus)
Acronym | Full Mineral Name |
---|---|
act | Actinolite |
afs | Alkali Feldspar |
amp | Amphibole |
ank | Ankerite |
anth | Anthophyllite |
cc | Calcite |
cm | Chromite |
cpx | Clinopyroxene |
cumm | Cummingtonite |
dio | Diopside |
fsp | Feldspar |
ged | Gedrite |
gl | Glaucophane |
hem/hemm | Hematite |
ilm/ilmm | Ilmenite |
jd | Jadeite |
K-nph | Potassic Nepheline |
mt/mgt/mag | Magnetite |
mu | Muscovite |
nph | Nepheline |
Na-cpx | Sodium Clinopyroxene |
occm | Carbonate (calcite group) |
oamp | Ortho-amphibole |
omph | Omphacite |
pat | Paragonite |
pig | Pigeonite |
pl | Plagioclase |
sid | Siderite |
sp/spl | Spinel |
tr | Tremolite |
usp | Ulvö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