4.3.1 pde.pdes.allen_cahn module
A Allen-Cahn equation.
- class AllenCahnPDE(interface_width=1, mobility=1, *, bc=None)[source]
Bases:
PDEBase
A simple Allen-Cahn equation.
The mathematical definition is
\[\partial_t c = \gamma \nabla^2 c - c^3 + c\]where \(c\) is a scalar field and \(\gamma\) sets the (squared) interfacial width.
- Parameters:
interface_width (float) – The diffusivity of the described species
mobility (float) – The rate at which the structures evolve
bc (BoundariesData | None) – The boundary conditions applied to the field. Boundary conditions are generally given as a dictionary with one condition for each axis side. For periodic axes, only periodic boundary conditions are allowed (indicated by ‘periodic’ and ‘anti-periodic’). For non-periodic axes, different boundary conditions can be specified for the lower and upper end (using specific identifiers, like x- and y+). For instance, Dirichlet conditions enforcing a value NUM (specified by {‘value’: NUM}) and Neumann conditions enforcing the value DERIV for the derivative in the normal direction (specified by {‘derivative’: DERIV}) are supported. Note that the special value ‘auto_periodic_neumann’ imposes periodic boundary conditions for periodic axis and a vanishing derivative otherwise. More information can be found in the boundaries documentation.
- default_bc = 'auto_periodic_neumann'
Default boundary condition used when no specific conditions are chosen.
- evolution_rate(state, t=0)[source]
Evaluate the right hand side of the PDE.
- Parameters:
state (
ScalarField
) – The scalar field describing the concentration distributiont (float) – The current time point
- Returns:
Scalar field describing the evolution rate of the PDE
- Return type:
ScalarField