Diffusion
The diffusion module group covers solute transport on the simulation grid and its coupling to the phase-field. Several complementary solvers share the same field layer (Composition) but differ in their thermodynamic assumptions. This page gives the overview and the shared conventions; each solver has a dedicated page (see Solvers below).
For the theoretical background of partitioning and driving force, see Thermodynamics and Diffusion.
Key Classes and Concepts
EquilibriumPartitionDiffusionBinary: binary-alloy solver based on local equilibrium partitioning at interfaces, with an optional anti-trapping current.InterfaceDiffusion: adds a flux confined to the diffuse interface (grain-boundary / surface diffusion).Composition: the shared concentration storage; read by every solver above.
Models
Equilibrium-partition binary diffusion
Concentration evolves through a Fickian term with an optional anti-trapping correction:
with the phase-weighted diffusivity $EnableAntiTrapping = Yes. The driving force model is chosen via $DrivingForceModel (default STANDARD) and the spatial stencil via $DiffusionStencil (default ISOTROPIC).
Stoichiometric phases are flagged per component via $Flag_<n> and are not solved but kept at their reference composition.
Interface diffusion
InterfaceDiffusion injects a tangential flux that is active only where $Threshold. The flux is scaled by $dSR and per-component $dIDC_<n>, and is averaged over a stencil of size $Range when $Average = Yes.
Usage
Input — Equilibrium-partition binary
Placed in the @EquilibriumPartitionDiffusionBinary block.
@EquilibriumPartitionDiffusionBinary
$RefElement Reference component : Fe
$EnableAntiTrapping Enable anti-trapping current : Yes
$ConsiderChemicalPotential Use chemical-potential formulation : No
$DrivingForceModel Driving-force model : STANDARD
$DiffusionStencil Spatial stencil : ISOTROPIC
$Flag_0 Stoichiometric phase 0 : No
$IDC_0 Interface diffusion coefficient for phase 0 : 1.0
$DC_0 Bulk diffusion coefficient for phase 0 : 1.0e-12
$AE_0 Activation energy for phase 0 : 150000
$EF_0 Entropy factor for phase 0 : 0.0
$Cs_0_1 Solvus concentration (0 in 1) : 0.05
$Ts_0_1 Solvus temperature (0 in 1) : 1700
$ML_0_1 Liquidus slope (0 -> 1) : -500
$ML_1_0 Liquidus slope (1 -> 0) : 500Input — Interface diffusion
@InterfaceDiffusion
$dSR Interface-diffusion scaling factor : 1.0
$dIDC_0 Interface diffusion coefficient for component 0 : 1.0e-11
$Average Average flux over the interface stencil : Yes
$Range Averaging stencil range : 2
$Threshold Phase-field threshold : 0.05Output
Both solvers update the Composition storage; visual output is handled by Composition::WriteVTK. Flux fields (when written) go through the same VTK pipeline.
Example
See OpenPhase-main/examples/ for a binary-alloy solidification run that constructs EquilibriumPartitionDiffusionBinary alongside Composition, PhaseField, Temperature, and InterfaceProperties.
Solvers
Dependencies
- Composition — shared concentration storage.
- PhaseField — weights the bulk diffusivity.
- Temperature — controls Arrhenius diffusivity.
- InterfaceProperties — supplies the interface-mobility scaling.
- BoundaryConditions, Settings.