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

Initiating continuous melting

Started by jakemoore, July 24, 2008, 11:20:50 AM

Previous topic - Next topic

jakemoore

I'm trying to run continuous melting for a MORB composition along an adiabat from 3 -> 2 GPa.  The problem is, I'm getting the same results for when I have continuous melting turned on and off.  Liquids, solids...all the same.  I've looked through all the documentation and tried a number of permutations, but I can't identify it.  I'm sure it's something simple.

./run_adiabat.pl -p output -f morb_ad.txt -b batch_ad_cont.txt

**morb_ad.txt command file
ADIABAT_VERSION pMELTS
ADIABAT_MODE isentropic
ADIABAT_DELTAP -100
ADIABAT_MAXP 30000
ADIABAT_MINP 20000
ADIABAT_CONTINUOUS true                             !commented out for batch
ADIABAT_MINF 0.01                                       !commented out for batch
ADIABAT_CRASH_FILE adiabat.out-gafMORB
ADIABAT_CELSIUS_OUTPUT true

**gafMORB.melts melts file
Title: MORB from Gaffney
Initial Composition: SiO2 48.68
Initial Composition: TiO2 1.01
Initial Composition: Al2O3 17.64
Initial Composition: Fe2O3 0.89
Initial Composition: Cr2O3 0.0425
Initial Composition: FeO 7.59
Initial Composition: MgO 9.1
Initial Composition: CaO 12.45
Initial Composition: Na2O 2.65
Initial Composition: K2O 0.03
Initial Composition: P2O5 0.08
Initial Composition: H2O 0.2
Initial Temperature: 1500
Initial Pressure: 30000
Increment Pressure: -100
log fo2 Path: None

**batch_ad_cont.txt batch file
1
gafMORB.melts
4
0
garnet
orthopyroxene
clinopyroxene
x
11
adiabat.out-gafMORB
0


--Jacob

Paula

Hi Jacob,

I tried the runs exactly as you described (except that they were on Linux and not Mac) and definitely got different results for batch and continuous melting.  You can check by looking at the melt fraction printed to the screen.  For the batch case it quickly exceeds 0.4 and the final value I saw was almost 0.6.  For the continuous run it stayed at a little over 0.01 since that is the value of MINF; the last printed melt fraction was 0.0130739.  If you aren't getting something similar to this on the screen then there may be a more serious problem.  In that case I'll run the tests on something closer to your set up to see if we can find it.

It's more likely though that the files are either not getting written properly or are getting overwritten.  I assume you are moving or copying all the output between the runs and / or using a slightly different output file name.  The processed output will always be called by the same names: 'Liq_tbl.txt', 'Liq_comp.txt'.  So some care is needed there obviously.

A fairly common problem is that a user does a run and then opens an output file in Excel, say, to see if it looks O.K..  They may or may not back up the file elsewhere.  Either way, if they forget to close the original copy (i.e. the one that's open in Excel) then on subsequent runs Adiabat_1ph or run_adiabat.pl or both can be denied write access.  So the file will stay as the old version.  If it's the main output file, before run_adiabat.pl processing, that's already open then none of the output files will be changed.  However, their time stamps may be updated so, confusingly, it could look like new output has been generated (won't go into the details of why this is the case...).  Adiabat_1ph or run_adiabat.pl should give a warning if a file couldn't be opened for any reason.  But such errors can be hard to spot amongst all the other screen output, especially if you are running in batch or automatic mode.  In addition, the system may give an error - the exact nature is OS dependent, of course.

Hope that helps you track down the problem.  If it doesn't work, let me know and I'll see what else we can try.

Cheers,
Paula

jakemoore

Paula,

I tried running it again, even putting the continuous and batch runs in different folders with the -p switch, but all the files came out the same.  I tweaked the input file names to make sure I was running the proper files, but the same env variables and batch file content is as before.

./run_adiabat.pl -p output/cont -f morb_ad_cont.txt -b batch_ad_cont.txt

I noticed a couple of errors when I ran the continuous files (below), and I included the first few lines of the run.  Even though the batch file is set for subsolidus, and minerals are input, it just went straight to superliquidus.  You can also see that it jump straight to F ~= 0.4, the same point as the batch.  I made sure to have Excel and any text editors closed that could have had open copies of any files, to prevent overwriting.  The directories were blank before the run.  And I even ran the continuous model in a new terminal window after restarting Terminal.

What else can I provide?  Do I have the env variables set correctly?  It's not an end of line thing is it?


Macintosh:adiabat_1ph Jacob$ ./run_adiabat.pl -p output/cont -f morb_ad_cont.txt -b batch_ad_cont.txt
Odd number of elements in hash assignment at ./run_adiabat.pl line 114.
Use of uninitialized value in list assignment at ./run_adiabat.pl line 114.
Use of uninitialized value in list assignment at ./run_adiabat.pl line 114.
Use of uninitialized value in list assignment at ./run_adiabat.pl line 114.
Use of uninitialized value in list assignment at ./run_adiabat.pl line 114.
ADIABAT_MINF 0.01
Use of uninitialized value in concatenation (.) or string at ./run_adiabat.pl line 258.
ADIABAT_CONTINUOUS?true
ADIABAT_MODE isentropic
ADIABAT_CELSIUS_OUTPUT true
ADIABAT_CRASH_FILE output/cont/adiabat.out-cont
ADIABAT_MAXP 30000
ADIABAT_VERSION pMELTS
ADIABAT_DELTAP -100
ADIABAT_MINP 20000
Checking for updates..


Your choice: Superliquidus (1) or subsolidus (0) initial guess ? Phase to include (by name, lower case) (x when done): Phase to include (by name, lower case) (x when done): Phase to include (by name, lower case) (x when done): Phase to include (by name, lower case) (x when done): WARNING: Not sure how to solve w/o quartz or olivine!
Adding spinel to handle Cr2O3.
Adding whitlockite to handle P2O5.
Adding feldspar to handle K2O.
Adding water to initial guess assemblage
Silica error of -0.033540
Error in initial guess routine -- using superliquidus start
Unbuffered initial guess at: P 30000.000000, T 1500.000000
liquid: 100.363 g 48.50 1.01 17.58 0.89 0.04 7.56 9.07 12.41 2.64 0.03 0.08 0.20
Activity of H2O = 0  Melt fraction = 1
...Adding the solid phase garnet to the assemblage.
...Adding the solid phase clinopyroxene to the assemblage.
...Adding the solid phase spinel to the assemblage.
Initial Adiabat_1ph calculation at: P 30000.000000, T 1500.000000
liquid: 39.933 g 54.29 1.63 16.64 0.55 0.07 7.18 4.23 10.11 4.52 0.08 0.20 0.50
Activity of H2O = 0.00909533  Melt fraction = 0.397883
garnet: 24.894580 g, composition (Ca0.22Fe''0.27Mg0.52)3Al2Si3O12
clinopyroxene: 35.483215 g, composition cpx Na0.17Ca0.70Fe''0.13Mg0.59Fe'''0.05Ti0.03Al0.63Si1.72O6
spinel: 0.052173 g, composition Fe''0.46Mg0.55Fe'''0.09Al1.21Cr0.68Ti0.01O4
Setting reference Entropy to current entropy = 271.366


--Jacob

Paula

Hi Jacob,

It looks like there is an unrecognised character in your file, which is showing up as a question mark on screen.  All the errors about 'odd number of elements in hash assignment' and 'use of unitialized value...' are the result of the script not being able to find any white space (spaces or tabs) delimiting the variable from its value.  So it thinks the variable is actually 'ADIABAT_CONTINUOUS?true' and that the value is missing.

Quote from: jakemoore on July 26, 2008, 09:41:12 AM
Macintosh:adiabat_1ph Jacob$ ./run_adiabat.pl -p output/cont -f morb_ad_cont.txt -b batch_ad_cont.txt
Odd number of elements in hash assignment at ./run_adiabat.pl line 114.
Use of uninitialized value in list assignment at ./run_adiabat.pl line 114.
Use of uninitialized value in list assignment at ./run_adiabat.pl line 114.
Use of uninitialized value in list assignment at ./run_adiabat.pl line 114.
Use of uninitialized value in list assignment at ./run_adiabat.pl line 114.
ADIABAT_MINF 0.01
Use of uninitialized value in concatenation (.) or string at ./run_adiabat.pl line 258.
ADIABAT_CONTINUOUS?true

The program isn't really going straight to superliquidus.  It tries to find a subsolidus starting guess but fails to find a norm fit to the bulk composition.  This is not surprising given that the routine is really intended for peridotite compositions,  so the solid phases it tries to use are biased towards that.  The routine sometimes works for basaltic compositions but less reliably.  It needs olivine or quartz in the list of phases, which is why you are getting the 'Silica error', but even with olivine added it cannot find a starting guess.  It's just hard to make a basalt out of olivine, two pyroxenes, garnet, spinel plus the other phases required to handle minor elements!  But it doesn't matter anyway - a superliquidus start is often perfectly fine.  The fully thermodynamic step adds solid phases as necessary (i.e. garnet, cpx and spinel) just as it would have dropped opx and olivine if a sub-solidus starting guess had been found.

If you get the continuous melting run working you will still see an initial burst of 40% melting.  Fractional or continuous melting is approximated by a batch melting step (isentropic in this case) followed by a melt extraction step (where entropy is removed with the melt) so the first melting step will always be the same for batch or continuous runs.  Once the initial melt transient is removed the melt fraction for continuous melting will drop dramatically.

Hope it works now.
Paula