Code Availability

Melting of a mixed peridotite-pyroxenite mantle

During my PhD I developed models to calculate the trace element and Fe isotope composition of melts produced by a 2-component mantle. These models are based on the Melt-PX framework from Lambart et al. (2016). Detailed descriptions of the models can be found in Gleeson et al. (2020), and the code is available via GitHub

I have also built on this code by using Perple_X calculations to predict the phase assemblage of various mantle components during adiabatic decompression melting. By combining this code with the pymelt tool of Matthews et al. (2020) we are able to investigate how variations in source proportion, mantle potential temperature, and the pressure at the base of the lithosphere influences the composition of the resulting magmas. All code is available via GitHub as well as a binder repository.

Finally, I am also a contributor to the continued development of pymelt, a python3 tool designed to simulate the melting characteristics of a multi-lithology mantle. Specifically, I used the base pymelt code and the hydrous melting parameterisation of Katz et al. (2003) to incorporate a hydrous melting function (that can account for both batch and continuous melting).

Magma decompression and volatile diffusion

Recent developments linking the MELTS algorithms with coding environments such as MATLAB and Python enable greater flexibility in modelling magmatic systems. I designed two functions that: (i) calculate the volatile element composition of a melt and co-existing fluid phase during magma decompression; and (ii) simulate diffusion of volatile species in melt embayments during magma decompression and volatile degassing from the surrounding melt. Code is available via GitHub and is available alongside Gleeson et al. (2022).