Equilipy for computing multicomponent-multiphase equilibria
equilipy is an open-source Python package for multicomponent-multiphase
equilibrium calculations based on the CALPHAD
(CALculation of PHAse Diagram) approach. Given a thermochemical database and
input conditions (composition, pressure, and temperature), it computes the
equilibrium phase configuration, amounts, compositions, and thermochemical
properties. equilipy uses the Gibbs energy descriptions furnished by
THERMOCHIMICA with the modified Gibbs energy minimization
algorithm inspired by Eriksson[1] and de Capitani and Brown.[2]
User guide
Quick start
Quick installation
Core package:
pip install equilipy
Desktop GUI (adds the equilipy.gui command):
pip install 'equilipy[gui]'
MPI helpers for clusters:
pip install 'equilipy[hpc]'
Database availability
Equilipy reads two thermochemical database formats:
Format |
Reader |
Notes |
|---|---|---|
ChemSage/FactSage |
|
Legacy (7.3) and modern (8.3+) dialects are auto-detected, including validated MQM/SUBG/SUBQ solution-model canaries. |
Thermo-Calc style |
|
CEF solution models, magnetic contributions, and order/disorder ( |
An example Al-Cu-Mg-Si database (assessments from
COST507) ships in the
repository’s database/ folder. For larger databases such as Al–Co–Cr–Fe–Mn–Ni–C, please check out publications in CALPHAD journal.
Example
import equilipy as eq
DB = eq.read_dat("database/AlCuMgSi_ORNL_FS83.dat")
NPT = {"T": 700, "P": 1, "Al": 0.06, "Cu": 0.42, "Si": 0.52}
res = eq.equilib_single(DB, NPT)
print(res.stable_phases.names) # stable phase names
print(res.G, res.H, res.S) # system properties, J and J/K
More runnable scripts are in the repository’s example folder:
python example/Example01_SingleEquilib.py
Continue with Python scripting for batch calculations, solidification, and results handling, or GUI for the desktop application.
Note
Examples use the Polars dataframe library and its fastexcel
Excel reader, both installed by default. On old CPUs use
pip install polars-lts-cpu.
About the project
Equilipy is copyright 2024-present by U.S. Department of Energy.
License
Equilipy is distributed under a BSD 3-Clause License.
Code of Conduct
We as contributors and maintainers pledge to make participation in our project and community a positive experience for everyone.
View our Code of Conduct on our GitHub repository.