AllenCahn1D

Derivation of the exact solution: The Allen Cahn equation admits a 1D solution that can be used to test the implementation.

  • The energy functional in 1D is

    \[F = \int_\Omega \Big(\lambda W(\alpha) + \frac{1}{2}\kappa \Big(\frac{d\alpha}{dx}\Big)^2 \Big)d\,\mathbf{x}\]
  • At steady-state, the Euler-Lagrange equation is:

    \[-\frac{1}{L}\frac{\partial\alpha}{\partial t} = \lambda \frac{dW}{\partial \alpha} - \kappa \frac{d^2\alpha}{dx^2} = 0\]

    Or, simply

    \[\lambda \frac{dW}{\partial \alpha} = \kappa \frac{d^2\alpha}{dx^2}\]
  • This is a nonlinar ODE, however, it can be reduced by multiplying both sides by \(\frac{d\alpha}{dx}\) (prime indicates derivative with respect to argument)

    \[ \begin{align}\begin{aligned}\lambda\frac{dW}{d\alpha}\frac{d\alpha}{dx} &= \lambda\frac{dW}{dx}\\\kappa\frac{d^2\alpha}{dx^2}\frac{d\alpha}{dx^2} &= \frac{1}{2}\kappa\frac{d}{dx}\Big(\frac{d\alpha}{dx}\Big)^2\end{aligned}\end{align} \]

    Substituting into the above expression we obtain:

    \[\lambda\frac{dW}{dx} = \frac{1}{2}\kappa\frac{d}{dx}\Big(\frac{d\alpha}{dx}\Big)^2\]

    which, when integrated, becomes

    \[\frac{d\alpha}{dx} = \sqrt{\frac{2\lambda}{\kappa} W(\alpha) + C_0}\]

    We will let \(C_0\) be zero for the moment.

  • Next, we substitute the expression for \(W\)

    \[W(\alpha) = \alpha^2(1-\alpha)^2\]

    which has a very convenient square root.

  • Now we have a nonlinar, but almost solvable differential equation:

    \[\frac{d\alpha}{dx} = \gamma \alpha(1-\alpha)\]

    where we define \(\gamma=\pm\sqrt{\frac{2\lambda}{\kappa}}\). This differential equation can be solved by the substitution

    \[u = \alpha^{-1} \implies \alpha=u^{-1}, \frac{d\alpha}{dx} = -u^{-2}\frac{du}{dx}\]

    which, when substituting, gives

    \[\frac{du}{dx} + \gamma u = \gamma\]

    This has the straightforward solution

    \[u(x) = C_1e^{-\gamma x} + 1\]

    resulting in the following solution for \(\alpha\)

    \[\alpha(x) = \frac{1}{C_1e^{-\gamma x} + 1}\]

    We desire a solution centered at \(x=0\), i.e. such that \(y(-x)=1-y(x)\). One can see that this is satisfied only when \(C_1=1\). So the interfacial solution is:

    \[\boxed{\alpha(x) = \frac{1}{e^{-\gamma x} + 1}}\]

Determination of interface width \(\varepsilon\): we estimate the interface width based on the slope of \(\alpha\) at \(x=0\). The slope at the center point is

\[\frac{d+\alpha}{dx}\Bigg|_{x=0} = \frac{\gamma e^{-\gamma x}}{(e^{-\gamma x} + 1)^2}\Bigg|_{x=0} = \frac{\gamma}{4} \approx \frac{1}{\varepsilon} \implies \varepsilon = \boxed{\sqrt{\frac{8\kappa}{\lambda}}}\]

Determination of interface energy \(\sigma\): this is given by substituting the solution into the free energy functional:

\[\sigma = F\Big[\frac{1}{e^{-\lambda x} + 1}\Big]\]

The gradient portion is:

\[\int_{-\infty}^\infty \frac{1}{2}\kappa \Big(\frac{d\alpha}{dx}\Big)^2\,dx = \frac{1}{12}\kappa\gamma = \frac{1}{6}\sqrt{\frac{\kappa\lambda}{2}}\]

And the chemical potential portion is

\[\int_{-\infty}^\infty \lambda W[\alpha] dx = \lambda \frac{5}{6\gamma} = \frac{5}{6}\sqrt{\frac{\kappa\lambda}{2}}\]

Giving the final relationship

\[\boxed{\sigma = \sqrt{\frac{\kappa\lambda}{2}}}\]

Inverting the relationship: It may be more desirable to define behavior in terms of interface energy and width. One can then show that

\[\boxed{\lambda = \frac{4 \,\sigma}{\varepsilon}}, \, \, \, \boxed{\kappa = \frac{\sigma\varepsilon}{2}}\]

Writing the free energy in terms of these quantities gives

\[F = \int_\Omega \Big(\frac{4\sigma}{\varepsilon} W(\alpha) + \frac{\sigma\varepsilon}{4} \Big(\frac{d\alpha}{dx}\Big)^2 \Big)d\,\mathbf{x}\]

eps_0.50_sigma_0.05

Two-dimensional

Serial

Validated using check script

./bin/alamo-2d-g++ tests/AllenCahn1D/input  ch.eps="0.50" ch.sigma="0.05"

eps_0.50_sigma_0.1

Two-dimensional

Serial

Validated using check script

./bin/alamo-2d-g++ tests/AllenCahn1D/input  ch.eps="0.50" ch.sigma="0.1"

eps_0.05_sigma_0.05

Two-dimensional

Serial

Validated using check script

./bin/alamo-2d-g++ tests/AllenCahn1D/input  ch.eps="0.05" ch.sigma="0.01"
Input file (../../tests/AllenCahn1D/input)
#@
#@ [eps_0.50_sigma_0.05]
#@ exe=alamo
#@ dim=2
#@ args = ch.eps=0.50
#@ args = ch.sigma=0.05
#@ check-file = eps_0.50_sigma_0.05
#@
#@ [eps_0.50_sigma_0.1]
#@ exe=alamo
#@ dim=2
#@ args = ch.eps=0.50
#@ args = ch.sigma=0.1
#@ check-file = eps_0.50_sigma_0.1
#@
#@ [eps_0.05_sigma_0.05]
#@ exe=alamo
#@ dim=2
#@ args = ch.eps=0.05
#@ args = ch.sigma=0.01
#@ check-file = eps_0.05_sigma_0.01
#@

alamo.program = allencahn

### OUTPUT ###

plot_file = tests/AllenCahn1D/output

### MESHING ###

# Specify system units
system.length = m
system.time   = s

amr.plot_int = 1000
amr.max_level = 3
amr.max_grid_size = 500000
amr.blocking_factor = 2
amr.grid_eff = 0.8
amr.n_cell = 64 4 0

geometry.prob_lo = -1.0_m  0.000_m 0.0_m # [ m ] 
geometry.prob_hi =  1.0_m  0.125_m 0.0_m # [ m ]

geometry.is_periodic = 0 0 0

timestep  = 1.0_ms
stop_time = 5.0_s

alpha.bc.constant.type.xlo = neumann
alpha.bc.constant.type.xhi = neumann
alpha.bc.constant.type.ylo = neumann
alpha.bc.constant.type.yhi = neumann

alpha.ic.type = expression
alpha.ic.expression.region0 = "x>0"

ch.L = 1.0_1/Pa/s
ch.eps = 0.100.0_m
ch.sigma = 0.01_J/m^2