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

Changing environment settings file

Started by catherinemmj, February 23, 2017, 06:42:27 AM

Previous topic - Next topic

catherinemmj

Hi Paula
Thanks very much for helping me out with my AFC question. I am working through the online tutorials/manual and will use rhyoliteMELTS to test major element assimilation and alphaMELTS to test the trace elements.
However, I am having some difficulties with alphaMELTS. I am running Windows 10 and using Strawberry Perl, I have followed the install guidelines in the manual. I am double clicking on the run_alphamelts to open with Perl, but when I then attempt to change the environment settings file using the -f command, I get the following error message:

No command line switches specified! Please enter switches now (or press return for default '-f alphamelts_default_env.txt').

-f C:\Users\Erin\Documents\windows_alphamelts_1-7\xtal_env.txt
ALPHAMELTS_MINT 500
ALPHAMELTS_MODE isobaric
ALPHAMELTS_MAXT 2400
ALPHAMELTS_DELTAP 0
ALPHAMELTS_DELTAT -1
ALPHAMELTS_MAXP 30000
ALPHAMELTS_VERSION MELTS
ALPHAMELTS_MINP 1
'alphamelts' is not recognized as an internal or external command, operable program or batch file.
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.
Run again (y or n)?


AlphaMELTS seems to run fine using the default settings file, but I have also tested this using my old pc running Linux and receive the same error message. This makes me think I have installed something incorrectly? I used the default installation directories, including locating the path of the directory in my documents.
I have a feeling I am doing something simple wrong - if you could provide any guidance I would be really grateful.
Thanks again, Erin.

Paula

Hi Erin,

It is reading in your settings file OK, but then appears to have a Path problem finding the alphamelts executable. In fact I'm surprised that it works with the default settings file (unless you mean that it works if you double-click alphamelts.exe).

Are you double-clicking the original script or double-clicking the link to it? It should be the link to run_alphamelts.command, which should be inside a folder called "bin" within "Documents", if you used the default installation settings. That way it shouldn't matter whether the Path is set or not.

Note: on Macs the Path does need to be set correctly to avoid this error, even if you double-click the link..

If it still doesn't work, please let me know.

Cheers,
Paula

catherinemmj

Hi Paula,
That's where I was going wrong - it is now running it fine through the bin folder.
I hope that you will be able to help me with an error on one of my runs. I am following the forum thread for isenthalpic AFC, and am working through stage 1 - equilibrating my assimilant (rhyolitic ignimbrite). My aim is to add the assimilant to a rhyolitic magma chamber of similar composition and liquidus.
When I use option 4 the calculation hangs when attempting to add clinopyroxene and gives be a failure in silmin error. I have removed low MgO and MnO concentrations, as suggested in the manual.  Should I also allocate K2O as a trace element - does this require me to convert its concentration in wt% to ppm?
I have pasted my settings and melts files below, I look forward to any advice you may have on this.
Erin.

! *************************************
!  Fractional crystallization example
! *************************************

! this variable chooses MELTS or pMELTS; for low-pressure use MELTS
ALPHAMELTS_VERSION         MELTS

! use the spinel volume model from Java MELTS
!ALPHAMELTS_OLD_SPINEL   true

! don't use this unless fO2 anomalies at the solidus are a problem
!ALPHAMELTS_ALTERNATIVE_FO2   true

! use this if you want to buffer fO2 for isentropic, isenthalpic or isochoric mode
! e.g. if you are doing isenthalpic AFC
!ALPHAMELTS_IMPOSE_FO2   true

! use if you want assimilation and fractional crystallization (AFC)
!ALPHAMELTS_ASSIMILATE   true

! isothermal, isobaric, isentropic, isenthalpic, isochoric, geothermal or PTPath
ALPHAMELTS_MODE             isobaric
!ALPHAMELTS_PTPATH_FILE   ptpath.txt

! need to set DELTAP for polybaric paths; DELTAT for isobaric paths
ALPHAMELTS_DELTAP        0
ALPHAMELTS_DELTAT        -1
ALPHAMELTS_MAXP          30000
ALPHAMELTS_MINP          1
ALPHAMELTS_MAXT          2400
ALPHAMELTS_MINT          500

! this one turns on fractional crystallization for all solids
! use 'Fractionate:' in the melts file instead for selective fractionation
!ALPHAMELTS_FRACTIONATE_SOLIDS   true
!ALPHAMELTS_MASSIN         0.001

! free water is unlikely but can be extracted
!ALPHAMELTS_FRACTIONATE_WATER   true
!ALPHAMELTS_MINW                  0.005

! the next six options refer to the trace element engine
ALPHAMELTS_DO_TRACE              true
!ALPHAMELTS_TRACE_DEFAULT_DPTX  true
!ALPHAMELTS_TRACE_NORMALIZATION 2
ALPHAMELTS_TRACE_INPUT_FILE    C:\Users\Erin\Documents\bin\exercises\peralkalineKD.txt
!ALPHAMELTS_TRACE_USELIQFEMG    true

! the next one gives an output file that is always updated, even for single calculations
!ALPHAMELTS_SAVE_ALL       true
!ALPHAMELTS_SKIP_FAILURE   true

! this information overwrites stuff in the initial melts file
! a new melts file is created if this information is different
!Initial Temperature: 1400
!Initial Pressure: 500
!Log fO2 Path: FMQ




Title: riftassim
Initial Composition: SiO2 74.46
Initial Composition: TiO2 0.13
Initial Composition: Al2O3 12.49
Initial Composition: Fe2O3 2.18
Initial Composition: FeO 0.22
Initial Composition: MgO 0.01
Initial Composition: CaO 0.13
Initial Composition: Na2O 4.56
Initial Composition: K2O 4.68
Initial Composition: P2O5 0.02
Initial Composition: H2O 0.00
Initial Trace: Rb 164
Initial Trace: Ba 376
Initial Trace: Th 24.2
Initial Trace: Ta 6.2
Initial Trace: La 109
Initial Trace: Ce 235
Initial Trace: Sr 8
Initial Trace: Nd 100
Initial Trace: Sm 17.9
Initial Trace: Zr 566
Initial Trace: Hf 18.7
Initial Trace: Eu 0.05
Initial Trace: Y 77
Initial Trace: Yb 9.3
Initial Trace: Lu 1.19
Initial Mass: 100.0
Initial Temperature: 1200
Final Temperature: 500
Increment Temperature: -1
Initial Pressure: 500.00
Final Pressure: 500.00
Increment Pressure: 0.00
dp/dt: 0.00
log fo2 Path: FMQ
log fo2 Delta: -1.00

Paula

#3
Hi Erin,

I tried equilibrating this in the Rhyolite-MELTS graphical user interface, as I happened to have that open for other reasons. I zeroed out P2O5 but otherwise tried the same as you. It crashed with a segmentation fault. For reasons I won't go into, this may indicate that having no MgO was the problem; another clue is that it was adding fayalite.

So, I would actually leave the tiny bit of MgO in. To clarify what I said in the documentation: I would put small amounts of incompatible species, which don't have many solid phases to go into in the MELTS system, as trace elements instead. This does mean converting the concentration from wt% (or grams) to ppm. But for the purposes of seeing whether the calculation works you can just delete the "Initial Concentration:" line.

However, I would leave in the small amounts of major oxides like MgO, TiO2, Fe2O3. In fact, if necessary I would add a tiny amount of these to stabilise the calculation, even if that amount is below the analytical detection limit. For example, see this note about pyroxene compositions.

If you remove P2O5 and leave MgO in it should work. There's no need to remove K2O, for this bulk composition, as it will go into feldspar. Let me know if there are still problems.

Paula