Skip to content

Cahn-Hilliard 1D – Mattey & Ghosh

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

Governing equations

Mathematical form (from the benchmark records):

\[\frac{\partial h}{\partial t} = \frac{\partial^2 \mu}{\partial x^2}, \qquad \mu = \kappa (h^3 - h) - \alpha\kappa \frac{\partial^2 h}{\partial x^2}, \qquad x \in [-1, 1],\ t \in [0, 1]\]

Where \(\alpha = 0.02\) and \(\kappa = 1\). As in the paper (its phase-space form, eq. 19) and the Wight & Zhao example, \(\mu\) is a second output, so no residual needs a fourth derivative. The same paper's 1D Allen-Cahn problem is the Allen-Cahn 1D – Wight & Zhao example, and its 2D Allen-Cahn IBVP-1 is Allen-Cahn 2D – Mattey & Ghosh.

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

dh_t - dmu_xx
mu - 1.0*(h**3 - h) + 0.02*dh_xx

Domain

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

Initial conditions

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

Boundary conditions

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

Settings

Settings: Default — the paper's method (Mattey & Ghosh 2022, bc-PINN)

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

The Training Log reports: Tuned settings: IC as a loss term, exact periodicity, time windows, SA-PINN weights; twice as many time windows. The change is applied to the template's own settings (not the paper's method that Default loads).

Phase Optimizer Iterations Learning rate Decay
1 Adam 5,000 0.001 none
2 L-BFGS 5,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 — 2× time windows. Values: one run, seed 2026.

Output Relative L₂
h 6.3 × 10⁻³
μ 6.2 × 10⁻²
abs_mu 7.6 × 10⁻⁵
Forward result: PINN, reference and error, h
Forward, Tuned settings: PINN, reference and error, h.
Other outputs (1 figure)

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

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 – Mattey & Ghosh › 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