Skip to content

Cahn-Hilliard 1D – Wight & Zhao

Example
Source PINNStudio template
Problem Forward
Dimension 1D (x, t)
Regime Time-dependent
Geometry Interval
Outputs u, mu
Settings Default, Tuned

Governing equations

Mathematical form (from the benchmark records):

\[\frac{\partial u}{\partial t} = \frac{\partial^2 \mu}{\partial x^2}, \qquad \mu = \gamma_2 (u^3 - u) - \gamma_1 \frac{\partial^2 u}{\partial x^2}, \qquad x \in [-1, 1],\ t \in [0, 1]\]

Where \(\gamma_1 = 10^{-6}\) and \(\gamma_2 = 0.01\). The fourth-order equation is solved in mixed form: the chemical potential \(\mu\) is a second output, so no residual needs a fourth derivative.

As typed in PINNStudio's Equations page (each expression is a residual, set to zero):

du_t - dmu_xx
(mu - 0.01*(u**3 - u) + 1e-6*du_xx)/0.01

Domain

  • Interval: \(x \in [-1, 1]\)
  • Time interval: \(t \in [0, 1]\)

Initial conditions

Output Initial value How it is imposed (Settings: Default)
u -cos(2*pi*x) loss term
mu 0 not used as a loss term

Boundary conditions

Type Where Output Value Details
Periodic BC left u — axis x, derivative order 0
Periodic BC left mu — axis x, derivative order 0
Periodic BC left u — axis x, derivative order 1
Periodic BC left mu — axis x, derivative order 1

Settings

Settings: Default — the paper's method (Wight & Zhao 2021)

Phase Optimizer Iterations Learning rate Decay
1 Adam 5,000 0.001 none
2 L-BFGS 5,000 — none
Settings: Tuned

The Training Log reports: Tuned settings: the template's own settings (PINNStudio's best for it).

Phase Optimizer Iterations Learning rate Decay
1 Adam 20,000 0.001 none
2 L-BFGS 20,000 — none

Results

The configuration selected in PINNStudio's benchmark study, run on one RTX 4090. Forward: relative L₂ error of each output at the last reference time. Inverse: each parameter's relative error and, per seed, the largest of them (worst parameter error).

Forward problem

Settings: Tuned — the template's own settings. Values: median over seeds 2026, 1, 2.

Output Relative L₂
μ 1.6 × 10⁻³
u 5.2 × 10⁻⁴
abs_mu 2.3 × 10⁻⁶
Forward result: PINN, reference and error, μ
Forward, Tuned settings: PINN, reference and error, μ.
Other outputs (1 figure)

Forward result: PINN, reference and error, u
Forward, Tuned settings: PINN, reference and error, u.

Full benchmark record: every setting tried, the per-seed values and all figures are in the benchmark records on GitHub.

Loading it in PINNStudio

  • Forward: toolbar Examples: › Forward › under the ── 1D ── heading, Cahn-Hilliard 1D – Wight & Zhao › Default or Tuned, then Solve.

Loading an example fills in every setting; anything you change before Solve is listed in the Training Log. Your save folder, GPU, random-seed and plot-style settings are kept.

Reference solution

Notes

  • Forward only: the Inverse mode of this template is withdrawn for now because the parameters were not found (pinnstudio/core/example_catalog.py, FORWARD_ONLY_TEMPLATES).

Definition and records

How the benchmark values were measured and checked: Reproducibility.

← Back to the example gallery