4.3.3. pde.pdes.cahn_hilliard module

A Cahn-Hilliard equation

class CahnHilliardPDE(interface_width=1, bc_c='auto_periodic_neumann', bc_mu='auto_periodic_neumann')[source]

Bases: PDEBase

A simple Cahn-Hilliard equation

The mathematical definition is

\[\partial_t c = \nabla^2 \left(c^3 - c - \gamma \nabla^2 c\right)\]

where \(c\) is a scalar field taking values on the interval \([-1, 1]\) and \(\gamma\) sets the (squared) interfacial width.

Parameters:
diagnostics: Dict[str, Any]

Diagnostic information (available after the PDE has been solved)

Type:

dict

evolution_rate(state, t=0)[source]

evaluate the right hand side of the PDE

Parameters:
  • state (ScalarField) – The scalar field describing the concentration distribution

  • t (float) – The current time point

Returns:

Scalar field describing the evolution rate of the PDE

Return type:

ScalarField

explicit_time_dependence: bool | None = False

Flag indicating whether the right hand side of the PDE has an explicit time dependence.

Type:

bool

property expression: str

the expression of the right hand side of this PDE

Type:

str