HPC Tier Module

Phase-Field Solidification (Allen-Cahn / Cahn-Hilliard)

2D Allen-Cahn and Cahn-Hilliard phase-field solver with its physical invariants measured each run.

Worked example: Allen-Cahn shrinking disk (energy decreases)
Inputs
Modelallen_cahn
Initial fieldcircle
Grid n (n x n)64
Grid spacing dx1
Gradient length eps (interface width ~ 3.11 eps)1.5
Mobility M1
Time steps4000
Time step dt (0 = auto-stable)0
Result

Allen-Cahn 64x64: free energy monotone-decreasing (max +jump 0.00e+0), F 4.432e+1 -> 6.092e-222 over 4000 steps. GeoNum energy-decrement conditioning: UNRELIABLE (drift 4096.0/2048, a signal not extra precision).

ModelAllen-Cahn (non-conserved, 2nd-order)
Invariant gateFree energy monotone-decreasing
Grid / spacing64 x 64 cells, dx = 1
eps (interface width ~ 9.322)1.5
Mobility M1
dt used4.444e-2
Stability cap dt_max4.444e-2
Steps / sim time4000 / 1.778e+2
Free energy F0 -> F_end4.4323e+1 -> 6.0922e-222
Energy drop (F0 - F_end)4.4323e+1
Max positive energy jump0.000e+0 (tol 4.4e-8)
Mass drift (NOT an AC invariant)-8.506e+2 - expected; Allen-Cahn does not conserve mass

Computed by Phase-Field Solidification (Allen-Cahn / Cahn-Hilliard) v1.0.0, the same plugin code the GDBS app runs, when this page was built. To run it on your own figures, open it in GDBS HPC.

The problem

Phase-field prototyping needs a solver whose physical invariants are actually verified, not assumed - and whose stiff stability limit is handled so a default run does not silently blow up.

The local-first solution

This solver integrates the Allen-Cahn and Cahn-Hilliard equations on a periodic grid with a standard double-well in your browser, measures the free-energy decrease and total-mass conservation each run, fits the realized interface width against the exact tanh profile, and auto-caps the stiff time step. Deterministic f64 math, nothing uploaded.

What it does

Allen-Cahn (non-conserved L2 gradient flow) with measured monotone free-energy decrease
Cahn-Hilliard (conserved 4th-order) with measured total-mass conservation
Standard symmetric double-well f(phi)=phi^2(1-phi)^2 on a periodic square grid
5-point Laplacian with explicit forward-Euler time stepping and surfaced stability caps
Exact tanh planar-interface anchor with realized width fit versus eps
GeoNum drift probe of the near-equilibrium free-energy decrement

Honest scope

EXACT: the finite-difference stencils, double-well algebra, forward-Euler stepping, and the measured energy and mass series in f64. Mobility M, gradient coefficient eps, dx, and dt are dated model inputs - the analytic width (~3.11 eps) and stability caps derive from them and are echoed back. NOT modeled: anisotropy/dendritic side-branching, thermal coupling, elastic/advective coupling, implicit/spectral stepping, or >2D. A prototype at browser grid sizes, not a production dendrite code.

Authorities cited

Get an email when tools like this one change

Leave your email and we will tell you when we add or update Numerics & Tools tools like this one, at most once a month.

We email you once to confirm. After that, unsubscribe from any issue in one click. Your address goes to VaultSync only (privacy).

Related tools

Solve with invariants verified

Run the solver in your browser with nothing uploaded, then save the energy and mass series to a Sandbox workspace or attach them to a Worklog case.

GDBS by VaultSync Solutions Inc. - Verifiable Computation. gdbs.getvaultsync.com