This page was generated from
docs/Examples/PhaseDiagrams/PhaseDiagram_example_MaunaLoa.ipynb.
Interactive online version:
.
Phase Diagram calculations at Mauna Loa
Given a set composition we can use
pttto assess the phase stability at different P-T conditions to construct a phase diagram.These calculations can be performed with either the MELTS or Holland & Powell family of thermodynamic models (through MAGEMin).
Also use outputs to assess the variability in key geochemical parameters across P-T space (e.g., phase proportions or chemistry).
Before any calculations can be run users need to download the alphaMELTS for MATLAB files and/or install the MAGEMinCalc and juliacall packages. Please see the installation guide on ReadTheDocs.
[1]:
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
# If the alphaMELTS for Python files have not been added to your Python path (see installation guide) then use the two lines below to add
# the location of the alphaMELTS files here.
# import sys
# sys.path.append(r'C:\Users\penny\Box\Berkeley_new\MELTS_Installation\alphamelts_py\alphamelts-py-2.3.1-win64')
import petthermotools as ptt
print(ptt.__version__)
# If you are running in jupyter lab or notebook, remove the word widget.
%matplotlib widget
alphaMELTS for Python files successfully located.
If you are planning on using the Green et al. (2025) or Weller et al. (2024) thermodynamic models through MAGEMin for crystallization, melting, or phase diagram calculations
you will need to run `ptt.activate_petthermotools_env()` at the start of each notebook, prior to any calculations, every time you restart the kernel.
This step establishes the python-julia connection and sets up the julia workers. Expect it to take about 20-40s on most machines.
1.3.4
[2]:
### only run this cell if using MacOS or Linux or if you are intending to run calculations with the Green or Weller mdoels
### on windows running this cell will limit the ability to run calculations with MELTS. This is an issue I'm actively working to fix
ptt.activate_petthermotools_env()
Initializing MAGEMin environment and workers...
Julia environment detected.
Detected IPython. Loading juliacall extension. See https://juliapy.github.io/PythonCall.jl/stable/compat/#IPython
Activating project at `~/.petthermotools_julia_env`
Using libMAGEMin.dylib from MAGEMin_jll
Activating project at `~/.petthermotools_julia_env`
From worker 4: Activating project at `~/.petthermotools_julia_env`
From worker 3: Activating project at `~/.petthermotools_julia_env`
From worker 2: Activating project at `~/.petthermotools_julia_env`
From worker 5: Activating project at `~/.petthermotools_julia_env`
From worker 2: Using libMAGEMin.dylib from MAGEMin_jll
From worker 4: Using libMAGEMin.dylib from MAGEMin_jll
From worker 3: Using libMAGEMin.dylib from MAGEMin_jll
From worker 5: Using libMAGEMin.dylib from MAGEMin_jll
Julia Environment and Workers Ready.
MAGEMinCalc v0.6.4, MAGEMin_C v2.2.6
As in all examples we will import the key packages including ptt. The only difference here is that we will also use %matplotlib widget to make the phase diagram plots interactive (more explanation later).
Bulk composition
We are going to recreate the study of Wieser et al. (2025b), which places constraints on magma storage at Mauna Loa Volcano (Bull Volcanol, https:// doi. org/ 10. 1007/ s00445- 025- 01869-2). It has been suggested based on pMELTS modelling that the presence of high Mg# Opx indicates sub-Moho magma storage. We can assess if this is true using different thermodynamic models.
[3]:
# Estimated primary melt composition using reverse crystallization calculations in Petrolog3
Prim_MELT = {
'SiO2_Liq': 48.5858,
'TiO2_Liq': 1.4381,
'Al2O3_Liq': 9.73,
'FeOt_Liq': 10.144, # 9.064 + 0.8998*1.1996
'MgO_Liq': 20.0,
'CaO_Liq': 7.2186,
'Na2O_Liq': 1.7327,
'K2O_Liq': 0.3227,
'Cr2O3_Liq': 0.0702,
'H2O_Liq': 0.2,
'Fe3Fet_Liq': 0.106 # (0.8998*1.1996) / FeOt
}
We can now run ptt.phaseDiagram_calc which takes an array of pressure and temperature conditions and evaluates the equilibrium assemblage at each combination of values. The import parameters to tweak are:
The
i_maxparameters determines the maximum number of iterations that the code will loop through (a new loop is started if one calculation fails) unless every point either has a solution or hits a failure point. Smaller i_max, more likely to have holes in the phase diagram (as if one calculation kills a subprocess with 7 more calculations to run, you will get 7 holes until you have i_max>1). 15 is generally a good value to use.The
refine = 2parameter helps refine the phase boundaries. Consider that your 25 pressure and temperature points creates the grid shown below. Initially, the phase boundary between olivine and liquid is put at the midpoint between the solved values.What the first refine step does is insert a new calculation anywhere two neighbouring points have a different phase assemble (the red dots). These are then solved, and the position of the phase boundary is obtained at a higher precision. To ensure that the matrix has a constant point spacing, new points are inserted between existing points with the same phase (e.g. the point between Ol - Ol is filled with olivine - in this diagram, these are the smaller circles in panel c). refine=2 would do this again after the first refinement stage.
[4]:
Res_pMELTS = ptt.phaseDiagram_calc(Model = "pMELTS", bulk = Prim_MELT,
P_bar = np.linspace(200.0,15000.0, 25),
T_C = np.linspace(1150.0, 1450.0, 25),
i_max = 15,
refine = 2)
Attempt 0
Attempt 1
Performing another 364 calculations with interpolation used to calculate 1412 points.
Attempt 0
Performing another 762 calculations with interpolation used to calculate 6246 points.
Attempt 0
Attempt 1
[5]:
Res_pMELTS
[5]:
| T_C | P_bar | mass_g | H_J | S_J/K | V_cm^3 | rho_kg/m^3 | log10(fO2) | dVdP_cm^3/bar | SiO2_Cpx | ... | H_J_Grt | S_J/K_Grt | Cp_J/(kg.K^2)_Grt | dCpdT_J/(kg.K^2)_Grt | dVdT_cm^3/K_Grt | dPdT_bar/K_Grt | d2VdT2_cm^3/K^2_Grt | d2VdTdP_cm^3/(bar.K)_Grt | d2VdP2_cm^3/bar^2_Grt | molwt_Grt | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1150.0 | 200.00 | 100.0 | -1.248852e+06 | 255.863381 | 35.541617 | 2813.603002 | -8.207735 | 0.000353 | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 1 | 1150.0 | 354.17 | 100.0 | -1.248525e+06 | 255.708849 | 35.507685 | 2816.299511 | -8.174374 | 0.000360 | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 2 | 1150.0 | 508.33 | 100.0 | -1.248198e+06 | 255.554318 | 35.473752 | 2818.996020 | -8.141013 | 0.000368 | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 3 | 1150.0 | 662.50 | 100.0 | -1.247871e+06 | 255.399786 | 35.439820 | 2821.692529 | -8.107652 | 0.000376 | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 4 | 1150.0 | 816.67 | 100.0 | -1.247544e+06 | 255.245254 | 35.405887 | 2824.389038 | -8.074291 | 0.000383 | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 9404 | 1450.0 | 14383.33 | 100.0 | -1.144635e+06 | 290.385982 | 34.672846 | 2884.101260 | -5.166910 | 0.000004 | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 9405 | 1450.0 | 14537.50 | 100.0 | -1.144687e+06 | 290.046903 | 34.619074 | 2888.601984 | -5.151779 | 0.000019 | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 9406 | 1450.0 | 14691.67 | 100.0 | -1.144738e+06 | 289.707824 | 34.565302 | 2893.102708 | -5.136647 | 0.000033 | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 9407 | 1450.0 | 14845.83 | 100.0 | -1.144790e+06 | 289.368746 | 34.511529 | 2897.603433 | -5.121516 | 0.000048 | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
| 9408 | 1450.0 | 15000.00 | 100.0 | -1.144841e+06 | 289.029667 | 34.457757 | 2902.104157 | -5.106385 | 0.000063 | NaN | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN |
9409 rows × 219 columns
The result is a DataFrame with 97 equally spaced temperature and pressure values (so total size of 97*97). Why 97 you ask? Well initially its 25 in x and 25 in y. The refine then adds 24 points (one inbetween each point), so 49X49. The refine again adds another 48 points so (49+48) = 97 X 97. For cases where the phase assemblage of 2 neighboring points was identical the phase proportions and phase chemistry is estimated through simply linear interpolation between the two neighbors. To view the
phase diagram results we can use the plot_phaseDiagram function in ptt. This will create a phase diagram labelled by number, with each number corresponding to a phase assemblage listed on the right. By using %matplotlib widget above you should be able to hover over the plot and see which number (and therefore phase assemblage) is present at each P-T condition.
[6]:
ptt.plot_phaseDiagram(Combined = Res_pMELTS)
[6]:
(<Figure size 1000x600 with 2 Axes>,
array([<Axes: xlabel='Temperature ($\\degree$C)', ylabel='Pressure (bar)'>,
<Axes: >], dtype=object))
Lets try Melts V.1.0.2
[7]:
Res_M12 = ptt.phaseDiagram_calc(Model = "MELTSv1.0.2", bulk = Prim_MELT,
P_bar = np.linspace(200.0,15000.0, 25),
T_C = np.linspace(1150.0, 1450.0, 25),
i_max = 15,
refine = 2)
Attempt 0
Attempt 1
Attempt 2
Attempt 3
Attempt 4
Performing another 383 calculations with interpolation used to calculate 1393 points.
Attempt 0
Attempt 1
Performing another 846 calculations with interpolation used to calculate 6162 points.
Attempt 0
Attempt 1
Attempt 2
Attempt 3
Attempt 4
Attempt 5
Attempt 6
Attempt 7
Attempt 8
Attempt 9
Attempt 10
Attempt 11
Attempt 12
Attempt 13
Attempt 14
Attempt 15
[8]:
f, a = ptt.plot_phaseDiagram(Combined = Res_M12)
Calculations using MAGEMin
For calculations with MAGEMin it is important to note that this is one of the major purposes for which the original MAGEMin code was developed, so it will likely always be straightforward to create phase diagrams using the MAGEMinApp (https://github.com/ComputationalThermodynamics/MAGEMinApp.jl). The point of this code is not to try and replace MAGEMin, but to provide Python users with the ability to perform calcualtions with a range of different thermodynamic models. In the cells below we
repeat the calculations with the Model kwarg is changed to Green2025 which will initiate the calculation in julia via MAGEMin
[9]:
Res_green = ptt.phaseDiagram_calc(Model = "Green2025", bulk = Prim_MELT,
P_bar = np.linspace(200.0,15000.0, 25),
T_C = np.linspace(1150.0, 1450.0, 25),
i_max = 15, refine=2)
Computing 157 points... 100%|████████████████████████████| Time: 0:00:33
Computing 156 points... 100%|████████████████████████████| Time: 0:00:33
Computing 156 points... 100%|████████████████████████████| Time: 0:00:36
Computing 156 points... 100%|████████████████████████████| Time: 0:00:39
Performing another 231 calculations with interpolation used to calculate 1545 points.
Computing 58 points... 100%|█████████████████████████████| Time: 0:00:10
Computing 58 points... 100%|█████████████████████████████| Time: 0:00:11
Computing 57 points... 100%|█████████████████████████████| Time: 0:00:11
Computing 58 points... 100%|█████████████████████████████| Time: 0:00:11
Performing another 479 calculations with interpolation used to calculate 6529 points.
Computing 120 points... 100%|████████████████████████████| Time: 0:00:21
Computing 120 points... 100%|████████████████████████████| Time: 0:00:22
Computing 120 points... 100%|████████████████████████████| Time: 0:00:22
Computing 119 points... 100%|████████████████████████████| Time: 0:00:23
[10]:
f, a = ptt.plot_phaseDiagram(Combined = Res_green)
[11]:
f, a = ptt.plot_phaseDiagram_multi({"Green 2025": Res_green,
"MELTSv1.0.2": Res_M12,
"pMELTS": Res_pMELTS})
Lets calculate Mg# as that was a big part of the original arguements
[12]:
Res_green['Mg#_Opx']=(Res_green['MgO_Opx']/40.3044)/((Res_green['MgO_Opx']/40.3044)+(Res_green['FeOt_Opx']/71.844))
Res_M12['Mg#_Opx']=(Res_M12['MgO_Opx']/40.3044)/((Res_M12['MgO_Opx']/40.3044)+(Res_M12['FeOt_Opx']/71.844))
Res_pMELTS['Mg#_Opx']=(Res_pMELTS['MgO_Opx']/40.3044)/((Res_pMELTS['MgO_Opx']/40.3044)+(Res_pMELTS['FeOt_Opx']/71.844))
/var/folders/vm/7v8p43js2918h18x32py6b9r0000gn/T/ipykernel_7382/1111130769.py:1: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`
Res_green['Mg#_Opx']=(Res_green['MgO_Opx']/40.3044)/((Res_green['MgO_Opx']/40.3044)+(Res_green['FeOt_Opx']/71.844))
/var/folders/vm/7v8p43js2918h18x32py6b9r0000gn/T/ipykernel_7382/1111130769.py:2: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`
Res_M12['Mg#_Opx']=(Res_M12['MgO_Opx']/40.3044)/((Res_M12['MgO_Opx']/40.3044)+(Res_M12['FeOt_Opx']/71.844))
/var/folders/vm/7v8p43js2918h18x32py6b9r0000gn/T/ipykernel_7382/1111130769.py:3: PerformanceWarning: DataFrame is highly fragmented. This is usually the result of calling `frame.insert` many times, which has poor performance. Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`
Res_pMELTS['Mg#_Opx']=(Res_pMELTS['MgO_Opx']/40.3044)/((Res_pMELTS['MgO_Opx']/40.3044)+(Res_pMELTS['FeOt_Opx']/71.844))
In addition to the phase diagrams shown above it is relatively simple to extract additional information from the calculations. For example, it is trivial to extract the mass of liquid (mass fraction) at each point and reshape this array into a P-T grid so that we can visualize this data as contours.
The function make_grid_variables_from_phase_diagram takes your dataframe output, and puts it into a PT grid. This allows for easier plotting.
[13]:
X_green, Y_green, Z_green = ptt.make_grid_variables_from_phase_diagram(
Results = Res_green,
x_col = "T_C",
y_col = "P_bar",
)
liq_green = Z_green["mass_g_Liq"]
[14]:
X_pMELTS, Y_pMELTS, Z_pMELTS = ptt.make_grid_variables_from_phase_diagram(
Results = Res_pMELTS,
x_col = "T_C",
y_col = "P_bar",
)
[15]:
X_M12, Y_M12, Z_M12 = ptt.make_grid_variables_from_phase_diagram(
Results = Res_M12,
x_col = "T_C",
y_col = "P_bar",
)
From here we can use the plt.contourf function to visualize the mass fraction of melt at each P-T value:
[16]:
import matplotlib.pyplot as plt
fig, (ax1, ax2, ax3) = plt.subplots(
1, 3, figsize=(12, 4), sharex=True, sharey=True
)
# ------------------------------------------------
# Panel 1: Opx in Green
pcm1 = ax1.pcolormesh(
X_green, Y_green, Z_green["mass_g_Opx"],
shading="auto",
cmap="viridis", vmin=0, vmax=10,
)
ax1.set_title("Green2025")
ax1.set_xlabel("T (°C)")
ax1.set_ylabel("P (bar)")
fig.colorbar(pcm1, ax=ax1, label="% Opx")
# ------------------------------------------------
# Panel 2: Opx in pMELTS
pcm2 = ax2.pcolormesh(
X_pMELTS, Y_pMELTS, Z_pMELTS["mass_g_Opx"],
shading="auto",
cmap="viridis", vmin=0, vmax=10,
)
ax2.set_title("pMELTS")
ax2.set_xlabel("T (°C)")
fig.colorbar(pcm2, ax=ax2, label="% Opx")
# ------------------------------------------------
# Panel 3: Opx in v1.0.2
pcm3 = ax3.pcolormesh(
X_M12, Y_M12, Z_M12["mass_g_Opx"],
shading="auto",
cmap="viridis", vmin=0, vmax=10,
)
ax3.set_title("MELTS 1.0.2")
ax3.set_xlabel("T (°C)")
fig.colorbar(pcm3, ax=ax3, label="% Opx")
plt.tight_layout()
plt.show()
We can also plot the P-T conditions where Ol and Opx are stable (the observed phase assemblage)
[17]:
Res_green_Opx_Ol=Res_green.loc[(Res_green['mass_g_Ol']>0) & (Res_green['mass_g_Opx']>0) ]
Res_green_Opx=Res_green.loc[(Res_green['mass_g_Opx']>0) ]
Res_pMELTS_Opx_Ol=Res_pMELTS.loc[(Res_pMELTS['mass_g_Ol']>0) & (Res_pMELTS['mass_g_Opx']>0 )]
Res_pMELTS_Opx=Res_pMELTS.loc[(Res_pMELTS['mass_g_Opx']>0 )]
Res_M12_Opx_Ol=Res_M12.loc[(Res_M12['mass_g_Ol']>0) & (Res_M12['mass_g_Opx']>0 )]
Res_M12_Opx=Res_M12.loc[ (Res_M12['mass_g_Opx']>0 )]
[18]:
fig, (ax1, ax2) = plt.subplots(
1, 2, figsize=(12, 4), sharex=True, sharey=True
)
# ------------------------------------------------
# Panel 1: Opx + Ol in Green
ax1.set_title('Ol + Opx stable')
ax1.plot(Res_green_Opx_Ol['T_C'], Res_green_Opx_Ol['P_bar'], '.r', label='Green2025')
ax1.plot(Res_pMELTS_Opx_Ol['T_C'], Res_pMELTS_Opx_Ol['P_bar'], '.k', alpha=0.3, label='pMELTS')
ax1.plot(Res_M12_Opx_Ol['T_C'], Res_M12_Opx_Ol['P_bar'], '.c', alpha=0.1, label='1.0.2')
# Lets just do Opx stable
# Panel 2: Opx stable
ax2.set_title('Opx stable')
ax2.plot(Res_green_Opx['T_C'], Res_green_Opx['P_bar'], '.r')
ax2.plot(Res_pMELTS_Opx['T_C'], Res_pMELTS_Opx['P_bar'], '.k', alpha=0.2)
ax2.plot(Res_M12_Opx['T_C'], Res_M12_Opx['P_bar'], '.c', alpha=0.1)
ax1.legend()
ax1.set_xlabel('T (C)')
ax1.set_ylabel('P (bar)')
[18]:
Text(0, 0.5, 'P (bar)')
[19]:
fig, (ax1, ax2) = plt.subplots(
1, 2, figsize=(12, 4), sharex=True, sharey=True
)
# ------------------------------------------------
# Panel 1: Opx + Ol in Green
ax1.set_title('Ol + Opx stable')
ax1.plot(Res_green_Opx_Ol['Mg#_Opx'], Res_green_Opx_Ol['P_bar'], '.r', label='Green2025')
ax1.plot(Res_pMELTS_Opx_Ol['Mg#_Opx'], Res_pMELTS_Opx_Ol['P_bar'], '.k', alpha=0.2, label='pMELTS')
#ax1.plot(Res_M12_Opx_Ol['Mg#_Opx'], Res_M12_Opx_Ol['P_bar'], '.c', alpha=0.2)
ax1.legend()
# Lets just do Opx stable
# Panel 2: Opx stable
ax2.set_title('Opx stable')
ax2.plot(Res_green_Opx['Mg#_Opx'], Res_green_Opx['P_bar'], '.r')
ax2.plot(Res_pMELTS_Opx['Mg#_Opx'], Res_pMELTS_Opx['P_bar'], '.k', alpha=0.2)
#ax2.plot(Res_M12_Opx['Mg#_Opx'], Res_M12_Opx['P_bar'], '.c', alpha=0.1)
ax1.legend()
ax1.set_xlabel('Mg#_Opx')
ax1.set_ylabel('P (bar)')
[19]:
Text(0, 0.5, 'P (bar)')
[20]:
fig, axes = plt.subplots(
3, 2, figsize=(12, 10), sharex=True, sharey=True
)
# =================================================
# Row 1 — Green2025
# =================================================
axes[0, 0].set_title('Ol + Opx stable')
axes[0, 0].plot(
Res_green_Opx_Ol['Mg#_Opx'],
Res_green_Opx_Ol['P_bar'],
'xr', ms=2, label='Green2025'
)
axes[0, 0].legend()
axes[0, 1].set_title('Opx stable')
axes[0, 1].plot(
Res_green_Opx['Mg#_Opx'],
Res_green_Opx['P_bar'],
'xr', ms=2
)
# =================================================
# Row 2 — pMELTS
# =================================================
axes[1, 0].plot(
Res_pMELTS_Opx_Ol['Mg#_Opx'],
Res_pMELTS_Opx_Ol['P_bar'],
'.k', alpha=0.2, label='pMELTS'
)
axes[1, 0].legend()
axes[1, 1].plot(
Res_pMELTS_Opx['Mg#_Opx'],
Res_pMELTS_Opx['P_bar'],
'.k', alpha=0.2
)
# =================================================
# Row 3 — MELTS v1.2.0
# =================================================
axes[2, 0].plot(
Res_M12_Opx_Ol['Mg#_Opx'],
Res_M12_Opx_Ol['P_bar'],
'.c', alpha=0.3, label='v1.0.2'
)
axes[2, 0].legend()
axes[2, 1].plot(
Res_M12_Opx['Mg#_Opx'],
Res_M12_Opx['P_bar'],
'.c', alpha=0.3
)
# =================================================
# Labels
# =================================================
for ax in axes[:, 0]:
ax.set_ylabel('P (bar)')
for ax in axes[-1, :]:
ax.set_xlabel('Mg#$_{Opx}$')
plt.tight_layout()
Comparison of phase diagrams predicted by rhyolite-MELTS and the nGibbs emulator
[21]:
import time
start = time.time()
Res_M12 = ptt.phaseDiagram_calc(Model = "MELTSv1.0.2", bulk = Prim_MELT,
P_bar = np.linspace(200.0,15000.0, 25),
T_C = np.linspace(1150.0, 1450.0, 25),
i_max = 15,
refine = 2)
r_melts_time = time.time() - start
Attempt 0
Attempt 1
Attempt 2
Attempt 3
Performing another 375 calculations with interpolation used to calculate 1401 points.
Attempt 0
Attempt 1
Performing another 846 calculations with interpolation used to calculate 6162 points.
Attempt 0
Attempt 1
Attempt 2
Attempt 3
[22]:
try:
start = time.time()
nRes_M12 = ptt.phaseDiagram_calc(Model = "nMELTSv1.0.2NoProp", bulk = Prim_MELT,
P_bar = np.linspace(200.0,15000.0, 25),
T_C = np.linspace(1150.0, 1450.0, 25),
i_max = 15,
refine = 2)
n_melts_time = time.time() - start
except:
print("nGibbs likely not installed, installation instructions will be placed on ReadtheDocs soon!")
[23]:
n_melts_time/r_melts_time
[23]:
0.09880625255638179
[24]:
f, a = ptt.plot_phaseDiagram_multi({"MELTSv1.0.2": Res_M12,
"nGibbs": nRes_M12})
[ ]: