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, its derivatives, and the chemical potentials.
The molar Gibbs energy is commonly written as
with the first term the mechanical mixture of end-member energies
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
#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
- Thermodynamics — theory.
- ThermodynamicPhase — container that holds an instance.
- GrandPotential — consumer.