Author Topic: [EX] Adiabat_1ph 3 version of MELTS tutorial: 'Quick start using MELTS'  (Read 535669 times)


  • Administrator
  • Hero Member
  • *****
  • Posts: 269
    • View Profile
    • My GPS Division profile
This topic will show you how to work through one page of the MELTS tutorial, using the Adiabat_1ph program:

Testing MELTS installation using the sample input file - Try this first

The page is part of the 'Getting Started: Testing and Examples' section of the MELTS manual, written by Mark Ghiorso for the original graphical-user-interface (GUI) version. The idea of this topic is to show the similarities and differences between his GUI and our text-menu versions of MELTS and how to reproduce GUI MELTS calculations in Adiabat_1ph. It should be useful for newcomers to MELTS / Adiabat_1ph who want to know how to get started and for those switching from the original GUI version. As the menu options and settings have been somewhat reorganized in Adiabat_1ph 3.0, people who have used earlier versions of Adiabat_1ph can also compare this version of the tutorial with this older version to see how the 'Find Liquidus' functionality has changed. This post is for version 3.0.1 but will be updated if there are any future changes.

The screen output in this particular example is from a run on Mac but almost all the information applies to Linux and Windows users also. The downloadable text files are all in Windows format but can be converted to Linux / Mac by typing 'file_format.command file_to_be_converted' at the command line or by double-clicking file_format.command and dragging and dropping the appropriate files onto the terminal window.

The example uses the melts_file Morb.melts from the MELTS website. A modified version of the file is also included in the downloaded Adiabat_1ph 3 package (the modifications simply bring it up to date with the latest GUI versions of MELTS and do not affect Adiabat_1ph use); if you use this version please make a copy of the file and place it in another folder. Either 'Morb.melts' file can be used without being edited first but certain lines will be ignored by adiabat_1ph(.exe). You will also need the settings_file FracXtalTutorial.txt, which is modified from the 'frac_xtal_env.txt' file included with Adiabat_1ph. Right click (PC) or CTRL-click (Mac) and choose "Save Link Target As..." or a similar option; alternatively, follow the link for the file at the end of this post.

For the Adiabat_1ph version of MELTS, some of the settings in 'Morb.melts' are specified in 'FracXtalTutorial.txt' instead (see comments within that file and the latest version of the Adiabat_1ph manual for more details). Start the program from the command line by typing 'run_adiabat.command -f FracXtalTutorial.txt' (a separate tutorial post will be made for 'double-click' mode of using run_adiabat.command). You will see a list of environment variables from 'frac_xtal_tutorial.txt' that were set by run_adiabat.command before starting adiabat_1ph(.exe):

Elara:~ melts$ run_adiabat.command -f FracXtalTutorial.txt


Checking for updates...

*** ADIABAT_1pH 3.0.1 -- MELTS isobar w/ or w/o liquid ***

... etc ...

 1. Read MELTS file to set composition of system
 2. Twiddle starting or continuation parameters
 3. Single (batch) calculation
 4. Execute (follow path, mineral isograd or melt contour)
 5. Set fO2 buffer
 6. Set H2O (ppm) or aH2O
 7. Impose initial entropy, enthalpy or volume
 8. Adjust solid phase setting(s)
 9. Turn liquid on / off
10. Turn phase diagram mode on / off
11. Update state using restart file
12. Update composition using MELTS file
13. Write out restart file
14. Write out MELTS file
15. Write thermodynamic output for all phases
16. Calculate integrated melt and output file(s)
17. Fit parental melt composition (amoeba)
18. Cumulate Invertor (not yet implemented)
-1. Turn off menu display for options 1-18
 0. QUIT
Your choice:

Choose option 1 to read in 'Morb.melts'. Only those lines that adiabat_1ph(.exe) actually uses are printed to screen; lines that are ignored do not appear:

Your choice: 1
Filename: Morb.melts
input file open
Successfully read: 'title: dumm'
Successfully read: 'initial composition: sio2 48.68'
Successfully read: 'initial composition: tio2 1.01'
Successfully read: 'initial composition: al2o3 17.64'
Successfully read: 'initial composition: fe2o3 0.89'
Successfully read: 'initial composition: cr2o3 0.03'
Successfully read: 'initial composition: feo 7.59'
Successfully read: 'initial composition: mgo 9.10'
Successfully read: 'initial composition: cao 12.45'
Successfully read: 'initial composition: na2o 2.65'
Successfully read: 'initial composition: k2o 0.03'
Successfully read: 'initial composition: p2o5 0.08'
Successfully read: 'initial composition: h2o 0.20'
Successfully read: 'initial temperature: 1200.00'
Successfully read: 'initial pressure: 500.00'
Successfully read: 'log fo2 path: none'
Successfully read: 'suppress: cummingtonite'
Successfully read: 'suppress: nepheline-ss'
Successfully read: 'suppress: leucite-ss'
Successfully read: 'suppress: ortho-oxide'


Although the front-end program looks very different to the one in the original tutorial, the settings for the underlying MELTS algorithm are now exactly the same as described in the 'Four things have been accomplished:' list there.  You can verify that the initial pressure and temperature are set correctly with option 2:

Your choice: 2
Starting Temp = 1200.000000 C
 Type new temperature (or 0 to keep old one): 0
Starting Pressure = 500.000000 bars
 Type new start pressure (or 0 to keep old one): 0

Adiabat_1ph does not have a dedicated 'Find Liquidus' function like the GUI one described.  However, it does have a phase-diagram mode that can be used to find the F = 1.0 point for a given pressure and can thus mimic the use of 'Find Liquidus'.  The temperature obtained can then be used as a starting point for subsequent calculations.  First choose option 10 to turn on Phase Diagram mode, then choose option 3 to perform a single batch calculation. Answer the questions, which will be mostly self-explanatory:

Your choice: 10
Turn phase diagram mode on (1) or off (0)? 13
Superliquidus (1) or subsolidus (0) initial guess ? 1
Phase to track boundary of (by name, lower case): liquid
Type of melt contour to track:
0. Phi (melt fraction by volume)
1. F (melt fraction by mass)
2. aH2O (activity of water in the melt)
Choose: 1
Type the F value to set (or < 0.0 for default): 1.0
Use special monotonic search for troublesome phases (1) or quick search (0)? 0
...Adding the solid phase feldspar to the assemblage.
...Adding the solid phase olivine to the assemblage.
Initial Guess (not an isograd solution): P 500.000000, T 1200.000000

... etc ...

...Quadratic convergence was acceptable at iterQuad = 76 (rNorm = 5.29679e-10).
...Dropping phase feldspar from the assemblage.
Isograd solution at: P 500.000000, T 1220.205078
liquid: 100.350 g 48.51 1.01 17.58 0.89 0.03 7.56 9.07 12.41 2.64 0.03 0.08 0.20
Activity of H2O = 0.0179036  Melt fraction = 1


You can compare the result printed to the screen with the first entries in the GUI melts output and see that the temperatures calculated by the two different methods agree to within ~0.1 oC. Note that adiabat_1ph(.exe) outputs to the screen in oC because we set the ADIABAT_CELSIUS_OUTPUT environment variable.

After turning off Phase Diagram mode (option 10 again), choose option 4. This will continue the calculation from the current conditions, incrementing by ADIABAT_DELTAT at each iteration (i.e. decrease temperature by 3 oC) until the temperature hits ADIABAT_MINT (1000 oC). At each stage crystallized solids will be removed:

Your choice: 10
Turn phase diagram mode on (1) or off (0)? 04
Initial Adiabat_1ph calculation at: P 500.000000, T 1220.205078
liquid: 100.350 g 48.51 1.01 17.58 0.89 0.03 7.56 9.07 12.41 2.64 0.03 0.08 0.20
Activity of H2O = 0.0179036  Melt fraction = 1
...Adding the solid phase feldspar to the assemblage.

... etc ...

liquid: 12.490 g 58.74 0.53 8.88 1.50 0.00 14.14 0.72 5.08 7.99 0.19 0.62 1.60
Activity of H2O = 0.464154  Melt fraction = 0.981791
olivine: 0.058546 g, composition (Ca0.01Mg0.25Fe''0.75Mn0.00Co0.00Ni0.00)2SiO4
clinopyroxene: 0.023732 g, composition cpx Na0.03Ca0.81Fe''0.55Mg0.50Fe'''0.05Ti0.02Al0.16Si1.89O6
feldspar: 0.126139 g, composition K0.00Na0.59Ca0.41Al1.41Si2.59O8
spinel: 0.017233 g, composition Fe''1.57Mg0.10Fe'''0.55Al0.10Cr0.00Ti0.68O4
apatite: 0.006 g, composition Ca5(PO4)3OH
Minimum Temperature reached
Successful return from adiabat_1ph...


Choose option 0 to quit (as opposed to shutting the terminal window) and you should find 7 new text files have been generated.  These results can be compared with the GUI output. Aside from the differences in formatting the results will not be absolutely identical for the following reasons:

  • The GUI Liquid table gives thermodynamic quantities, such as entropy, for the liquid whereas the main output table in Adiabat_1ph, 'System_main_tbl.txt', gives system values instead (including a small amount of solids prior to fractionation)
  • The slightly different method for finding the liquidus gives a slightly different starting point
  • We made a minor change to how a fractional crystallization run is calculated. When the solids are removed a nominal amount is retained in the assemblage, mainly to help stabilize the calculation.  In the original version of MELTS this nominal amount is 10-5 moles but we decided to use a gram amount instead to make analysis of text output files simpler.  By default the retained amount is 10-3 grams, although this is adjustable (see ADIABAT_MASSIN in the Adiabat_1ph manual).  10-3 grams is a similar but not identical quantity to 10-5 moles for typical mineral phases.
  • The original tutorial is rather old compared to the current version of the GUI software package.  Certain more recent changes to the underlying MELTS code may have had a minor effect on results.

The differences are negligible though (e.g. identical compositions and < 0.01 gram difference in masses for phases in the last calculation at 1000 oC) and certainly insignificant when compared to other sources of inaccuracy in the model.

If there are any problems or feedback about this post then please let me know.

« Last Edit: June 13, 2014, 05:31:21 am by Paula »