MAGEC (Magma And Gas Equilibrium Calculator)
Author: Chenguang Sun
Copyright, 2025
This Matlab program calculates the equilibrium distribution of C-H-O-S volatiles (H2, H2O, CO, CO2, CH4, H2S, SO2, S2, COS, O2) in gas-melt coupled systems.
Updates on April 27, 2025:
1. Added additional options for CO2 and H2O solubility models
2. Corrected CO solubility models
If you use this program for your publications, please cite the following references:
1. Sun, C. and Yao, L., 2024. Redox equilibria of iron in low-to high-silica melts: A simple model and its applications to CHOS degassing. Earth and Planetary Science Letters, 638, p.118742. [Note: This is the reference for MAGEC_2024 with new Fe- and S-redox models and flexible setting options.]
2. Sun, C. and Lee, C.T.A., 2022. Redox evolution of crystallizing magmas with CHOS volatiles and its implications for atmospheric oxygenation. Geochimica et Cosmochimica Acta, 338, pp.302-321. [Note: This is the reference for the first version of MAGEC.]
____________________________________________________
How to run the program:
1. Input T/P/logfO2 (or Fe3+/FeT) and compositions in the input file (.xlsx).
Make sure you use different names for the input and output files.
The batch data could be polybaric/isobaric/adiabatic degassing.
2. Modify the "settings" in the input file.
3. Open [Run_MAGEC_2024_v2.m] in Matlab
4. Go to [Editor] Tab in Matlab and click [Run] button.
____________________________________________________