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

PTpath files

Started by lelkins, February 12, 2018, 02:24:12 PM

Previous topic - Next topic

lelkins

I am trying to calculate a set of partial melting results using pMELTS along an imposed PT path with a PTpath file, but my results keep oscillating between two temperatures in alternating steps. For some runs that has occurred without crashing, while others have run for a while and then crashed. I'd like to do this for a range of compositions, including some that are more mafic (which I know are less well-calibrated in alphaMELTS), but it has been happening for peridotites, too. Maybe the problem has to do with how I am setting up my PTpath files (I don't have a template to work from for those), but I am a little stumped and hope someone can help!

At first I thought the problem was having identical step sizes in both the PTpath file and the pMELTS run (100 bars), so I tried changing step sizes around. I even tried very small step sizes for the input file (10 bars!), but the problem still occurred. I have also tried it for several different peridotite and pyroxenite bulk compositions so far, and the oscillation starts from the very first time step no matter what I use, so I don't think the composition I am using is the problem.

Any tips? I can try more variations on step sizes, but it doesn't seem like that approach is working so far. Maybe the problem is disagreement in the initial conditions? My understanding was that the PTpath file would override any initial T and P settings from the other input files, and I always tweak initial conditions and test the subsolidus assemblage prior to running the model anyway. But maybe I should change something in initial conditions, or change how I am doing the subsolidus calculation first? Here is one set of input files (these particular files are for batch melting, but I also have continuous melting versions):

ALPHAMELTS_VERSION pMELTS
ALPHAMELTS_MODE ptfile
ALPHAMELTS_PTPATH_FILE PTpath_batch.txt
ALPHAMELTS_DELTAP -100
ALPHAMELTS_DELTAT 0
ALPHAMELTS_MAXP 40000
ALPHAMELTS_MINP 1
ALPHAMELTS_MAXT 2400
ALPHAMELTS_MINT 500
ALPHAMELTS_DO_TRACE true
ALPHAMELTS_TRACE_INPUT_FILE trace_Ds.txt
ALPHAMELTS_CELSIUS_OUTPUT true
Initial Temperature: 1400.0
Initial Pressure: 40000.0
Initial Entropy: 261.2

The melts files vary with the type of rock I'm testing, but they are basically laid out the same way. I have been omitting P2O5 and MnO from all of them. Here is one example:

Title: MIX1G of Hirschmann et al 2003
Initial Composition: SiO2 45.6
Initial Composition: TiO2 0.9
Initial Composition: Al2O3 15.2
Initial Composition: Fe2O3 0.15
Initial Composition: FeO 7.8
Initial Composition: MgO 16.67
Initial Composition: CaO 11.48
Initial Trace: Ni 72
Initial Trace: Cr 80
Initial Trace: Rb 37.63
Initial Trace: Ba 472.6
Initial Trace: Th 6.08
Initial Trace: U 1.38
Initial Trace: Nb 55.0
Initial Trace: Ta 2.95
Initial Trace: La 53.25
Initial Trace: Ce 105.16
Initial Trace: Pb 5.07
Initial Trace: Pr 12.47
Initial Trace: Nd 49.13
Initial Trace: Sr 755.5
Initial Trace: Zr 358.84
Initial Trace: Hf 5.51
Initial Trace: Sm 9.64
Initial Trace: Eu 2.96
Initial Trace: Gd 8.3
Initial Trace: Tb 1.13
Initial Trace: Dy 6.34
Initial Trace: Ho 1.11
Initial Trace: Y 32.53
Initial Trace: Er 2.91
Initial Trace: Yb 2.24
Initial Trace: Lu 0.31
Initial Trace: Sc 25.0
Initial Trace: V 230
Initial Trace: Cs 0.12
Initial Trace: Tm 0.39
Initial Temperature: 1400
Final Temperature: 1350
Increment Temperature: 0
Initial Pressure: 40000.0
Final Pressure: 1
Increment Pressure: 100
Log fO2 Path: NONE
Log fO2 Delta: 0.0
Limit coexisting: orthopyroxene
Limit coexisting: clinopyroxene 2

The PTpath files I have tried have just been simple files with two space-delimited columns, the first P in bars and the second T in C. I won't copy the whole thing here, but the last version where I tried really small step sizes started like this:

39999 1447.51
39989 1447.49
39979 1447.47
39969 1447.45
39959 1447.43
39949 1447.4
39939 1447.38

Before that I had a different version with 100 bar step sizes instead, and had the same problem.

The last iteration I saved was for a more mafic bulk composition from above, but as they are all doing the same thing, it's still a reasonable example of what has been happening. Here are the first few lines from the system output file. I have highlighted the temperature oscillations in red text:

Pressure Temperature mass F phi S H V Cp dVdP*10^6 dVdT*10^6 fO2(absolute) fO2(absolute) rhol rhos viscosity aH2O chisqr
39999.00 1447.51 97.170000 0.3526465560971530 0.406215 248.824586 -1082746.439511 28.903687 120.366469 -42.152196 1597.945295 -2.564 -2.564 2.918518 3.665147 3.437 0 0.000
39999.00 1720.66 63.155039 0.0971010701934553 0.108792 168.528491 -686113.180047 17.600227 75.947607 -12.994382 722.244983 -5.535 -5.535 3.202701 3.635380 0.300 0 0.000
39989.00 1447.49 57.275058 0.0001758779488710 0.000222 141.390724 -650879.250816 15.593788 67.081271 -8.155903 574.433837 -1.972 -1.972 2.903620 3.673112 3.551 0 0.000
39989.00 1720.64 57.275058 0.0044104166252568 0.005003 151.413309 -632290.946123 15.764361 67.773330 -8.302792 625.154149 -5.537 -5.537 3.202595 3.635364 0.300 0 0.000
39979.00 1447.47 57.274885 0.0001757765957784 0.000222 141.390106 -650893.434712 15.593810 67.081344 -8.156119 574.427774 -1.974 -1.974 2.903529 3.673096 3.551 0 0.000
39979.00 1720.62 57.274885 0.0044102944143681 0.005003 151.412806 -632305.118252 15.764385 67.773471 -8.303037 625.149845 -5.539 -5.539 3.202488 3.635348 0.300 0 0.000


Any thoughts? I'm not sure what to try next!

Paula

Hi,

I'm not sure quite why it makes it behave like this, but i think the problem is the line:

Quote
Initial Entropy: 261.2

There seems to be a bug as well, though. The 'high' temperature is always the intended temperature in Kelvin.

Try deleting or commenting out that line with a '!'. Let me know what happens, and I'll see if I can reproduce it.


Best,
Paula

lelkins

Thanks, Paula! I have tried that, and it didn't seem to make a difference. I hadn't noticed that the alternating temperatures were in Kelvin, that is interesting. I will keep experimenting, but let me know if you have any other suggestions!

Paula

Hi,

It seems to be a Windows-specific bug to do with line endings, which was in turn introduced while trying to fix line ending problems on Macs. We used to have a lot of line ending problems, especially when MacOS X was fairly new and e.g. Mac's Excel used different line endings to the Terminal program.

It should only affect the PT file because that's the only one that doesn't allow empty lines. I know you don't have empty lines in your file, but the way I was able to reproduce the problem on Linux was to add empty lines. So... if you are indeed on Windows let me know, and I'll send you a fixed version to try!

Paula

lelkins

Thanks, Paula! I'm actually on a Mac, though. I don't think there are empty lines, but I can double check.

I also realized that I am actually still running version 1.7. I had some issues upgrading to 1.8 and never followed through on it. I can try updating it again, though, if the newer version might have fixed this problem.

-Lynne

Paula

Hi Lynne,

Try running file_format.command on the PT file. It may or may not help. The issue (which is more to do with the file having Windows line endings than actually being on Windows) long predates v1.7, so that version will be fine as a test.

Let me know if you still have problems with v1.8.

Paula

lelkins

Aha, that worked! Thanks, Paula!!