AllenCahnProblem#
Formulation of the Allen Cahn problem.
- class AllenCahnProblem(alpha=0.0001, beta=5)[source]#
Bases:
TimeDependentProblem,SpatialProblemImplementation of the one-dimensional Allen-Cahn problem on the space-time domain \(\Omega\times T = [-1, 1] \times [0, 1]\).
The problem is governed by the Allen-Cahn equation
\[\frac{\partial u}{\partial t} - \alpha \frac{\partial^2 u}{\partial x^2} + \beta \left(u^3 - u\right) = 0,\]where \(u = u(x, t)\) is the solution field, \(\alpha\) is the diffusion coefficient, and \(\beta\) is the reaction coefficient.
Periodic boundary conditions are imposed at the spatial boundaries:
\[u(-1, t) = u(1, t), \qquad t \in [0, 1].\]The initial condition is prescribed as
\[u(x, 0) = x^2 \cos(\pi x), \qquad x \in [-1, 1].\]See also
Original reference: Sokratis J. Anagnostopoulos, Juan D. Toscano, Nikolaos Stergiopulos, and George E. Karniadakis. Residual-based attention and connection to information bottleneck theory in PINNs. Computer Methods in Applied Mechanics and Engineering 421 (2024): 116805 DOI: 10.1016/ j.cma.2024.116805.
- Example:
>>> problem = AllenCahnProblem()
Initialization of the
AllenCahnProblem.