MAGEMin - C-library
MAGEMin
is an open-source parallel code written in C
that minimizes the Gibbs free energy of multiphase and multicomponent systems. The main objective of MAGEMin
is to provide a stable, consistent and fast phase equilibrium prediction routine.
The function receives bulk-rock composition, pressure and temperature to compute the most stable phase equilibrium. Presently, MAGEMin
provides the thermodynamic dataset used natively in THERMOCALC
. The thermodynamic datasets are directly translated into C
routines and implemented without transformation of variables or coordinate systems, thus eliminating inconsistencies.
The list of all available thermodynamic datasets is presented below.
Note
Presently, only thermodynamic datasets from THERMOCALC
are available in MAGEMin. However, our approach is not resctricted to a single formalism and we are working on adding the Stixrude & Lithgow-Bertelloni thermodynamic datasets for the mantle.
Warning
The C
backend of MAGEMin
is not the most user-friendly way to use MAGEMin
toolset. We strongly encourage users to try out MAGEMinApp.jl
and MAGEMin_C.jl
. The only case where using the C
backend of MAGEMin
possibly the best solution is when trying to call MAGEMin
as an extarnal library for a pre-existing C
, C++
code.
Available thermodynamic database
The metapelitic model (extended with MnO, White et al., 2014) allows to compute the mineral assemblage from low temperature to supra-solidus conditions.
- Added March 2023, `MAGEMin v1.3.0`
- White et al., 2014a, 2014b (see http://hpxeosandthermocalc.org)
- K2O-Na2O-CaO-FeO-MgO-Al2O3-SiO2-H2O-TiO2-O-MnO chemical system
- Pure stoichiometric phases quartz (q), cristobalite (crst), tridymite (trd), coesite (coe), stishovite (stv), kyanite (ky), sillimanite (sill), andalusite (and), rutile (ru) and sphene (sph).
- Solution phases spinel (spl), biotite (bi), cordierite (cd), orthopyroxene (opx), epidote (ep), garnet (g), ilmenite (ilm), silicate melt (liq), muscovite (mu), ternary feldspar (pl4T), sapphirine (sa), staurolite (st), magnetite (mt), chlorite (chl), chloritoid (ctd) and margarite (ma).
Note
Please keep in mind that the datasets are only calibrated for a limited range of P
,T
and bulk rock
conditions. If you go too far outside those ranges, MAGEMin
(or most other thermodynamic software packages for that matter) may not converge or give bogus results. Developing new, more widely applicable, thermodynamic datasets is a huge research topic, which will require funding to develop the models themselves, as well as to perform targeted experiments to calibrate those models.
References
Green, ECR, Holland, TJB, Powell, R, Weller, OM, & Riel, N (2025). Journal of Petrology, 66, doi: 10.1093/petrology/egae079
Weller, OM, Holland, TJB, Soderman, CR, Green, ECR, Powell, R, Beard, CD & Riel, N (2024). New Thermodynamic Models for Anhydrous Alkaline-Silicate Magmatic Systems. Journal of Petrology, 65, doi: 10.1093/petrology/egae098
Holland, TJB, Green, ECR & Powell, R (2022). A thermodynamic modelfor feldspars in KAlSi3O8-NaAlSi3O8-CaAl2Si2O8 for mineral equilibrium calculations. Journal of Metamorphic Geology, 40, 587-600, doi: 10.1111/jmg.12639
Tomlinson, EL & Holland, TJB (2021). A Thermodynamic Model for the Subsolidus Evolution and Melting of Peridotite. Journal of Petrology,62, doi: 10.1093/petrology/egab012
Holland, TJB, Green, ECR & Powell, R (2018). Melting of Peridotitesthrough to Granites: A Simple Thermodynamic Model in the System KNCFMASHTOCr. Journal of Petrology, 59, 881-900, doi: 10.1093/petrology/egy048
Green, ECR, White, RW, Diener, JFA, Powell, R, Holland, TJB & Palin, RM (2016). Activity-composition relations for the calculationof partial melting equilibria in metabasic rocks. Journal of Metamorphic Geology, 34, 845-869, doi: 10.1111/jmg12211
White, RW, Powell, R, Holland, TJB, Johnson, TE & Green, ECR (2014). New mineral activity-composition relations for thermodynamic calculations in metapelitic systems. Journal of Metamorphic Geology, 32, 261-286, doi: 10.1111/jmg.12071
Holland, TJB & Powell, RW (2011). An improved and extended internally consistent thermodynamic dataset for phases of petrological interest, involving a new equation of state for solids. Journal of Metamorphic Geology, 29, 333-383, doi: 10.1111/j.1525-1314.2010.00923.x