laplacianCahnHilliardFoam#
Description#
laplacianCahnHilliardFoam is a basic WashOpenFOAM solver designed to model the process of phase separation using the Cahn-Hilliard equation.
It captures the evolution of an order parameter (concentration) driven by the minimisation of a free-energy functional, which includes a double-well bulk potential and an interfacial gradient energy term.
This solver acts as a foundational component for diffuse interface (phase-field) methods in multiphase flows.
Mathematical Formulation#
The solver tracks the time evolution of a conserved scalar field T (the order parameter or concentration), bounded between 0 and 1, representing the volumetric fraction of a specific phase.
The evolution is governed by the Cahn-Hilliard equation:
where:
\(M\) is the mobility parameter.
\(\psi\) is the chemical potential.
The chemical potential \(\psi\) is defined as the variational derivative of the total free energy:
The homogeneous free energy density derivative \(\frac{d W(T)}{d T}\) takes the form of a double-well potential designed with minima at \(T = 0\) and \(T = 1\):
The parameter \(\epsilon\) controls the thickness of the diffuse interface between the separated phases.
Usage#
To configure laplacianCahnHilliardFoam, you must define the order parameter, chemical potential, and the associated transport properties.
1. Required Fields (0/ directory)
T: The order parameter (concentration). Must be initialised in the0/directory.psi: The chemical potential. While it is written automatically during the simulation, generic boundary conditions (likezeroGradient) must be specified in the initial directory.
2. Transport Properties (constant/transportProperties)
You must define the interface thickness (epsilon) and the mobility (M).
// constant/transportProperties
epsilon epsilon [0 1 0 0 0 0 0] 0.01;
M M [0 2 -1 0 0 0 0] 1.0;
3. Solver Configuration (system/controlDict)
// system/controlDict
application laplacianCahnHilliardFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 10;
deltaT 0.001;
writeControl timeStep;
writeInterval 100;
4. Discretisation Schemes (system/fvSchemes)
Appropriate numerical schemes must be provided for the Laplacian terms (e.g., laplacian(epsilon|epsilon,T)) and the time derivative (ddt(T)).
Tutorials#
Example tutorial cases demonstrating laplacianCahnHilliardFoam are available in:
tutorials/basic/laplaceCahnHilliardFoam/phaseSeparation: Simulation of spinodal decomposition and phase separation kinetics using the Cahn-Hilliard model.