Skip to content

Commit

Permalink
revision for acceptance
Browse files Browse the repository at this point in the history
  • Loading branch information
SunyongKwon committed Jul 30, 2024
1 parent e2d07f6 commit 84c7768
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

## Contributing

Contributing to Equilipy is easy: just open a
[pull request](https://help.github.com/articles/using-pull-requests/).
Make `main` the destination branch on the [Equilipy
repository](https://github.com/ORNL/Equilipy) and allow edits from
maintainers.

Your pull request must work with all current Equilipy tutorial examples
and be reviewed by at least one Equilipy developer.
12 changes: 6 additions & 6 deletions paper/paper.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ tags:
- CALPHAD
- Thermodynamics
- Gibbs Energy Minimization
- Alloy Desing
- Alloy Design
- Python
authors:
- name: Sun Yong Kwon
Expand All @@ -31,16 +31,16 @@ bibliography: paper.bib
---

# Summary
The CALPHAD (CALculation of PHAse Diagram) approach [@CALPHAD:1998] provides predictions for thermodynamically stable phases in multicomponent-multiphase materials across a wide range of temperatures. Consequently, the CALPHAD calculations became an essential tool in materials and process design [@Luo:2015]. Such design tasks frequently require navigating a high-dimensional space due to multiple components involved in the system. This increasing complexity demands for high-throughput CALPHAD calculations, especially in the rapidly evolving field of alloy design.
The CALPHAD (CALculation of PHAse Diagram) approach [@CALPHAD:1998] provides predictions for thermodynamically stable phases in multicomponent-multiphase materials across a wide range of temperatures. Consequently, the CALPHAD calculations became an essential tool in materials and process design [@Luo:2015]. Such design tasks frequently require navigating a high-dimensional space due to multiple components involved in the system. This increasing complexity demands high-throughput CALPHAD calculations, especially in the rapidly evolving field of alloy design.

In response to the need, we developed Equilipy an open-source Python package designed for calculating phase equilibria of multicomponent-multiphase systems. Equilipy is specifically tailored for high-throughput CALPHAD calculations, offering parallel computations across multiple processors and nodes with the given *NPT* input conditions namely elemental compositions (*N*), pressure (*P*), and temperature (*T*). Equilipy utilizes the program structure and Gibbs energy functions from the Fortran-based program, Thermochimica [@Thermochimica:2013], with incorporating a new Gibbs energy minimization algorithm. This algorithm, originally developed by Capitani and Brown in 1987 [@Capitani:1987], has been revised and implemented to enhance the stability and performance of calculations. The Fortran codes are precompiled and interfaced with Python via `F2PY`, ensuring high computation speed. Benchmark tests shown in \autoref{Fig1} demonstrate that Equilipy's computation speed is comparable to those of established commercial software, TC-Python and PanPython. This result highlights its efficiency and potential applications in various scientific and industrial fields.

![A parallel benchmark computation on (a) Windows (Intel Core i7-12700, 2.1 GHz) and (b) Linux (Intel Xeon E5-2650, 2.0 GHz) for multiple processors: The computation involves 8,096 equilibrium calculations in a four-component system that has 63 different phases.\label{Fig1}](figures/Fig1.svg){ width=98% }

# Statement of need
Commercial thermochemical software packages such as Thermo-Calc [@ThermoCalc:2002], FactSage [@FactSage:2016], and Pandat [@Pandat:2009] are the standard for phase equilibrium calculations. However, exploring a broad spectrum of alloy chemistries is often hindered by the considerable computational time required. Such computational demands create a bottleneck in effective alloy design processes. While efforts to leverage High-Performance Computing (HPC) have been initiated to expedite computational speed, these attempts are often limited by licensing constraints such as the number of processors available for use (e.g., TC-Python permits only up to 32 logical processors per each license).
Commercial thermochemical software packages such as Thermo-Calc [@ThermoCalc:2002], FactSage [@FactSage:2016], and Pandat [@Pandat:2009] are the standard for phase equilibrium calculations. However, exploring a broad spectrum of alloy chemistries is often hindered by the considerable computational time required. Such computational demands create a bottleneck in effective alloy design processes. While efforts to leverage high-performance computing (HPC) have been initiated to expedite computational speed, these attempts are often limited by licensing constraints such as the number of processors available for use (e.g., TC-Python permits only up to 32 logical processors per each license).

Given these limitations and the pressing need for more effective alloy design processes, developing an open-source program tailored for high-throughput CALPHAD calculations becomes imperative. The envisioned program should not only eliminate the constraints on processor usage, but also ensure high calculation stability. Furthermore, the program should operate on Linux system and support parallel computing to be compatible with HPC environments. An intuitive program architecture is preferred to enhance accessibility for researchers and practitioners in the field.
Given these limitations and the pressing need for more effective alloy design processes, developing an open-source program tailored for high-throughput CALPHAD calculations becomes imperative. The envisioned program should not only eliminate the constraints on processor usage, but also ensure high calculation stability. Furthermore, the program should operate on Linux systems and support parallel computing to be compatible with HPC environments. An intuitive program architecture is preferred to enhance accessibility for researchers and practitioners in the field.

# Software overview
Equilipy is designed to compute thermodynamically stable phases from a specified *NPT* ensemble (i.e., *N*: elemental composition, *P*: pressure, *T*: temperature). The four-step process for calculating phase equilibria is illustrated in \autoref{Fig2}. This process closely mirrors experimental procedures; thus, it is highly intuitive even for the users primarily experienced in experimental work. Calculating phase equilibria involves minimizing a set of Gibbs energy functions for all relevant phases. Therefore, utilizing Equilipy necessitates a Gibbs energy database developed through the CALPHAD approach.
Expand Down Expand Up @@ -81,7 +81,7 @@ Exploring Scheil-Gulliver solidification offers a robust framework for assessing

\autoref{Fig6} illustrates the metastable phase equilibrium calculations for both (a) equilibrium calculations and (b) Scheil-Gulliver solidification. For each case, a set of custom-selected phases was applied as outlined in step 2 of \autoref{Fig2}. The equilibrium calculations shown in \autoref{Fig6}(a) use the same input conditions as those in \autoref{Fig3}(a), but with the suppression of the GAMMA, ALCU_ETA, and ALCU_THETA phases. Similarly, the conditions for Scheil-Gulliver solidification shown in \autoref{Fig5}(b) are replicated in \autoref{Fig6}(b) without taking into account the FCC_A1 phase. This approach to calculate metastable phase equilibria is also available in FactSage. As shown in \autoref{Fig6}, the results obtained from both Equilipy and FactSage are remarkably consistent for the calculations of metastable phase equilibria.

![Metastable phase equilibria for (a) isopleth at 600 K with suppressing GAMMA, ALCU_ETA, and ALCU_THETA phases, and (b) Scheil-Gulliver solidification of the A380 alloy (one mole) with suppresing FCC_A1 phase.\label{Fig6}](figures/Fig6.svg){ width=100% }
![Metastable phase equilibria for (a) isopleth at 600 K with suppressing GAMMA, ALCU_ETA, and ALCU_THETA phases, and (b) Scheil-Gulliver solidification of the A380 alloy (one mole) with suppressing FCC_A1 phase.\label{Fig6}](figures/Fig6.svg){ width=100% }

# Parallel computing
Equilipy leverages parallel computing to calculate multiple input conditions simultaneously through its `equilib_batch()` function. Since computations between input conditions are fully independent, they are executed through embarrassingly parallel runs. Note that parallel computing is not applied to compute a single input condition. By default, Equilipy uses all available processors on a single computing node, though users have the option to specify a different number of processors. In multi-node environments, users are required to configure the number of nodes and processors using a Message Passing Interface (MPI) such as `OpenMPI` or `MPICH`. Equilipy employs `mpi4py` for interfacing with MPI programs.
Expand Down Expand Up @@ -132,7 +132,7 @@ Equilipy leverages parallel computing to calculate multiple input conditions sim

For geological applications, the Gibbs energies of non-ideal solution phases are described by Margules parameters as a function of composition, pressure, and temperature. In contrast, the CALPHAD approach focuses on structure-based Gibbs energy descriptions at 1 atm pressure using solution models such as the compound energy formalism (CEF) for long-range ordering and the modified quasichemical models for short-range ordering. These variations in free energy descriptions are well-documented in the literature for the CALPHAD approach [@CALPHAD:1998] and for geological applications [@Holland:2011].

Note that there is no general consensus on a thermochemical database format. Each software often has its own format. The database format used in Equilipy (`.dat`) is compatable in FactSage [@FactSage:2016], PyCalphad [@PyCALPHAD:2017], and Thermochimica [@Thermochimica:2013].
Note that there is no general consensus on a thermochemical database format. Each software often has its own format. The database format used in Equilipy (`.dat`) is compatible in FactSage [@FactSage:2016], PyCalphad [@PyCALPHAD:2017], and Thermochimica [@Thermochimica:2013].

# Limitation and future plan
The current version of Equilipy (0.1.4) is specifically designed for metallic systems and currently lacks the capability to handle calculations for systems composed of non-elemental species, such as oxides, sulfides, carbides, nitrides, etc. Integration of these calculations with non-elemental species is planned for the upcoming version. Additionally, the existing thermochemical database parser in Equilipy is compatible only with the older ChemSage data format `.dat`, available from FactSage 7.3. It's important to note that Equilipy does not support the newer ChemSage `.dat` data format introduced in FactSage 8.0 or later, nor the `.tdb` data format used by Thermo-Calc and Pandat. Enhancements to incorporate parsers for these newer database structures are also planned for the next release of Equilipy.
Expand Down

0 comments on commit 84c7768

Please sign in to comment.