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

isenthalpic AFC

Started by malidejo, July 02, 2012, 05:09:22 PM

Previous topic - Next topic

malidejo

Hi Paula,
I just attended the AlphaMELTS workshop in Montreal, and found the calculation exaples very heplful. I am trying to do some AFC calculations in which a basaltic liquid assimilates a granite at a variety of initial mid-crustal temperatures (suprasolidus to ?). I would like to try doing this in isenthalpic mode at a constant pressure of 5 kbar. Would you be able to outline the sequence of steps that I need to follow in order to to these calculations correctly? If you need me to be more specific, I will be happy to send you more information.
Thank you,
Dejan

Paula

#1
Hi Dejan,

I'm glad you found the workshop helpful. Good to know.

Isenthalpic AFC generally takes two alphaMELTS runs: one to equilibrate the granite composition and one to do the actual AFC. If you want to specify the phase compositions and proportions making up the assimilant, instead of doing the calculation using the granite bulk composition, then try the downloadable graphical user interface to MELTS or Rhyolite-MELTS. There's a bit more about the alphaMELTS and GUI assimilation routines in the appendix to Thompson et al. '97 including the slight differences (alphaMELTS was still called adiabat_1ph at that point).

Let's suppose your granite composition is in granite.melts, basalt composition is in basalt.melts and the temperature of the assimilant is 600oC.

For the first calculation use isobaric mode e.g. you could modify frac_xtal_env.txt by commenting out the ALPHAMELTS_FRACTIONATE_SOLIDS line and save it as xtal_env.txt. Run alphaMELTS using 'run_alphamelts.command -f xtal_env.txt'. Read in granite.melts and do a single calculation at 5000 bars and 600oC. You will need to use 'Superliquidus' start as the subsolidus norm routine is unlikely to work for granite compositions. If the calculation fails, try one or more the following:

  • Set ALPHAMELTS_MINT to 600 and start the calculation at higher temperature. Use option 4 to run down to 600oC.
  • If it doesn't get down to 600oC then set ALPHAMELTS_MINT to the last good point. Once the option 4 run has finished, set the temperature to 600oC using option 2.

If you are using a fO2 buffer then this may cause problems subsolidus. In Rhyolite-MELTS, the buffer is turned off automatically if the subsolidus fO2 routine hangs. Eventually we'll implement something similar but in the meantime...

  • Try running to the last good point. Then choose option 2 to reset ALPHAMELTS_MINT and option 5 to turn off the fO2 buffer (the order of these operations is important). Then call option 4 again.
  • Alternatively, set ALPHAMELTS_LIQUID_FO2 to true in granite_env.txt, which means the buffer will turn off as the solidus is crossed.

Once option 4 is finished, verify that the temperature is set to 600oC (even if you couldn't get the calculation to run all the way there). Then write out a restart file using option 13.

For the second calculation you could modify another copy of frac_xtal_env.txt, called AFC_env.txt. Change ALPHAMELTS_MODE to 'isenthalpic' and remove the '!' from the start of the ALPHAMELTS_ASSIMILATE line. Set both ALPHAMELTS_DELTAP and ALPHAMELTS_DELTAT to zero for the reasons explained in the ALPHAMELTS_ASSIMILATE section of the documentation. If you want to do the AFC calculations with the fO2 buffer, then uncomment the ALPHAMELTS_IMPOSE_FO2 line too.

Restart alphaMELTS using AFC_env.txt. Read in basalt.melts. Do a single calculation (either at a fixed temperature or a 'find liquidus', as described in the getting started tutorial). Choose option 4 to execute and you should be asked for the number of assimilant MELTS files. Answer '0' to use a binary restart file instead. Enter the filename and mass, in grams, of assimilant to be added at each iteration.

If a single calculation at 5000 bars and 600oC works for the composition in granite.melts you can actually bypass some of the above process. Simply, start alphaMELTS with AFC_env.txt as above. Enter '1' for the number of assimilant MELTS files when it asks and read in granite.melts. alphaMELTS will do a single calculation, with a superliquidus start, for the composition, pressure and temperature in granite.melts. Otherwise, alphaMELTS will calculate the enthalpy at the temperature in the binary restart file (i.e. 600oC) for the composition / assemblage in the restart file (which might correspond to a slightly higher temperature).

Note that the fO2 conditions for the AFC calculation will be the system ones (e.g. set at the menu or in basalt.melts). The fO2 buffer in the assimilant file, or lack thereof, will only be used for the initial calculation using the granite composition.

Hope that helps,
Paula

P.S. The forum may be down for a bit later this week as I'm intending to do some upgrades. If you have further queries and can't post here then just send me an e-mail. You can find my address at the bottom of most of the MAGMA / alphaMELTS pages. Thanks!

malidejo

Hello again,
Thank you for your last reply- it definitely helped me understand the concept behind the caluclations that I am trying to do. Unfortunately, I am still having problems executing the calculations.


1) I was only able to equilibrate the assimilant to ~ 710 C (11.5 % liquid, 7 wt.% H2O !). I tried all of the steps you described, but to no avail. My assimilant composition is pasted below, in case you are able to take a closer look

Title: GR2-12 contaminant
Initial Composition: SiO2 72.65
Initial Composition: TiO2 0.16
Initial Composition: Al2O3 14.79
Initial Composition: Fe2O3 0.00
Initial Composition: MnO 0.02
Initial Composition: FeO 0.92
Initial Composition: MgO 0.62
Initial Composition: CaO 1.64
Initial Composition: Na2O 3.97
Initial Composition: K2O 4.04
Initial Composition: P2O5 0.07
Initial Composition: H2O 0.8
Initial Trace: Rb 83
Initial Trace: Ba 171
Initial Trace: Th 32.6
Initial Trace: U 0.75
Initial Trace: Nb 1.8
Initial Trace: Ta 0.06
Initial Trace: La 64.7
Initial Trace: Ce 109
Initial Trace: Pr 9.89
Initial Trace: Pb 17.7
Initial Trace: Sr 361
Initial Trace: Nd 32.4
Initial Trace: Sm 3.7
Initial Trace: Zr 164.2
Initial Trace: Hf 4.6
Initial Trace: Eu 1.03
Initial Trace: Gd 1.93
Initial Trace: Tb 0.18
Initial Trace: Dy 0.75
Initial Trace: Y 3.1
Initial Trace: Ho 0.12
Initial Trace: Er 0.32
Initial Trace: Tm 0.036
Initial Trace: Yb 0.22
Initial Trace: Lu 0.026
Initial Trace: Cr 19.3
Initial Trace: Ni 3
Initial Temperature: 1063.16
Final Temperature: 710.16
Increment Temperature: -1.00
Initial Pressure: 5000.00
Final Pressure: 5000.00
Increment Pressure: 0.00
dp/dt: 0.00
log fo2 Path: FMQ
log fo2 Delta: 0.00

2) I had a go at an AFC calculation, assuming the assimilant initial T was 750 C, and using an appropriate binary restart file.
The error that initially led me to seek help keeps recurring (pasted below). The liquidus T of my basaltic magma is ~ 1200C, so I am puzzled as to why the calculation begins at a temperature of ~5000. I was able to run a calculation by changing the T max in the afc_env.txt file to 5000+, but that resulted in pure assimilation over a 4000 degree interval (1000 + % of the original magma mass).
I look forward to any help that you may offer
Dejan


How many AFC iterations to perform? 30
Number of assimilant MELTS files (or '0' for binary imput file)? 0
Assimilant filename: gr212a
Mass of enriching agent to be added in grams per cycle
: 1
Initial alphaMELTS calculation at: P 5000.0000 T 4948.067483
liquid: 100.132 g 46.96 0.51 16.80 2.74 7.80 0.19 10.83 9.40 2.63 1.38 0.04 1.51

Activity of H2O = 0.112137  Melt fraction = 1
WARNING: Maximum Temperature exceeded
Successful return from alphamelts...

Paula

Hi Dejan,

1) MELTS doesn't have many hydrous solid phases. There are also issues with the hornblende and biotite models so it can be difficult to stabilise these phases, even though they are included. So for many hydrous compositions there is no solidus. What is the phase assemblage of the granite that this bulk composition is for? If it contains significant amphibole or mica then you might have to use the GUI version of MELTS to force it to assimilate those minerals. Otherwise, try removing water from the bulk composition as a start.

I would zero out MnO for similar reasons: it only goes into olivine and rhm-oxide.  The rhm-oxide model included in MELTS is a little out of date. It's since been updated by Ghiorso and Evans 2008, and incorporated into the provisional xMELTS model. But it's not included in MELTS as it would not be self-consistent with the liquid model etc..

2) Did you do a 'Find Liquidus' type exercise before or did the crazy temperatures just turn up with option 4? 'Find Liquidus' (either GUI or alphaMELTS phase diagram mode) doesn't work well for water saturated compositions but it doesn't appear that the bulk composition is water saturated. Probably it's just an artefact of assimilating the metastable 11.5 wt% liquid and 7 wt% water i.e. the enthalpy of the assimilant is not realistic. If not, let me know the composition of the basalt and I'll see if I find the problem.

Cheers,
Paula

malidejo

Hi Paula,
thanks for the speedy reply.
1) The granite that I am using as an assimilant is a 2-feldspar biotite (~5%) granite.
I will switch to a GUI version of melts if it is necessary, but I would prefer to stick with alphaMELTS as I feel reasonably proficient at using the program now, and am a windows user 95% of the time. Is it possible to generate the desired binary files using the GUI version and then to bring them into alphaMELTS? 

2) I did "find the liquidus" before proceeding with calculation #4. The basaltic liquid that I'm using is definitely not H2O saturated (aH2O = 0.16). The composition of the basalt (-MnO which I took out ) is pasted below.

Title: LREEbasalt
Initial Composition: SiO2 46.12
Initial Composition: TiO2 0.51
Initial Composition: Al2O3 16.61
Initial Composition: Fe2O3 11.37
Initial Composition: FeO 0.00
Initial Composition: MgO 10.00
Initial Composition: CaO 9.36
Initial Composition: Na2O 2.58
Initial Composition: K2O 1.34
Initial Composition: P2O5 0.04
Initial Composition: H2O 1.50
Initial Trace: Rb 173
Initial Trace: Ba 220
Initial Trace: Th 0.21
Initial Trace: U 0.23
Initial Trace: Nb 1.5
Initial Trace: Ta 0
Initial Trace: La 3.18
Initial Trace: Ce 6.3
Initial Trace: Pr 0.85
Initial Trace: Pb 12
Initial Trace: Sr 80.7
Initial Trace: Nd 3.74
Initial Trace: Sm 1.10
Initial Trace: Zr 26
Initial Trace: Hf 0.8
Initial Trace: Eu 0.53
Initial Trace: Gd 1.68
Initial Trace: Tb 0.30
Initial Trace: Dy 1.89
Initial Trace: Y 11.5
Initial Trace: Ho 0.41
Initial Trace: Er 1.22
Initial Trace: Tm 0.20
Initial Trace: Yb 1.29
Initial Trace: Lu 0.19
Initial Trace: Cr
Initial Trace: Ni
Initial Mass: 100.0
Initial Temperature: 1298.56
Final Temperature:600.00
Increment Temperature: -1.00
Initial Pressure: 5000.00
Final Pressure: 5000.00
Increment Pressure: 0.00
dp/dt: 0.00
log fo2 Path: FMQ
log fo2 Delta: -1.00
Suppress: nepheline
Suppress: leucite
Suppress: garnet
Suppress: sillimanite
Suppress: andalusite
Suppress: kyanite
Suppress: corundum
Fractionate: olivine
Fractionate: orthopyroxene
Fractionate: clinopyroxene
Fractionate: amphibole
Fractionate: biotite
Fractionate: feldspar
Fractionate: spinel
Fractionate: rhm oxide

Finally, I was able to execute calculations in isobaric mode using a variety of starting assimilant temperatures. Although the calculations always went to completion, hydrous minerals never crystallized. I hope that you can continue guiding me, as I am very set on producing this model.
Thank you,
Dejan

Paula

Quote from: malidejo on July 14, 2012, 08:49:08 AM
1) The granite that I am using as an assimilant is a 2-feldspar biotite (~5%) granite.
I will switch to a GUI version of melts if it is necessary, but I would prefer to stick with alphaMELTS as I feel reasonably proficient at using the program now, and am a windows user 95% of the time. Is it possible to generate the desired binary files using the GUI version and then to bring them into alphaMELTS? 

The GUI doesn't have binary file I/O and, even if it did, the variable structure that stores the system state differs somewhat from the alphaMELTS version (no trace elements for a start...). So the two would not be compatible.

One thing that I'm working on for alphaMELTS 1.3 is a lightweight Linux VirtualBox installation that would be an alternative way to run alphaMELTS on Windows (bypassing the need to install Perl, set the path etc.). If you are proficient with the native Windows version of alphaMELTS then there's little reason to switch from that but you could use the virtual machine to run the GUI.

Another thing that occurs to me is that we could add a GUI-like assimilation option that reads in multiple MELTS files, one for each mineral phase, and then uses the compositions / phase proportions to calculate the total enthalpy of the assimilant. If it works it can go into v1.3 too. Let me think about how best to incorporate that in the code and get back to you.

Quote
2) I did "find the liquidus" before proceeding with calculation #4. The basaltic liquid that I'm using is definitely not H2O saturated (aH2O = 0.16). The composition of the basalt (-MnO which I took out ) is pasted below.

Yes, the 'Find Liquidus' is working fine, I just checked. So the problem is almost certainly the liquid and free water in the binary file version of the assimilant. Makes sense that the isobaric calculation would work though I'm not surprised that you didn't get hydrous phases (not sure what to do about that though...).

Paula

malidejo


Thank you for taking interest in this problem. I really appreciate it
dejan

Paula

Hi Dejan,

Please could you e-mail me MELTS input files, one for each mineral phase in the granite assimilant? 'Use the Initial Mass:' line to define the mineral proportions. No hurry, just when you get a chance.

Thanks,
Paula

P.S. I'm going to move this to the 'Magma chamber processes' board as it's more about how to get the calculation going than what the results of said calculation might show.

Paula

#8
Hi Dejan,

Sorry for the delay. That turned out to be more involved that I expected also I've been busy with various things.

I added an option to use separate mineral phases as assimilant. I will send the v1.3 beta executable to you separately. It turns out that the GUI requires you to cast the minerals into MELTS end members before entering them into the dialogue. For the alphaMELTS version you give wt% oxides instead. For the trace elements, give the bulk assimilant values rather than individual mineral values. You can include them in each mineral file (so you don't get an error due to the trace elements not being in the same order) but it'll only use the vales from the first file you give it.

Note to all users: there will be a small change in v1.3.  Regardless of the type of assimilant file being used (one or more MELTS files or a binary file etc.) it now asks for the amount of assimilant to add each cycle before asking for any file name(s). If you are doing multiple mineral files, just give a negative number for the number of files. If one of your assimilant phases is liquid then give this first - there can be at most one liquid file. Otherwise it doesn't matter what order you give the phases in and multiple instances of a solid solution phases are fine. Use the MELTS phase name and then the file name e.g. 'feldspar', 'alkspar.melts', 'feldspar', 'plagioclase.melts', 'quartz', 'quartz.melts'...  Choose 'x' to finish.

Having done all that it actually turns out that your original problem was a bug! Originally alphaMELTS (or Adiabat_1ph as it was then) always did at least one option 4 calculation before assimilating any material. We changed that a while back so that, by default, it assimilates material for the first option 4 calculation too. If you are not assimilating material then that first calculation is (usually) isobaric / isothermal and the isenthalpic calculations are switched on for the second calculation onwards. However, for isenthalpic assimilation the isenthalpic calculations need to be turned on for the first calculation. The problem was that this was not happening in the manner intended and consequently it was shooting the temperature up to the maximum value.

So, if you use option 7 to impose the current system enthalpy after finding the liquidus, and before choosing option 4 you will probably find that the binary assimilant file works, despite having some liquid and water in the assimilant. Likewise if you give a non-existent file name the first time, which forces it to do one option 4 calculation before any assimilation, then it will probably work too... Please try it and let me know.

Nevertheless, the separate mineral files option is a useful thing to have in there and will probably give you more accurate results as you can force it to use a hydrous sub-solidus assemblage that alphaMELTS can't ordinarily deal with. So I'm glad we added it. There is also a cleaner way to do the first option 4 calculation without any assimilation - just choose the multiple mineral files option, give a mass (doesn't matter what value) and then choose 'x' instead of entering any phases. You will be given one more opportunity to enter the assimilant composition, in whatever manner you wish, on the second calculation.

Cheers,
Paula

malidejo

Hi Paula,
Thanks so much for doing this. It looks pretty straight forward, and the input sequence matches exactly what you described above. Unfortunately each time I try to run the calculation the program crashes straight away and gives me the following message "

Setting reference Enthalpy to current enthalpy = -1.17224e+006
RUN_ALPHAMELTS.COMMAND WARNING: alphamelts may have crashed!
RUN_ALPHAMELTS.COMMAND WARNING: Incorrect format in output file "Phase_main_tbl.
txt".
File has already been processed? Please check that alphamelts ran properly."

Should I perhaps be making changes to my _env.txt file? Or am I skipping a step somewhere?
Thanks
Dejan

Paula

QuoteShould I perhaps be making changes to my _env.txt file? Or am I skipping a step somewhere?

Having seen neither in full, it's a little hard to say ;-)  Here, in no particular order, is what I have in the settings file:

Quote
ALPHAMELTS_VERSION         MELTS
ALPHAMELTS_MODE          isenthalpic
ALPHAMELTS_MINT        700
ALPHAMELTS_DELTAP 0
ALPHAMELTS_IMPOSE_FO2 true
ALPHAMELTS_FRACTIONATE_SOLIDS true
ALPHAMELTS_CELSIUS_OUTPUT true
ALPHAMELTS_ASSIMILATE true
ALPHAMELTS_DO_TRACE true

And this is what I'm typing at the menu prompt:

Quote
1
basalt.melts
10
1
3
1
liquid
1
1.0
1
10
0
4
10
-1
0
x
-1
5.0
feldspar
alkspar.melts
biotite
biotite.melts
feldspar
plagioclase.melts
quartz
quartz.melts
x
0

... where the MELTS files are the modified ones I sent with the executable. I only tested it on Linux so far and it seems to work whether or not I assimilate material for the first option 4 calculation.  I get the same reference enthalpy as you though. Let me know how you get on.

Cheers,
Paula


malidejo

Hi Paula,
My assimilant mass was a little smaller, but in general the input was very similar to your example. I've been playing around a little more, and have managed to successfully assimilate each file individually, as well as groups of three files or less. The program crashes the moment I try to assimilate two feldspar files. I have also increased the assimilant temperature to 800 C for now, thinking that may stabilize the calculation.
Thanks,
Dejan

Paula

Hi Dejan,

Oh, cool, I know what the problem is then. I'll send you an updated executable later. Thanks for looking into it. I'm having some problems with Visual Studio at the moment - I can compile the program on Windows but not debug it. So that was really helpful.

Cheers,
Paula