alphaMELTS 2.3 standalone & for MATLAB/Python is now open source and available on GitHub (https://github.com/magmasource/alphaMELTS).
alphaMELTS 1.9 is available at the legacy download and information site.
For news of all MELTS software see the MELTS Facebook page.
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.