Skip to content

Sublattice Model

SublatticeModel implements a CALPHAD-style sublattice description of the Gibbs free energy. It represents a phase by its sublattices, each with its own set of species, and evaluates the total molar Gibbs energy as the sum of an ideal mixing term, a reference term, and the interaction (excess) contributions between species on each sublattice. The resulting function is what GrandPotential integrates to get the grand potential density of the phase.

Key Classes and Concepts

  • SublatticeModel: CALPHAD-style sublattice + species representation. Supplies the molar Gibbs energy Gm(T,y), its derivatives, and the chemical potentials.

The molar Gibbs energy is commonly written as

(1)Gm=IyIGI+RTsasiyi(s)lnyi(s)+exGm,

with the first term the mechanical mixture of end-member energies GI, the second the ideal-mixing entropy per sublattice s with site stoichiometry as and site fractions yi(s), and the last the excess / interaction contribution. Transcribe the exact form used by your thermodynamic database; the code evaluates whatever parameters are loaded.

Usage

Input

SublatticeModel does not expose a standalone @SublatticeModel block in the .opi input — its state is populated programmatically (from a TDB / YAML / custom loader) and attached to a ThermodynamicPhase.

Output

No dedicated output. The evaluated Gibbs energy and its derivatives flow into the grand-potential solver's per-phase grand-potential density.

Example

cpp
#include "Thermodynamics/SublatticeModel.h"

// Constructed inside a thermodynamic-database loader; not usually
// instantiated directly by the user's main(). Once populated, it is
// attached to a ThermodynamicPhase.

Dependencies

Released under the GNU GPLv3 License.