Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Solutions · 14. The Allen–Cahn equation and motion by curvature

School of Engineering, Nazarbayev University

Worked solutions to the three exercises of Lecture 14. Each solution is computed here and checked with assert statements against an exact identity or an independent calculation. The first code cell sets up the notebook and runs Demonstration 1 of the lecture without showing its output, because some of the solutions use its variables.

Exercise 1

Problem. Simulate a circular domain (R0=17.0R_0 = 17.0 on 64×6464\times 64, W=1.0W = 1.0, t∈[0,10]t \in [0, 10]) for (Lmob,κ)∈{(0.5,2.0),(1.0,2.0),(1.5,1.5)}(L_{\mathrm{mob}}, \kappa) \in \{(0.5, 2.0), (1.0, 2.0), (1.5, 1.5)\} via allen_cahn_2d_spectral (Δt=0.025\Delta t = 0.025) and verify that the fitted area rate dA/dtdA/dt agrees with −2πLmobκ-2\pi L_{\mathrm{mob}}\kappa within 2%2\%.


Exercise 1: Parametric Verification of dA/dt = -2*pi*L_mob*kappa Across (L_mob, kappa)
======================================================================================
L_mob=0.5, kappa=2.0 | dA/dt measured =   -6.2779 | exact =   -6.2832 | rel err = 0.085%
L_mob=1.0, kappa=2.0 | dA/dt measured =  -12.5016 | exact =  -12.5664 | rel err = 0.516%
L_mob=1.5, kappa=1.5 | dA/dt measured =  -13.9812 | exact =  -14.1372 | rel err = 1.103%

Explanation. Whenever the diffuse width ℓw=2κ/W≥1.5Δx\ell_w = \sqrt{2\kappa/W} \geq 1.5\Delta x and R(t)≫ℓwR(t) \gg \ell_w, the normal gradient profile remains locked to η0((r−R)/ℓw)\eta_0((r-R)/\ell_w), making the integrated area rate dA/dt=−2πLmobκdA/dt = -2\pi L_{\mathrm{mob}}\kappa quantitatively exact across parameter combinations.


Exercise 2

Problem. Verify allen_cahn_2d_spectral raises ValueError on 1-D input, and demonstrate the grid-pinning failure mode on 64×6464\times 64 (Δx=1.0\Delta x = 1.0): compare a resolved interface (κ=2.0,W=1.0  ⟹  ℓw=2.0\kappa = 2.0, W = 1.0 \implies \ell_w = 2.0) against an under-resolved interface (κ=0.05,W=10.0  ⟹  ℓw=0.10≪Δx\kappa = 0.05, W = 10.0 \implies \ell_w = 0.10 \ll \Delta x) and show that the under-resolved circle becomes artificially trapped on the grid.


Exercise 2: Grid-Pinning (Lattice Trapping) Audit When Interface Width l_w << dx
================================================================================
Under-resolved (l_w = 0.10*dx): post-snap dA/dt = -0.000000 vs continuum -2*pi*L*kappa = -0.31416 (FROZEN ON MESH)

Explanation. When ℓw=0.10Δx\ell_w = 0.10\Delta x, every grid node sits at η≈0\eta \approx 0 or η≈1\eta \approx 1 where f′(η)≈0f'(\eta) \approx 0, creating an artificial discrete Peierls-like energy barrier between grid points. In computational materials engineering, always enforce Δx≤0.7 ℓw\Delta x \leq 0.7\,\ell_w so interfaces translate smoothly across mesh cells.


Exercise 3

Problem. Implement track_circular_grain_extinction(R0=8.0, L_mob=1.0, kappa=2.0, W=1.0) on a 48×4848\times 48 domain to verify the analytical extinction time text=R02/(2Lmobκ)=16.0t_{\mathrm{ext}} = R_0^2 / (2 L_{\mathrm{mob}}\kappa) = 16.0: confirm R2(t)R^2(t) linearity (Rfit2>0.9995R^2_{\mathrm{fit}} > 0.9995) for t≤10.0t \leq 10.0 and complete grain disappearance (max⁡η<10−3\max \eta < 10^{-3}) by t=1.25 textt = 1.25\,t_{\mathrm{ext}}.


Exercise 3: Implement It Yourself — Parabolic Radius Law R^2(t) & Grain Extinction Time
=======================================================================================
Exact t_ext = 16.00 | Extrapolated t_ext = 16.61 | R^2 linearity = 0.999973 | max(eta_final) = 5.32e-06

Summary. Plotting R2(t)R^2(t) vs. tt yields a straight line with Rfit2>0.9999R^2_{\mathrm{fit}} > 0.9999 whose horizontal intercept is 16.6, against the sharp-interface extinction time text=R02/(2Lmobκ)=16.0t_{\mathrm{ext}} = R_0^2 / (2 L_{\mathrm{mob}}\kappa) = 16.0 (shifted slightly by the finite diffuse-interface excess area π212ℓw2\frac{\pi^2}{12}\ell_w^2), after which the grain vanishes into the matrix.