News:

alphaMELTS 1.9 is available at the download and information site.
alphaMELTS 2 standalone & for MATLAB/Python are available on request
(see the Version 2 tab on the download site for more details).
For news of all MELTS software see the MELTS Facebook page.

Main Menu

[EX] Adiabat_1ph 2 version of MELTS tutorial: 'Quick start using MELTS'

Started by Paula, February 07, 2007, 07:03:14 PM

Previous topic - Next topic

Paula

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. This post is for version 2.0 but will be updated if there are any future changes.

The screen output in this particular example is from a run on Windows but almost all the information applies to Linux and Mac users also. The downloadable text files are all in Linux/Mac format but can be converted to Windows by putting file_format.pl in the same directory and typing 'file_format.pl file_to_be_converted' at the command line.

The example uses the melts_file Morb.melts from the MELTS website. You will also need the command_file frac_xtal_tutorial.txt, which is modified from the 'frac_xtal.dat' file included with the Adiabat_1ph package. 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.

The Morb.melts file can be used without being edited first but certain lines will be ignored by adiabat_1ph(.exe). For the Adiabat_1ph version of MELTS these settings are specified in 'frac_xtal_tutorial.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.pl -f frac_xtal_tutorial.txt'. You will see a list of environment variables from 'frac_xtal_tutorial.txt' that were set by run_adiabat.pl before starting adiabat_1ph(.exe):

Quote
D:\phmelts\users\paula>run_adiabat.pl -f frac_xtal_tutorial.txt

ADIABAT_DELTAT -3
ADIABAT_MINT 1000
ADIABAT_CRASH_FILE adiabat.out-MORB
ADIABAT_VERSION MELTS
ADIABAT_MODE isobaric
ADIABAT_FRACTIONATE_SOLIDS true

Checking for updates...

*** ADIABAT_1pH 2.0 -- Batch isobar w/ or w/o liquid ***

... etc ...

Choose:
1. Read input file to set composition of system
2. Twiddle starting parameters
3. Single (batch) calculation
4. Execute
5. Fix fO2 and/or aH2O
6. Source mixer and set H2O
7. Impose initial entropy, enthalpy or volume
8. Write melts input file
9. Turn liquid on / off
10. Follow mineral isograd or melt fraction contour
11. Write output file
12. Calculated integrated output file
13. Read or write restart file
-1. Turn off menu display for options 1-13
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:

Quote
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'

Choose:

[Note: in some older versions of adiabat_1ph you will see a message "Error during input file read, offending record: 'mode: fractionation' ". This appears to generate an error but is actually harmless as it is the last line in file.  The program bug was fixed in version 1.8. Also note: if, for comparison, you would like to run the Morb.melts file through a more modern MELTS GUI than the one featured in the original tutorial (e.g. CORBA MELTS) then you will have to modify the names of some of the suppressed phases, as shown here, and also change the fractionation line to 'Mode: Fractionate Solids'. That new format line will currently cause the same error in adiabat_1ph as 'Mode: Fractionation' did prior to version 1.8.  As before, it is harmless as long as the line comes last in the file but will be fixed in a future version of the program.]

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:

Quote
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.  Choose option 10 and answer the questions, which should be reasonably self-explanatory:

Quote
Your choice: 10
Stable (0) or metastable (1) search? 0
(1) Superliquidus or (0) subsolidus initial guess ?? 1
Phase to track boundary of (by name, lower case): liquid
What F or Phi value (or < 0.0 for default)? 1.0
Track melt fraction by mass (1) or volume (0): 1
Target F set to 1.000000
Enter 1 for special upwards-only search for troublesome phases: 0
...Adding the solid phase feldspar to the assemblage.

... etc ...

...Quadratic convergence was acceptable at iterQuad = 6 (rNorm = 5.19909e-10).
...Dropping phase feldspar from the assemblage.
Isograd solution at: P 500.000000, T 1493.355078
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
Return to menu now (1) or increment P and continue calculations (0)?1

Choose:

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 Kelvin (although from v1.9 onwards there is an option to output in oC by setting the ADIABAT_CELSIUS_OUTPUT environment variable).

On returning to the menu, 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:

Quote
Your choice: 4
Initial Adiabat_1ph calculation at: P 500.000000, T 1493.355078
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_1...

Choose:

Choose option 0 to quit (as opposed to shutting the command window) and you should find 7 new text files have been generated, from the 'adiabat.out-MORB' crash_file output.  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 'Liq_tbl.txt' from the Adiabat_1ph output 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.

Cheers!
Paula

Olivier

Paula,

I try obtaining the liquid using option 10

I enter:
(1) for metastable
phase tro track= liquid

but the program then stalls and i cannot enter anything else

what to do?

thanks

Paula

Hi Olivier,

The metastable search works by temporarily suppressing all phases, except liquid, and then following the relevant affinity=0 contour. It is supposed to be for solid phases only (as described in this AGU abstract). So it's actually a bug that it lets you input 'liquid' and then hangs.  I'll fix it, but if you are running the tutorial and looking for the liquidus you want to be using the stable search anyway. If you enter '0' does it work?

In theory, the metastable search may be used for the stable part of a phase-in boundary or along its metastable extension. But for solution phases it is an approximation as it assumes ideal mixing (see Ghiorso 1994; page 5495) and it is also less robust than the stable search. These were not major issues for its intended purpose. But if you are constructing a phase diagram (or rather a pseudo-section) and would like, say, to plot the metastable extension of a solidus reaction then you are better off suppressing one of the solid phases and using the stable search.  When it is released Adiabat_1ph 3 will give you an menu option to turn individual solid phases on and off, as well as the existing one to suppress liquid, or not.

Paula