Skip to content

boriskaus/MAGEMin

 
 

Repository files navigation

drawing

drawing

Mineral Assemblage Gibbs Energy Minimization (MAGEMin)

MAGEMin is a Gibbs energy minimization solver package, which computes the thermodynamically most stable assemblage for a given bulk rock composition and pressure/temperature condition. It also returns parameters such as melt fraction or density, which can be combined with geodynamic/petrological tools to simulate, for example, the evolving chemistry of a crystallising melt.

MAGEMin is written as a parallel C library and uses a combination of linear programming, extended Partitioning Gibbs free Energy and gradient-based local minimization to compute the most stable mineral assemblage. In this, it differs from existing approaches which makes it particularly suitable to utilize modern multicore processors.

We also provide a MATLAB-based graphical user interface to help computing pseudosections for given bulk rock composition.

Installing MAGEMin

Quick start

The easiest way to use MAGEMin is through the MATLAB graphical user interface, which has an installation script to download the correct parallel binaries for your system (created using BinaryBuilder & julia).

Follow these steps:

  1. Download a zip file with the most recent release of MAGEMin (click on the green Code button @ the top of this page) and unzip it on your machine.
  2. Open the PlotPseudosection graphical user interface from MATLAB (2020+).
  3. Follow the binary installation instructions (which requires you to install a recent julia version).
  4. After this you are ready to get started, for example by pushing the Start new computation button.

Manual compilation

if you wish, you can also compile MAGEMin yourself, which requires you to install these packages as well:

In addition, we make use of uthash and ketopt.

Documentation

Full support to install and use MAGEMin is available here: https://computationalthermodynamics.github.io/MAGEMin/index.html

Available thermodynamic dataset

The MAGEMin algorithm is general and can in principle be used with any thermodynamic database. Yet, for speed reasons, the current implementation hardcoded the hydrous mafic melting model of Holland et al. 2018 which is callibrated for hydrous mafic melts and can be used to simulate the fractional crystallisation from a hydrous basalt to a felsic melt.

The details of this thermodynamic solid solution and endmember database are:

  • Holland et al., 2018 (see https://hpxeosandthermocalc.org)
  • K2O-Na2O-CaO-FeO-MgO-Al2O3-SiO2-H2O-TiO2-O-Cr2O3 chemical system
  • Equations of state for
    • 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 (spn), biotite (bi), cordierite (cd), clinopyroxene (cpx), orthopyroxene (opx), epidote (ep), garnet (g), hornblende (hb), ilmenite (ilm), silicate melt (liq), muscovite (mu), olivine (ol), ternary feldspar (pl4T), and aqueous fluid (fl).

Contributing

You are very welcome to request new features and point out bugs by opening an issue. You can also help by adding features and creating a pull request.

Funding

Development of this software package was funded by the European Research Council under grant ERC CoG #771143 - MAGMA.

About

Mineral Assemblage Gibbs Energy Minimization

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 50.6%
  • Jupyter Notebook 41.1%
  • MATLAB 5.5%
  • Julia 1.9%
  • CSS 0.6%
  • Makefile 0.1%
  • Other 0.2%