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

Recent posts

#21
Magma chamber processes / Re: Arc Magma Crystallization
Last post by Paula - November 28, 2023, 05:13:58 PM
See here - https://magmasource.caltech.edu/forum/index.php/topic,833.msg1420.html#msg1420

The amphibole project did not turn out as planned, due to Covid. But we are still chipping away at it. And interesting things are coming out of Mark Ghiorso and co-workers MELTS+DEW model, which includes F and Cl that could be key to stabilizing amphibole. E.g:

https://conf.goldschmidt.info/goldschmidt/2023/meetingapp.cgi/Paper/13890

So I guess the advice to watch this space (or spaces) still applies.

Paula
#22
Magma chamber processes / Arc Magma Crystallization
Last post by Bhuvan - November 24, 2023, 10:41:22 AM
Hello all!

I am trying to model crystallization of arc magmas at pressures (1GPa - 0.1GPa) using MELTS v1.2.0 with two objectives:

1. Effect of P and initial H2O on the amphibole crystallization and composition
2. Crystallization of An rich (An98) plagioclase

However, amphibole is never found as a crystallizing phase no matter the initial H2O content or the pressure. Increasing H2O content would lead to water being present as a separate fluid phase, and hence never triggers amphibole due to a decrease in magma's water contents or An rich plagioclase crystallization.

Any leads on solving this?

The primary magma composition is as follows:

Initial Composition: SiO2 49.0555
Initial Composition: TiO2 0.4904
Initial Composition: Al2O3 16.3157
Initial Composition: Fe2O3 1.3472
Initial Composition: Cr2O3: 0.033
Initial Composition: FeO 8.4557
Initial Composition: MgO 9.7423
Initial Composition: CaO 10.2108
Initial Composition: Na2O 1.3813
Initial Composition: K2O 0.0100
Initial Composition: H2O 2.9910
Initial Temperature: 1383
Increment Temperature: -10.00
Mode: Fractionate Solids

Thanks in advance!
#23
alphaMELTS for MATLAB/Python / Re: Unexpected behavior during...
Last post by Paula - October 12, 2023, 05:54:17 PM
Hi! Sorry for the delay again. 

I wasn't entirely able to reproduce the problem (on Windows I got a crash but right at the end when it was pretty much done, on Mac no crash, and on Linux crash early on more similar to what you describe). The variability across platforms is a good indication that it's a memory problem.

I found a couple of issues that I've fixed but can't be sure they are what you were hitting. I'm going to keep testing, combine some other bug fixes and new features, and aim to post an update to GitList some time next week. I'll let you know when it's there.

Thanks for your patience!
Paula
#24
alphaMELTS for MATLAB/Python / Re: KeyError: 'plagioclase_2' ...
Last post by Cambrian - October 03, 2023, 06:10:11 PM
Thank you for your prompt reply, I will try again after all the updates.
#25
alphaMELTS for MATLAB/Python / Re: KeyError: 'plagioclase_2' ...
Last post by Paula - October 02, 2023, 08:39:22 AM
Make sure you have the latest version of everything. The copy of tutorial.py that's up there at the moment has a comment on line 122, so it sounds like you have a slightly older version.

More generally a key error may mean you've tried to get the properties of a phase that isn't present, so you can try wrapping the relevant code in an if block or a try.. except block. The MELTS:libraryAlreadyInitialized message is more of a caution than a critical error.

Paula
#26
alphaMELTS for MATLAB/Python / KeyError: 'plagioclase_2' in M...
Last post by Cambrian - October 02, 2023, 01:24:31 AM
Hi,  Paula:
When I run the tutorial.py file in package folder of MELTS_Matlab/Python, the terminal prompts an error as shown in the following. How should I modify the Python code to make it work.
Thanks.


Current state of the system recorded in _tbl.txt files.
Successful run.  No errors.
Setting calculation mode to rhyolite-MELTS 1.0.2.
MELTS:libraryAlreadyInitialized. Could not re-initialize MELTS library! Please check stderr (console or terminal). If there are any error messages, please save your work and reload Python; otherwise you should be able to continue, with caution...
Traceback (most recent call last):
  File "/home/wanghai/alphaMELTS/MELTS_Matlab-master/package/tutorial.py", line 122, in <module>
    melts.engine.calcEndMemberProperties(phaseList, plag[:, indices])
  File "/home/wanghai/alphaMELTS/MELTS_Matlab-master/package/meltsengine.py", line 890, in calcEndMemberProperties
    self.activity[phaseName] = None
KeyError: 'plagioclase_2'
#27
alphaMELTS for MATLAB/Python / Re: Unexpected behavior during...
Last post by OEM - September 22, 2023, 12:52:55 AM
Here is the code, Paola.
clear all
close all
%% load in appropriate packages and functions
addpath('D:\YandexDisk\Work\_Projects\Melts_for_Matlab\package')
warning('off','all')
P=[4000 4000 4000 4000 4000 4000 4000 4000 4000 8300 8300 8300 9400 9400 9400 9600 9600 9600 9600 9600 9600 9600 9600 9700 9700 9700 9800 9800 9800 2212 2212 2238 2238 2238 2238 2245 2245 2300 2300 2300 2300 2080 2080 2080 2080 2250 2250 2250 2250 2250 2250 2237 2237 2237 2237 3890 3890 3890 3890 2174 2174 2174 2174];
T=[900 900 900 900 900 950 950 950 950 892 892 892 750 750 750 841 841 841 841 841 943 943 943 892 892 892 995 995 995 785 785 776 776 776 776 776 776 834 834 834 834 866 866 866 866 899 899 899 899 899 899 781 781 781 781 780 780 780 780 747 747 778 778];
H2Ogl=[9 8.30000000000000 7.50000000000000 6.70000000000000 4.30000000000000 8.90000000000000 6.60000000000000 5.50000000000000 4.40000000000000 9.30000000000000 8 6.40000000000000 10.5000000000000 9.70000000000000 9 11.7000000000000 10.3000000000000 9.50000000000000 8 7.20000000000000 8.50000000000000 6.80000000000000 6 10.4000000000000 12.9000000000000 8.20000000000000 7.60000000000000 5.30000000000000 4.80000000000000 7 6.69000000000000 7 7 7 7 7 7 7 6.96000000000000 5.76000000000000 6.19000000000000 7 6.21000000000000 5.04000000000000 6.07000000000000 6.96000000000000 6.24000000000000 6.04000000000000 5.66000000000000 3.78000000000000 3.09000000000000 7 7 6.50000000000000 5.83000000000000 8.50000000000000 8.08000000000000 7.27000000000000 8.15000000000000 6.38000000000000 6.35000000000000 7.01000000000000 6.90000000000000];
bulk = zeros(19, 1);
%                       SiO2, TiO2, Al2O3, Fe2O3, Cr2O3, FeO,        MgO
%                         1     2     3      4        5     6          8
bulk([1:6 8 11:16])  = [64.6  0.53   16.5 0.15*4.37 0.000 0.85*4.37  2.39 ...
    5.23 4.49 1.54 0.00   0   0 ];

%, CaO, Na2O, K2O, P2O5, H2O CO2
%    11    12  13   14  15   16
%% carry out equilibrium crystallisation modelling
ptpath=MELTSdynamic(4);
for i=1:numel(P)
        disp([P(i),T(i),H2Ogl(i)]);
        bulk(15)=H2Ogl(i);
        bulk(16)=0;
        bcom=100*bulk/sum(bulk);
        ptpath.engine.set('BulkComposition',bcom);
        ptpath.engine.setSystemProperties("Log fO2 Path","+2FMQ")
        ptpath.engine.pressure = P(i);
        ptpath.engine.temperature = T(i);
        ptpath.engine.calcEquilibriumState(1,1);
        ptpath=ptpath.addNodeAfter;
end

After several successful calculations the system stops responding and matlab closes without report generation. Windows, Matlab R2023a, update 5.
Best
Oleg
#28
alphaMELTS for MATLAB/Python / Re: Unexpected behavior during...
Last post by Paula - September 09, 2023, 04:46:26 PM
Hi! Sorry for delayed response. Please could you post a code example with parameters for which is doesn't converge?

Paula
#29
alphaMELTS for MATLAB/Python / Re: Unexpected behavior during...
Last post by OEM - August 30, 2023, 01:30:25 AM
Thank you, Paola! The code is more stable now!
Is there a manual how to set  ptpath.engine.setSystemProperties with all available options? For example, I would like to change the maximum number of iterations, because for some parameters the code does not converge.
Best
Oleg
#30
alphaMELTS for MATLAB/Python / Re: Unexpected behavior during...
Last post by Paula - August 28, 2023, 10:45:29 AM
Try updating to the latest version here and see if it helps. The newest version has k-feldspar renamed to alkali-feldspar (see the alphaMELTS 2 README).

There is definitely a bug fix for the other problem you mentioned in this topic reply. When I added oxygen as a "phase" (in a similar sense to how "bulk" is treated as a phase) I forgot to add extra storage space. It should be better now.

Paula