ENKI is an open-source modeling platform for computational thermodynamics of natural systems. ENKI provides access to the MELTS family of models and offers capabilities for running simulations using existing models as well as for building and calibrating new thermodynamic models. The ENKI platform is easy to use, flexible, and available on all computing platforms. This NSF-funded project, the brainchild of Mark S. Ghiorso, began development in fall 2016 and was publicly released in 2020. It is used by researchers and teachers alike.
The ENKI ecosystem is built around the ThermoEngine Python package, which provides open source access to thermodynamic phase models and equilibration routines that allow MELTS-style calculations, such as crystallization and melting paths. These routines provide simple Python interfaces, making it easy to customize simulations and integrate model runs into existing software and applications.
In June 2021, the first research project based on ENKI was released and published. VESIcal, created by Kayla Iacovino, Simon Matthews, and Penny Wieser, is a generalized Python library for making calculations and plots related to mixed volatile (H2O-CO2) solubility in silicate melts. You can view demonstrations on the VESIcal YouTube channel. Since then, other tools, such as VapoRock and PyUserCalc have also been built and released within the ENKI ecosystem. The alphaMELTS project is also built upon ENKI-hosted libraries.
As a cloud-based tool, ENKI can be accessed from any web browser on any hardware platform. A user simply needs a GitLab account and a basic knowledge of Python to begin using ENKI’s MELTS-based thermodynamic modeling tools. Additionally, a locally-installable version of ThermoEngine is currently in development, as well as graphical user interfaces for routine scientific calculations.
Technical Details
The ENKI cloud server provides access to ThermoEngine, an open-source Python library that provides standardized APIs for using thermodynamic models of minerals, melts, and fluids, alongside generic algorithms for minimizing thermodynamic potentials and finding equilibrium assemblages. At present, ThermoEngine includes the complete set of the MELTS family of models, and work is in progress to add other databases. Model development is supported by the coder module, which utilizes a symbolic math library (sympy) to automatically generate all necessary C-code for use with thermoengine’s generic equilibration algorithms. The source code for ThermoEngine is available on gitlab, and the full documentation is available here.
Beyond the code itself, ENKI also manages a community cluster, which enables simulations and model development to be carried out in the cloud, using a containerized Jupyter server platform.
ThermoEngine Local Install
Do you miss the old days of installing MELTS on your laptop and running calculations without any need for internet access? Imagine doing exactly that, but using models that run orders of magnitude faster, are more robust, and include the latest thermodynamic models. This is what local ThermoEngine installation is all about.
The ENKI development team is currently working on a locally-installable version of the ThermoEngine package. It will allow users to quickly and easily install ThermoEngine on their own machine. This will allow easy and seamless installation and usage for researchers on their personal computers (no network access or logins required). It is also the simplest way to build custom scripted simulations requiring long runtimes and to develop extended modeling capabilities.
MELTS 2.0
ENKI PI Aaron S. Wolf will soon be releasing the MELTS 2.0 project, which introduces a new unified foundation model for silicate melting. MELTS 2.0 utilizes Baysian model calibration—providing automatic & robust uncertainty estimates for every user simulation—and also paves the way for unifying models across a broad range of pressure, redox, and compositional conditions, with particular application to non-terrestrial and other exotic settings.
MagmaForge
ENKI PI Aaron S. Wolf has developed the MagmaForge python library for providing more convenient access to commonly used ThermoEngine functions as well as a forthcoming GUI interface. This code provides functionality similar to the original downloadable MELTS software and is perfect for routine crystallization simulations.
pyDEW
ENKI developer Simon Matthews is currently working on a set of tools for interacting with the Deep Earth Water model (DEW). It will be possible to run EQ3/6 style calculations via a python interface, or interact with the DEW model directly through ThermoEngine and the Equilibrate module. This will considerably widen the range of model applications for the DEW model, including complex multi-stage reaction paths.
Integrated Simulation of Magmas and S-Cl-F-rich Fluids
ENKI PI Mark Ghiorso is currently working on an integrated magma, crystal, and aqueous fluid calculator. This effort involves expanding the MELTS model to incorporate S, Cl, and F into the magma model, while additionally adding these components to the aqueous species present in an equilibrium fluid. This effort combines ThermoEngine and pyDEW (along with multiple new thermodynamic models) to predict the coupled evolution of a multi-phase system containing magma, crystals, and extraordinarily solute-rich fluids, providing an unprecedentedly realistic view of the evolution of high pressure fluid-rich systems, such as occur in ore-forming regions.
Teaching Tools
ENKI developers Simon Matthews and Suzanne Birner are working to bring ENKI into the classroom! The ENKI cluster provides a straightforward way to incorporate thermodynamic calculations and modeling into a petrology or volcanology course, without the need to install complicated software packages on student devices. Teaching activities are being developed using Jupyter Notebooks and will be made publically available to the geoscience education community.
Interoperability
A long-term goal of ENKI is to make thermodynamic models easy to compare, combine, and adapt to new geologic applications. Currently, many different thermodynamic models and databases exist for geologic systems (e.g., Berman, 1988 / Holland and Powell, 1998+ / Stixrude and Lithgow-Bertelloni, 2005+), as well as many programs for interacting with these models (e.g., MELTS / THERMOCALC / PerpleX / Theriak-Domino / MageMin / RCrust). ENKI aims to provide a platform for comparing and combining models, offering powerful descriptive and predictive capabilities. The fully generalized thermochemical modeling language employed by ENKI allows for rapid development of highly efficient code for thermodynamic modeling of geological phases (e.g. melts, minerals, vapors, and fluids). Additionally, the MELTS 2.0 calibration pipeline provides a general template for calibrating entirely new models and validating their performance against existing tools.