Exercises for MELTS/pMELTS/pHMELTS/alphaMELTS Short Course
Paul D. Asimow & Paula Antoshechkina
14-16 September, 2011, Caltech
Note: updated and expanded short course materials can be found on the alphaMELTS
and MELTS workshop pages!
See the alphaMELTS archive page for more details.
The original and now very old tutorial is at http://melts.ofm-research.org/Manual/UnixManHtml/examples-test.html and the alphaMELTS version is on the forum (http://magmasource.caltech.edu/forum/). Click the ‘General usage’ link below ‘Interactive operation’ and it is the first entry.
If you have not already done so, make a folder for the two input files Morb.melts and FracXtalTutorial.txt. Make sure that your FracXtalTutorial.txt file contains the line ‘ALPHAMELTS_OLD_SPINEL true’. There have been two subtly different spinel models knocking around in various versions of MELTS over the years. alphaMELTS now uses the same one as the current GUI MELTS but the original tutorial and also all versions of Adiabat_1ph prior to 3 used the other one. Although the difference is seemingly small it does affect the behavior of some examples, including the tutorial example and the 2nd exercise below.
The ‘-p path’ command line switch puts the output text files into the folder path; if path does not exist it will be created. If you are running in double-click mode you should always use this switch (else the output files will end up in the folder where you have the run_alphamelts.command link). Otherwise it is optional but can be useful for organizing output from multiple runs. For now, make a folder ‘output’ within the working directory.
The ‘-b batchfile’ command line option reads from batchfile whatever you would have typed at the alphamelts menu prompt. You can make a file, e.g. batch.txt, containing:
Then in double-click mode when you are asked for command line switches, input the following:
-f drag-and-drop-FracXtalTutorial.txt –b drag-and-drop-batch.txt –p drag-and-drop-output-folder
Otherwise open Terminal / Konsole or the like and navigate to the working directory, where Morb.melts and FracXtalTutorial.txt are, and type:
run_alphamelts.command –f FracXtalTutorial.txt –b batch.txt –p output
After it has finished running check the files in the ‘output’ folder. They are described in the documentation -- http://magmasource.caltech.edu/alphamelts/alphamelts_manual.html -- under ‘Using alphaMELTS’ -> ‘Output files’ -> ‘Main output files’ (except logfile.txt, which is a record of the settings that were used and can be used as a settings_file in later runs). Note that you need to exit the alphamelts program (choose ‘0’) before opening the files. [EX 1 OUTPUT]
2. Second exercise, 1st part: dry isobaric fractionation of a primitive mid-ocean ridge basalt
Copy frac_xtal_env.txt into a new subdirectiory for this calculation.
Open it and examine the settings. The important things already set are:
ALPHAMELTS_VERSION MELTS (For low-P calculations, MELTS is better)
ALPHAMELTS_MODE isobaric (we’re going to reduce T at constant P)
ALPHAMELTS_DELTAT -1 (in 1 °C steps)
ALPHAMELTS_FRACTIONATE_SOLIDS true (selects perfect fractional crystallization)
Let’s make a couple changes, though. Remove the ‘!’ to uncomment these lines:
ALPHAMELTS_OLD_SPINEL true (see above)
ALPHAMELTS_DO_TRACE true (enable trace element calculations)
A ‘!’ comments out the other lines so that they are ignored e.g.
!Initial Temperature: 1400
!Initial Pressure: 500
!Log fO2 Path: FMQ
!Melts Filename: yourinputfilehere.melts
Now copy Morb.melts into your subdirectory, change its name to MORB_dry.melts, and edit it so that it contains the input info we want:
Pick a new title that describes what you’re doing.
Delete the ‘Suppress:’ lines that were for the very old GUI MELTS example
Delete all ‘Final …’ and ‘Increment…’ lines – we use ALPHAMELTS_DELTAT, ALPHAMELTS_MINT etc.
Delete the ‘dp/dt’ line (to impose dp/dt you would use ALPHAMELTS_MODE ‘geothermal’)
Delete the ‘Mode:’ line, which is also ignored by alphaMELTS
The major element composition of our starting liquid is:
Use initial pressure: 500, initial temperature: 1325,
Log fO2 Path: FMQ, Log fO2 Delta: -2
Note that all Fe is FeO - the program will calculate Fe2O3 for the imposed buffer
The initial trace element composition is:
The format of the lines is ‘Initial Trace: Zn 40’ etc.
Save the input file. Now run the program in the same way as you did for the ‘tutorial’, optionally adding the ‘-o outputfile’ command line switch e.g.:
run_alphamelts.command -f frac_xtal_env.txt –o myoutput_tbl.txt
You’ll see some verbiage as the program starts up, showing it read the settings file and checked for updates.
· Now choose menu option 1, and give your input filename. If you typed it correctly, the program will echo the contents as it reads it.
· Now you could use options 2 to set the (P,T) or 5 to set the fO2, but we did that in the input file already.
· So go straight to option 3 to run a test calculation. You want the Superliquidus (1) option for this initial guess. You should get a result that is all liquid with the same composition as you put in (but normalized).
· Now we’re ready to go: choose option 4 to do the whole fractional crystallization run. Watch it go. We claim it will run all the way down to <7% residual dacite liquid at 1011 °C, and then a calculation will fail and it will return to the menu.
· Option 0 to Quit.
Look the directory and you will see lots of files, including your output file, lots of .txt files and the trace output file. Let’s looks at them and see what we got:
· Open Phase_mass_tbl.txt in Excel (it is a space separated text file). Determine the crystallization sequence: what minerals come in and at what temperature? What happens between 1458.15 and 1457.15 K? Make a graph of liquid mass vs. temperature; what tends to happen to the rate of crystallization when new phases appear in the crystallization sequence?
· Now open Phase_main_tbl.txt, which gives the molar formulas, and weight percent oxide compositions at each step. The following questions require some petrology knowledge: What is the Mg# of the liquidus olivine? What name would you give to the first spinel phase that comes in? How about the first clinopyroxene? How about the second clinopyroxene? How about the olivine that comes back in near the end? If the feldspars crystallizing from this run made big zoned crystals, would they be normally or reversely zoned?
· Now open Trace_main_tbl.txt. There are several tables within this file: the first gives the bulk partition coefficient for each element at each temperature. Note that Zn is perfectly incompatible (D = 0); see what happens to D for Sr when feldspar starts to crystallize and what happens to D for Sc when clinopyroxene comes in. Scroll down to the table labeled ‘Liquid’, and make a graph of Sc/Zn vs. Sr/Zn. Can you identify the troctolite and gabbro fractionation legs on this plot? [EX 2 PT 1 OUTPUT]
3. Second exercise, 2nd part: add H2O to this calculation
Make a new directory and copy the frac_xtal_env.txt and input files from the directory you used for the first exercise. Edit the input file and add 0.5 wt. % H2O to the Initial Composition (also change the name and Title line appropriately).
Now repeat the steps from above to run this calculation. After you call step 3 to do a first calculation, note the activity of H2O. This would be 1 if you were water saturated; it was zero in the last calculation. What is it now, with 0.5% H2O at 700 bars pressure? This time the calculation should run all the way down to 10% residual rhyolite liquid, water saturated, at ~870 °C. (If ALPHAMELTS_OLD_SPINEL is unset it will actually run all the way to 801 °C but then the whole program crashes.) [EX 2 PT 2 OUTPUT]
· Compare the crystallization sequence and phase-appearance temperatures in the wet run to the previous dry run. How different is the T at which olivine first appears? How about feldspar? How about the first clinopyroxene? General rule here: H2O suppresses the most polymerized minerals (e.g. feldspar is a framework silicate) most.
· Open the two Liquid_comp_tbl.txt files from the two calculations we’ve done and graph the liquid lines of descent for the two calculations on the following variation diagrams: Al2O3 vs. MgO, FeO* vs. MgO, CaO vs. MgO, Na2O vs. MgO, and H2O vs. MgO [note, to very good approximation FeO* = FeO + 0.9*Fe2O3]. Interpret the differences - how is the path different in each oxide and why? What happens on the H2O vs. MgO plot when H2O reaches ~3.16 wt. % (you can verify this interpretation by looking at the Phase_mass_tbl.txt file at 1226.15 K).
4. Second exercise, 3rd part: using ALPHAMELTS_FRACTIONATE_TARGET for forward and reverse fractionation
Make a new directory and copy the frac_xtal_env.txt and input files from the directory you used for the first exercise.
Edit the frac_xtal_env.txt file to change how and where the calculation is stopped
ALPHAMELTS_FRACTIONATE_TARGET true (to use MgO or Mg#, instead of ALPHAMELTS_MINT)
ALPHAMELTS_MGO_TARGET 8.0 (MgO target in wt %)
!ALPHAMELTS_DO_TRACE true (disable trace element calculations)
Now repeat the steps from above and verify that the calculation stops just after the MgO content drops below 8.0 wt % but otherwise the program behaves as before.
Next make a copy of MORB_dry.melts and call it OJP.melts, and edit it so that it contains the input info we want:
Pick a new title that describes what you’re doing.
Delete the ‘Initial Trace:’ lines as we do not have the trace element composition
The major element composition of our starting liquid is:
Use initial pressure: 1, initial temperature: 1200
Log fO2 Path: none
The sample is a primitive basalt from the Ontong Java Plateau, and is one of the examples computed in the PRIMELT2.xls example spreadsheet. We want to correct the composition for olivine fractionation. We will use the Mg# of the modeled accumulated fractional primary melt from the spreadsheet as our target so that we can compare the olivine accumulation paths as calculated using MELTS with those calculated using the Toplis olivine-liquid model. If you cannot open an Excel sheet with macros then use the PRIMELT2_OJP.csv link instead.
First edit frac_xtal_env.txt to use an ALPHAMELTS_MGNUMBER_TARGET of 76.7 instead of the current ALPHAMELTS_MGO_TARGET. Then use the ‘Find Liquidus’ procedure from the tutorial example, followed by a combination of options 2 and 3 to verify that the liquidus phase is indeed olivine. Choose menu option 4 and see what happens. Use menu option 14 to write out a .melts file of the final liquid composition. [EX 2 PT 3 OUTPUT]
· The target Mg# corresponds to a MgO content of 16.88 wt % in the PRIMELT2.xls spreadsheet, which means that we want to compare the MELTS liquids (in Liquid_comp_tbl.txt) to entries between lines 0 wt % and 20 wt% olivine addition (lines 47-68 in the spreadsheet). Plot FeO versus MgO for the two fractionation correction paths. Why do they differ?
· The spreadsheet reports KD for each step as olivine is added back into the system. Calculate KD for each step in the MELTS output using the formula KD = (FeO_olivine/MgO_olivine)/(FeO_liquid/MgO_liquid) on a molar basis. How do the values you get compare with the values from the spreadsheet?
5. Second exercise, 4th part: using amoeba
Make a new directory and copy frac_xtal_env.txt from the directory you used for the last exercise and make two new .melts files.
The major element composition for AmoebaTarget.melts is:
Use initial pressure: 500, initial temperature: 1100
Log fO2 Path: FMQ, Log fO2 Delta: +1.0
The major element composition for AmoebaGuess.melts is:
Use initial pressure: 500, initial temperature: 1300
Log fO2 Path: FMQ, Log fO2 Delta: +1.0
The AmoebaTarget.melts sample is from the Lau Basin. Using the existing frac_xtal_env.txt verify that the liquidus phase is clinopyroxene and so we cannot use the reverse fractionation routine from the previous exercise to estimate the primary melt composition. Instead we will use the amoeba function (menu option 17) to find the primary melt composition that when forward fractionated generates the best fit to the target composition. The amoeba routine requires an initial guess, which is the AmoebaGuess.melts file, but we also need to fix a MgO (or Mg#) value for the parental liquid via the settings file. Make a copy of frac_xtal_env.txt, called amoeba_env.txt, and edit it.
ALPHAMELTS_FRACTIONATE_TARGET true (this must be set for amoeba to work; it should already be set)
ALPHAMELTS_MGO_TARGET 11.7 (MgO in wt % of the parental liquid)
Using the new settings file with run_alphamelts.command, read in the AmoebaGuess.melts composition. Next call option 17 and enter the target composition. Choose the default standard deviations (see Amoeba.melts in the install folder). Amoeba will take quite a long time to run but when it finishes write out the modeled parental melt composition as a .melts file. Then do a forward fractionation run (menu option 4) and write out the modeled target composition. [EX 2 PT 4 OUTPUT]
· Make Harker plots for the modeled liquid line of descent. Which oxides are well fit and which are not? What might you try to improve the chi square fit?
· Try a forward fractionation run using the AmoebaGuess.melts file (without using amoeba). How does the modeled liquid line of descent compare?
6. Third exercise, 1st part: phase diagram mode and dry polybaric continuous melting
Make another new folder. Into this one, copy isentropic_melt_env.txt and Workman_Hart_DMM.melts from the installation folder. Make a subdirectory for the output files so that they do not get overwritten later in the exercise.
Edit isentropic_melt_env.txt to customize your setup:
Note this is a pMELTS calculation now, better for high pressure
Note ALPHAMELTS_VERSION isentropic, meaning we’ll be changing P at constant entropy as we step through the calculation (unless we are in phase diagram mode).
Change ALPHAMELTS_DELTAP to +1000 (we’re going to do an ‘isograd’ calculation first).
Remove the comment ‘!’ from ALPHAMELTS_CONTINUOUS_MELTING true and ALPHAMELTS_MINF 0.005 in order to get near-fractional melting with 0.5% residual porosity.
Remove the comment ‘!’ from ALPHAMELTS_SAVE_ALL true (we are going to calculate a couple of paths in one run)
Remove the comment ‘!’ from ALPHAMELTS_INTEGRATE_FILE integrate.txt
You need to make two small edits to the input file Workman_Hart_DMM.melts. pMELTS does not know how to put K2O or P2O5 into a subsolidus peridotite assemblage, so if you include these as major elements you won’t be able to start below the solidus. So change them to trace elements.
Initial Composition: K2O 0.006
Initial Composition: P2O5 0.019
Initial Trace: K 50
Initial Trace: P 20
First we are going to try to calculate the dry solidus for this bulk composition. Start run_alphamelts.command using the ‘-p path’ command line switch and read in the .melts files in the normal way. Using option 2 set the initial temperature and pressure to 1350 °C and 10000 bars respectively. Turn on phase diagram mode and then call option 4. Use a superliquidus start and then try to set F to zero with ‘quick search’…
O.K. so that didn’t work! When it hangs press ctrl+c to cancel the run. This illustrates a general rule that it is much more difficult to do calculations right on the solidus (as MELTS must keep adding and removing phases from the assemblage) than just above or below it. Instead we will try to find the effective solidus, which is limit above which melt will be extracted, i.e. the path F = ALPHAMELTS_MINF.
Repeat the steps above but this time enter a negative value for F to get the default value, which is actually ALPHAMELTS_MINF when ALPHAMELTS_CONTINUOUS_MELTING is set. The calculation will step through pressure until it hits ALPHAMELTS_MAXP. As we have just hit one of the pressure or temperature boundaries if you choose option 2 you will be given the opportunity to reset ALPHAMELTS_DELTAP etc.. Choose option 2. Choose -100 for DELTAP (the original value, i.e. -1000, is too big) and leave everything else unchanged.
Next calculate the polybaric continuous melting path starting at the ‘solidus’ at 4 GPa. Remember to turn phase off phase diagram mode first. We could turn phase diagram mode back on afterwards but the boundaries calculated would be for the current bulk composition, which is the depleted residue of polybaric melting, and not the original bulk composition.
Instead make new subdirectories and, using the ‘-p path’ switch, do a few more alphaMELTS runs. In the first, calculate the high temperature olivine-in boundary between 1 and 4 GPa. Then calculate the high-pressure boundary of the spinel-garnet transition starting at about 3.8 GPa and 1700 °C. For this second calculation it is preferable to step in temperature and search in pressure. To flag this set ALPHAMELTS_DELTAP to zero and ALPHAMELTS_DELTAT to some nonzero value (e.g. -10); note that phase diagram mode ignores the value of ALPHAMELTS_MODE so you can leave it as ‘isentropic’.
Fill in as much of the pseudosection as you feel inclined to. To calculate the high temperature orthopyroxene-in boundary between 1 and 4 GPa you will probably need to use the ‘special monotonic search for troublesome phases’. You will also find it easiest to start the calculation at a pressure where orthopyroxene is the liquidus phase (so the boundary is easier to locate) and then track up and down pressure from there as separate calculations. If you extend the calculations down towards 1 bar you will probably need to twiddle the temperature when alphamelts gets stuck.
· Plot a partial P-T pseudosection for the chosen bulk composition. Is the position of the spinel-garnet transition realistic?
7. Third exercise, 2nd part: polybaric continuous melting using pHMELTS
Make another new subdirectory. Into this one, copy isentropic_melt_env.txt and Workman_Hart_DMM.melts from the previous exercise.
Edit isentropic_melt_env.txt to customize your setup:
Note ALPHAMELTS_VERSION isentropic, meaning we’ll be changing P at constant entropy as we step through the calculation.
Change ALPHAMELTS_DELTAP to -100 (-1000 is too big).
Change ALPHAMELTS_MINP to 1 (You’re not supposed to use pMELTS below 10000 bars, but we want to continue our calculation up to the base of the crust)
Remove the comment ‘!’ from ALPHAMELTS_DO_TRACE and ALPHAMELTS_DO_TRACE_H2O to make this a pHMELTS calculation that partitions water between the nominally anhydrous minerals and the melt.
Put back the comment ‘!’ on ALPHAMELTS_SAVE_ALL (we only want the output from the actual melting calculation)
First thing we need is to obtain the initial entropy that corresponds to our desired potential temperature. Potential temperature is defined as the T of an equilibrated but metastable subsolidus assemblage at 1 bar with the same total entropy as the starting peridotite down in the mantle. So if we want to calculate for a potential temperature of 1350 °C, we need to get the entropy of our bulk composition, subsolidus, at 1350 °C and 1 bar. But this is metastable, so we’ll have to turn off the liquid phase temporarily. So:
choose option 1 to read the input file, tell it the filename. Note that it adds H2O to the trace element list automatically.
choose option 2 and set T = 1350 °C and P = 1 bar.
choose option 9 and suppress the liquid (0).
choose option 3 to equilibrate, option 0 for subsolidus initial guess, and give it the list of phases (one per line): olivine, orthopyroxene, clinopyroxene, spinel, feldspar; and then ‘x’ to finish the list. This carries out a special norm calculation that assigns your bulk composition to these solid minerals.
It should run and give you an equilibrated assembage at the desired conditions; now it knows the entropy we want, so choose option 7. It tells you the current entropy; in the future to recover this potential temperature, you can just put this number as an initial entropy in the input or settings files, or type it here at option 7.
Now we_re ready to add the H2O to the anhydrous minerals.
Choose option 6 from the menu.
As we are doing pHMELTS (so the algorithm controls whether the aH2O buffer is on or not) we are given the option to set total H2O in ppm instead.
Set ppm H2O to 150.
Now choose option 2 and set P to 40000 bars. It doesn’t matter what you do with T, because it will change to find the desired entropy.
Choose option 3. Because you already have a valid initial guess, it won’t ask you superliquidus or subsolidus. Now you have a subsolidus, high-pressure assemblage, with the H2O in the minerals, and the right entropy to be on an adiabat with potential temperature 1350 °C. Hooray. Let’s melt it:
Choose option 9 and turn liquid back on.
Choose option 4 and watch it go. You’ll see liquid come in around 37000 bars; note that the H2O activity is about 0.1, suggesting that this peridotite would be saturated at this pressure with 10x more water than we put in. You can get a sense of the melt productivity from the mass of liquid appearing and being fractionated at each step; it is very small down near the damp solidus. At some point you’ll see garnet go out. You should note that this calculation is a lot slower than the simple fractional crystallization we were doing before; imposing entropy and using the pHMELTS H2O partitioning trick both slow it down. It will suddenly speed up at 8000 bars when all the H2O runs out.
It should successfully go all the way to 1 bar, leaving a harzburgite residue. Now choose option 16 to write the integrated output files. Selecting ‘1’ carries out the operation to integrate all the increments of fractional melt throughout the melting regime according to the 2-D (passive flow) and 1-D (active flow) geometries for mid-ocean ridges. Use the simple rectangle rule. I usually label these files with extensions .int and .traceint. Here you can also choose to write .melts input files with the primitive aggregate melt compositions that you can then use for fractionation calculations, but we can skip that here.
Yikes! That is the whole procedure. It was long, but you’ve just carried out an amazingly sophisticated calculation incorporating all kinds of cutting-edge ideas about the mid-ocean ridge melting regime. At least I think so.
There is a huge amount of information in your output files now, describing every step of the decompression, and everything about the major elements, trace elements, liquid composition, residual mineralogy, P-T path, etc. But let’s just look at the major element integrated output file that you wrote with option 12.
· The first line gives the estimated parameters for melting all the way to the base of the igneous crust, appropriate for fast-spreading ridges. The entries on the first line are:
· Pc, the pressure at the base of the crust in bars
· FBbase, the mean extent of melting for passive flow (see Plank et al. 1995, ‘The Meaning of Mean F’)
· Zcbase, the thickness of the crust in km for passive flow (for a simple crustal density choice), evidently we want this to be near 6 or 7 km for normal ocean crust. Is it?
· <P>base, the mean pressure of melt extraction for the passive-flow case.
· Pc1D, Fmax1D, Zc1D are crustal thickness and maximum extent of melting for the columnar, plume-like, or active-flow melting regime (see Forsyth 1992).
· SiO2_2D - H2O_2D is the major element composition of the primary aggregate liquid for melting up to base of a passive flow crust. Did we get a plausible primitive N-MORB composition? What do you think?
· SiO2_1D - H2O_1D is the major element composition of the primary aggregate liquid for 1-D integration of an active flow column at the base of that crust.
· If you want to describe a melting regime that stops at depth because of cooling from the surface (appropriate for slow or ultra-slow spreading?), the subsequent lines in this file give the melt compositions and integrated melt column thicknesses (in bars, under iFdP) for stopping at any pressure from the solidus on down. This assumes a trapezoidal melting regime embedded in a passive flow (see Shen and Forsyth, 1995).
· You can make a plot of F vs. P from this integrated output file and pick out the following features of the melt production curve: first melt extraction (when the system reaches the ALPHAMELTS_MINF threshold of 0.5% melting), subtle upward kink at garnet-out, obvious downward kink at cpx-out.
· To see melt productivity (the derivative of F vs. P), better to open the Phase_mass_tbl.txt file, since this contains entries all the way down to the solidus (not just once melt extraction begins). The difference between the sum of the solid masses (columns D through H) on one line and on the next line is the mass of liquid produced in that step. If you multiply this by 10 you get dF/dP in %/kbar. Plot this and you can see: the solidus, the exhaustion of garnet, the peak before cpx-out, the drop at cpx-out, the productivity of harzburgite melting.
8. Third exercise, 4th part: trace elements
Make another new subdirectory. Into this one, copy isentropic_melt_env.txt and Workman_Hart_DMM.melts from the previous exercise. Repeat the procedure from the previous exercise but miss out setting the water content (option 6) so that the calculation runs faster. You may want to make a batch file as you’ll be repeating the same calculation a couple of times. Look at the trace element integrated output file and note that the elements are output in the same order that you input them in the .melts file.
Reorder the trace elements in the melts file to your preferred ‘spiderdiagram’ order. Edit isentropic_melt_env.txt:
Remove the ‘!’ before ALPHAMELTS_TRACE_NORMALIZATION 2
This will normalize most of the output trace elements to the Workman & Hart source but, as P and K are not included as trace elements in alphaMELTS by default, you will also need to edit DMM.melts.
Initial Trace: K 50
Initial Trace: P 20
Initial Trace: K 1
Initial Trace: P 1
Rerun the calculation. Then edit isentropic_melt_env.txt.
Remove the ‘!’ before ALPHAMELTS_ TRACE_DEFAULT_DPTX true (to turn on Wood & Blundy style D(P, T, X))
Run again, making sure that the previous output is not overwritten.
· Plot spiderdiagrams and normalized REE plots to compare the 2-D aggregate melt composition with and without D(P, T, X). Do the near solidus melts differ? How about the aggregate composition?