Note
Go to the end to download the full example code.
Teaching Exercise: Aluminosilicate Phase Diagram#
This notebook is designed to be used for a class activity where each student is a Gibbs Energy Minimiser. The phase diagram is constructed in a Google Sheets spreadsheet which should be shared with the class (who should be given the ability to edit the spreadsheet).
Thermoengine is used to calculate the volume, entropy, enthalpy, and Gibbs energy of each of the three polymorphs at a range of pressures and temperatures. The phase diagram is then constructed by identifying the phase with the lowest Gibbs energy at each temperature-pressure point. By inspecting the contributions of the volume and entropy terms to the Gibbs energy, students can gain an understanding of how temperature and pressure affect mineral polymorph stability.
Open this code in an executable MyBinder instance (MyBinder links may be slow to load– please be patient!):
We will use a python library called thermoengine to calculate the properties of Kyanite, Sillimanite, and Andalusite. We have to import this into the code here:
from thermoengine import model
This next bit of code extracts the information about the aluminosilicates:
db = model.Database()
kyanite = db.get_phase('Ky')
andalusite = db.get_phase('And')
sillimanite = db.get_phase('Sil')
Calculate Molar Volumes#
kyanite.volume(
323.0, # Temperature in Kelvin
500.0 # Pressure in bar
)
4.4132060759015
andalusite.volume(
323.0, # Temperature in Kelvin
500.0 # Pressure in bar
)
5.148022970757485
sillimanite.volume(
323.0, # Temperature in Kelvin
500.0 # Pressure in bar
)
4.982791737981585
Calculate Molar Entropy#
kyanite.entropy(
323.0, # Temperature in Kelvin
500.0 # Pressure in bar
)
92.47688378708382
Your code here…
Your code here…
Calculate Molar Enthalpy#
kyanite.enthalpy(
323.0, # Temperature in Kelvin
500.0 # Pressure in bar
)
-2588898.5448652683
Your code here…
Your code here…
Calculate Molar Gibbs Energy#
kyanite.gibbs_energy(
323.0, # Temperature in Kelvin
500.0 # Pressure in bar
)
-2618768.5783284963
Your code here…
Your code here…
You can also visualise the contributions to the Gibbs Energy:
import matplotlib.pyplot as plt
T = 500.0 # K
P = 100.0 # bar
fig, ax = plt.subplots()
ax.bar([0,1,2], [kyanite.gibbs_energy(T,P)/1000, kyanite.enthalpy(T,P)/1000, - T*kyanite.entropy(T,P)/1000],)
ax.set_xticks([0,1,2])
ax.set_xticklabels(['G', 'H', '-TS'])
ax.set_ylabel('Energy (kJ mol$^{-1}$)')
plt.show()

Total running time of the script: (0 minutes 0.063 seconds)