Allen Cahn Equation#

Module for defining the Allen-Cahn equation.

class AllenCahnEquation(alpha, beta)[source]#

Bases: Equation

Implementation of the N-dimensional Allen-Cahn equation, defined as follows:

\[\frac{\partial u}{\partial t} - \alpha \Delta u + \beta(u^3 - u) = 0\]

Here, \(\alpha\) and \(\beta\) are parameters of the equation.

Example:
>>> from pina.equation import AllenCahnEquation
>>> eq = AllenCahnEquation(alpha=1.0, beta=1.0)
>>> # Use within a Condition:
>>> # condition = Condition(domain=domain, equation=eq)

Initialization of the AllenCahnEquation class.

Parameters:
  • alpha (float | int) – The diffusion coefficient.

  • beta (float | int) – The reaction coefficient.