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

Using run_adiabat.pl to calculate a single equilibrium melt

Started by spaceman, November 07, 2008, 08:29:39 PM

Previous topic - Next topic

spaceman

Hello,
This is probably not a difficult question, but I'm stuck nonetheless:
While executing run_adiabat.pl to calculate the equilibrium melt for a single bulk composition, temperature, etc., I'm inadvertently doing something so that the program enters an infinite loop, calculating the same melt over and over again. How can this be fixed, so that the program calculates the equilibrium assemblage at P and T and then exits?

what I'm doing:
To find the melt of a MORB bulk composition at 1200C/500bar
run_adiabat.pl -b batch.dat -f single_equilib.txt

batch.dat:
1
morb.melts
3
1
4
0

morb.melts:
Title: dummy
Initial Composition: SiO2 48.68
Initial Composition: TiO2 1.01
Initial Composition: Al2O3 17.64
Initial Composition: Fe2O3 0.89
Initial Composition: Cr2O3 0.03
Initial Composition: FeO 7.59
Initial Composition: MgO 9.10
Initial Composition: CaO 12.45
Initial Composition: Na2O 2.65
Initial Composition: K2O 0.03
Initial Composition: P2O5 0.08
Initial Composition: H2O 0.20
Initial Temperature: 1200.00
Final Temperature: 1200.00
Increment Temperature: 0.00
Initial Pressure: 500.00
Final Pressure: 500.00
Increment Pressure: 0.00
dp/dt: 0.00
log fo2 Path: FMQ
Suppress: cummingtonite
Suppress: nepheline ss
Suppress: leucite ss
Suppress: ortho oxide
Mode: Fractionation

single_equilib.txt
ADIABAT_VERSION MELTS
ADIABAT_MODE isentropic
ADIABAT_DELTAP 0
ADIABAT_DELTAT 0
ADIABAT_MAXP +500
ADIABAT_MINP +500
ADIABAT_MAXT +1200
ADIABAT_MINT 1200
! the next one gives an output file that is always updated; good idea
ADIABAT_CRASH_FILE     morb_adiabat.txt

Paula

Hi,

When you call option 3 or 4 the program loop is like this (somewhat simplified and assuming that any reference quantity, e.g. entropy, has not been set either in the input files or with option 7):

Quote

Do batch calculation at initial P-T conditions.

If called from option 3 then return to menu, else set reference quantity (e.g. entropy) if appropriate for calculation mode.

While P and T do not exceed MINP, MAXP and MINT, MAXT respectively do the following loop:

     ...Do fractionations (e.g. extract melt) or other special calculations (e.g. assimilation, focusing).
     ...Increment P and / or T depending on calculation mode.
     ...Test new P and T against MINP, MAXP and MINT, MAXT.
     ...If one or more P-T limits are exceeded, revert to last P-T conditions and return to menu.
     ...Otherwise do batch calculation at new conditions.

End of loop


As you have the pressure and temperature increments set to 0 it is bound to get into an infinite loop.  P, MINP and MAXP are all equal, and T, MINT and MAXT are similarly, but none of the limits are ever actually exceeded.  If the program is in isentropic mode, DELTAT will be ignored (as the temperature is a function of the imposed entropy, except in the first calculation).  So you need to set DELTAP to any value except 0 and that will make it return.

A simpler alternative would be to set ADIABAT_SAVE_ALL to 'true' so that the crash file is written when option 3 is called.  Then you won't need to call option 4 at all and it won't matter what the MIN, MAX and DELTA variables are set to.  See the documentation for more information.

Hope that helps,
Paula