Author Topic: [EX] alphaMELTS 2 (beta) version of tutorial: 'Quick start using MELTS'  (Read 3395 times)

Paula

  • Administrator
  • Hero Member
  • *****
  • Posts: 467
    • View Profile
    • My GPS Division profile
This topic will show you how to work through one page of the MELTS tutorial, using the new version of the alphaMELTS 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 rhyolite-MELTS GUI MELTS calculations in alphaMELTS 2. It should be useful for newcomers to MELTS / alphaMELTS users, or for alphaMELTS users who want to use the rhyolite-MELTS and mixed H2O-CO2 fluid models, and for those who are familiar with the the rhyolite-MELTS GUI version. This post is for the version of alphaMELTS 2 (beta) included with VM alphaMELTS 1.9, but will be updated as alphaMELTS 2 approaches public release.

The alphaMELTS 2 beta is installed, alongside alphaMELTS 1.9 and the rhyolite-MELTS GUI, in the VM alphaMELTS software that can be downloaded from the alphaMELTS download site. The description in this particular example is for running within the virtual machine (i.e. on Linux) but should apply to other operating systems once alphaMELTS 2 is publicly available (the screen output here is actually from a run on Mac).

This example uses an input file that has been modified from the Morb.melts file used in the original tutorial. The modifications simply bring it up to date with the latest GUI versions of MELTS and do not affect software results. Early versions of the MELTS software used a 'Mode: Fractionation' line in the input file to select fractional crystallization, whereas in later versions this is replaced by 'Mode: Fractionate Solids'. Also some phases were suppressed in the original tutorial because the solid solution models were still being developed / tested. None of the phases are stable for the run conditions of the tutorial example, so suppressing these phases has no effect. However, the 'Suppress: ' lines can cause read errors as the names of some phases have changed slightly since (see here).

A version of the modified Morb.melts, with the correct line endings for Linux and Mac, is included in the VM alphaMELTS installation (in a folder called 'tutorial', within the 'MELTS' folder in the melts user's homespace). Note that the version of Morb.melts available on the MAGMA Source server is the same except that it has Windows line endings but the morb.melts version linked on the Mac OS X download site differs slightly in Cr2O3 content and in the P-T conditions.

In VM alphaMELTS there is a double-clickable alphaMELTS icon on the Desktop, but it is for alphaMELTS 1.9. Instead, click the LXTerminal icon that is located next to the start menu. Navigate to the tutorial folder by typing 'cd MELTS/tutorial'. alphaMELTS 2 is started by typing 'run-alphamelts.command' (note the dash, '-'; 'run_alphamelts.command' with an underscore, '_',  is for alphaMELTS 1.X). The script will ask whether you would like to add some command line switches. Unlike alphaMELTS 1.X, the settings_file is optional in alphaMELTS 2. For now we won't use one, so just press return for the default settings.

Quote
Mac:tutorial psmith$ run-alphamelts.command
No command line switches specified! Please enter switches now (or press return for defaults).

The alphamelts program will detect that there are no settings and print the same set of questions as the GUI for choosing the thermodynamic model. There is more explanation of the various MELTS versions in the MELTS decision tree. However, rhyolite-MELTS 1.0.2 should give identical results to the original MELTS model for the bulk composition used here. So, choose 'n' and press enter.

Quote
Checking for updates...

ALPHAMELTS_VERSION not set!

---> Default calculation mode is rhyolite-MELTS (v. 1.0.2).  Change this? (y or n): n
---> Calculation mode is rhyolite-MELTS (public release v 1.0.2).

*** alphaMELTS 2.0 (beta Aug 27 2018 19:48:27) -- rhyolite-MELTS P-T path w/ or w/o liquid ***

... etc ...

Choose:
 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
-1. Turn off menu display for options 1-18
 0. QUIT

Several menu items are missing in the beta version of alphaMELTS 2. Some of these will be available soon; others will take a little longer. Choose option 1 to read in 'Morb.melts'. Note that you only need type the first letter(s) of Morb.melts, and then press the 'tab' button to complete the name:

Quote
Your choice: 1
MELTS filename: Morb.melts
Input file read. Waiting for command or user input.

In alphaMELTS 1.X, some lines of Morb.melts were ignored so only those lines that were used were echoed back. alphaMELTS 2 uses all lines in Morb.melts, so it does not print them unless there is a problem. 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

The phase diagram mode of alphaMELTS is not yet hooked up to the menu in alphaMELTS. However, a simple 'Find Liquidus' option has been built into the next step of the calculation. So go straight to option 3, the 'Single (batch) calculation' and choose the option to use the liquidus temperature:

Quote
Your choice: 3
Starting guess to use:
0. Norm-calculated subsolidus assemblage
1. Superliqidus starting guess at current temperature.
2. Superliqidus starting guess at liquidus temperature.
Choose: 2
<> Found the liquidus at T = 1220.31 (C).
...Checking saturation state of potential solids.
...Projecting equality constraints.
...Minimizing the thermodynamic potential.
...Checking saturation state of potential solids.
<> Stable liquid solid assemblage achieved.
Initial alphaMELTS calculation at: P 500.000000 (bars), T 1220.312500 (C)
liquid:    SiO2 TiO2 Al2O3 Fe2O3 Cr2O3  FeO  MnO  MgO  NiO  CoO   CaO Na2O  K2O P2O5  H2O
100.350 g 48.51 1.01 17.58  0.89  0.03 7.56 0.00 9.07 0.00 0.00 12.41 2.64 0.03 0.08 0.20
Activity of H2O = N/A  Melt fraction = 1

Note, this uses the 'Find Liquidus' algorithm from the GUI. It is only really reliable if used before any other phases are added to the assemblage, which is why is has been incorporated into the initial calculation step. This 'Find Liquidus' routine may give incorrect results if used later in the run, and is also unsuitable for water saturated systems. alphaMELTS has a phase diagram mode that can bracket F=1.0 (or another melt fraction contour) and includes a 'Find wet liquidus' option. This will be added to alphaMELTS 2 soon and will provide alternative ways to do the initial 'Find Liquidus' calculation.

Now choose option 4 to continue the calculation from the current conditions, incrementing the temperature by 3 oC until the temperature hits the Final Temperature (1000 oC). At each stage crystallized solids will be removed:

Quote
Your choice: 4
...Checking saturation state of potential solids.
...Projecting equality constraints.
...Minimizing the thermodynamic potential.
...Checking saturation state of potential solids.
<> Stable liquid solid assemblage achieved.
Initial alphaMELTS calculation at: P 500.000000 (bars), T 1220.312500 (C)
liquid:    SiO2 TiO2 Al2O3 Fe2O3 Cr2O3  FeO  MnO  MgO  NiO  CoO   CaO Na2O  K2O P2O5  H2O
100.350 g 48.51 1.01 17.58  0.89  0.03 7.56 0.00 9.07 0.00 0.00 12.41 2.64 0.03 0.08 0.20
Activity of H2O = N/A  Melt fraction = 1

... etc ...

...Checking saturation state of potential solids.
...Adding the solid phase apatite to the assemblage.
...Projecting equality constraints.
...Minimizing the thermodynamic potential.
...Checking saturation state of potential solids.
<> Stable liquid solid assemblage achieved.
alphaMELTS at: P 500.000000 (bars), T 1001.312500 (C)
liquid:    SiO2 TiO2 Al2O3 Fe2O3 Cr2O3   FeO  MnO  MgO  NiO  CoO  CaO Na2O  K2O P2O5  H2O
12.5185 g 58.75 0.53  8.91  1.50  0.00 14.11 0.00 0.72 0.00 0.00 5.08 7.98 0.20 0.62 1.60
Activity of H2O = N/A  Melt fraction = 0.981517
olivine: 0.059366 g, composition (Ca0.01Mg0.25Fe''0.75Mn0.00Co0.00Ni0.00)2SiO4
clinopyroxene: 0.025007 g, composition cpx Na0.03Ca0.81Fe''0.55Mg0.50Fe'''0.05Ti0.02Al0.16Si1.89O6
feldspar: 0.127634 g, composition K0.00Na0.59Ca0.41Al1.41Si2.59O8
spinel: 0.018452 g, composition Fe''1.57Mg0.10Fe'''0.55Al0.10Cr0.00Ti0.68O4
apatite: 0 g, composition Ca5(PO4)3OH
Minimum Temperature reached
Successful return from alphamelts...

Choose:

Once it has finished executing, choose option 0 to quit (as opposed to shutting the terminal window). You should find 7 new text files have been generated, which are described in the alphaMELTS 1.X documentation. Note that alphaMELTS 2 has another optional line for the melts_file that can take one of four values:

  • 'Output: txt' - alphaMELTS-style output (see the alphaMELTS documentation file)
  • 'Output: tbl' - GUI-style output, including melts.out and .tbl files that can be used with Excel-based tools for tabulation and plotting
  • 'Output: both' - alphaMELTS and GUI output
  • 'Output: none' - no text output

By default the output is alphaMELTS-style only. The output will differ from the original slightly from the as GUI Liquid table gives thermodynamic quantities, such as entropy, for the liquid whereas the main output table in alphaMELTS, 'System_main_tbl.txt', gives system values instead (including a small amount of solids prior to fractionation). For GUI-style output, there will also be slight discrepancies between the newly generated melts.out file and the original output file. The most striking differences are the addition of Mn, Co and Ni to the olivine solid solution model, though none of these components are in the Morb.melts bulk composition, and splitting of the pyroxene phase into separate clinopyroxene and orthopyroxene phases (see here). Either way, the phase compositions are essentially the same though and differences in the phase masses are a few hundredths of a gram, at most.

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

Cheers!
Paula
« Last Edit: November 18, 2020, 04:40:47 pm by Paula »

Paula

  • Administrator
  • Hero Member
  • *****
  • Posts: 467
    • View Profile
    • My GPS Division profile
Re: alphaMELTS 2 version of tutorial: 'Quick start using MELTS'
« Reply #1 on: September 18, 2018, 12:53:27 pm »
If you downloaded VM alphaMELTS 1.9 between August 30th and September 17th, 2018, you will probably find that this tutorial does not run properly. Corrected 64-bit and 32-bit virtual machines have been uploaded today (18th).

The problem is mainly due to a corrupted Morb.melts file. It can be fixed by copying the example from the alphaMELTS 1.9 installation:

Quote
cd MELTS/tutorial
cp ../linux_alphamelts_1-9/examples/Morb.melts .
... you only need to do this once ...
run-alphamelts.command
... and continue as described above ...

In addition, a minor bug - since fixed - means that the calculation overshoots the 1000 oC minimum temperature. If this is a problem and you do not want to download the whole virtual machine again, please contact me and I'll send you the updated executable.

Update: as of October 31st, 2018, a minor bug in alphaMELTS 2 has been fixed, as has the link to Meltsout. You can work around the bug (a oC<->K error in option 2) or request the updated executable. Alternatively, download the new VM, which also has Software Updates applied and Guest Additions updated.

Cheers,
Paula
« Last Edit: October 31, 2018, 02:31:06 pm by Paula »