Skip to content

Cahn-Hilliard 2D – Mattey & Ghosh

Example
Source PINNStudio template
Problem Forward and Inverse
Dimension 2D (x, y, t)
Regime Time-dependent
Geometry Rectangle
Outputs h, mu
Settings Default, Tuned

Governing equations

Mathematical form (from the benchmark records):

\[\frac{\partial h}{\partial t'} = 0.005\left(\frac{\partial^2 \mu}{\partial x^2} + \frac{\partial^2 \mu}{\partial y^2}\right), \qquad \mu = h^3 - h - \alpha\left(\frac{\partial^2 h}{\partial x^2} + \frac{\partial^2 h}{\partial y^2}\right), \qquad (x, y) \in [0, 1]^2,\ t' \in [0, 1]\]

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

dh_t - 0.005*(dmu_xx + dmu_yy)
mu - 1.0*(h**3 - h) + 0.0002*(dh_xx + dh_yy)

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

dh_t - 0.005*(dmu_xx + dmu_yy)
mu - kappa*(h**3 - h) + alpha*(dh_xx + dh_yy)

Domain

  • Rectangle: \(x \in [0, 1]\), \(y \in [0, 1]\)
  • Time interval: \(t \in [0, 1]\)

Initial conditions

Output Initial value How it is imposed (Settings: Default)
h 0.4*cos(4*pi*x)*cos(4*pi*(x + y)) 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 bottom h — axis y, derivative order 0
Periodic BC left mu — axis x, derivative order 0
Periodic BC bottom mu — axis y, derivative order 0

Unknowns and measured data (Inverse)

Trainable parameter Initial value True value
alpha 1 0.0002
kappa 0.1 1

Measured data (Inverse page, measured-data files):

From the benchmark records: same template, switched to Inverse, recovering \(\alpha\) and \(\kappa\) (initial guesses 1 and 0.1, true values 0.0002 and 1) from \(h\) measured at \(t' = 1\).

Settings

Forward mode

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

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

The Training Log reports: Tuned settings: 3× the iterations of every training phase. 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 60,000 0.001 none
2 L-BFGS 60,000 — none

Inverse mode

Settings: Default — the template's own settings

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

The Training Log reports: Tuned settings: measured data at every reference time after t = 0. The change is applied to the example's own settings.

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 — 3× iterations. Values: one run, seed 2026.

Output Relative L₂
h 1.1 × 10⁻³
μ 3.1 × 10⁻²
abs_mu 9.0 × 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, μ.

Inverse problem

Settings: Tuned — Measured data at every reference time. Values: one run, seed 2026.

Parameter True value Recovered Relative error
α 0.0002 0.000201912 0.96 %
kappa 1 0.995857 0.41 %

Worst parameter error: 0.96 %.

Inverse result: PINN, reference and error, h
Inverse, Tuned settings: PINN, reference and error, h.
Inverse result: parameter convergence
Inverse, Tuned settings: parameter convergence.
Other outputs (1 figure)

Inverse result: PINN, reference and error, μ
Inverse, 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 ── 2D ── heading, Cahn-Hilliard 2D – Mattey & Ghosh › Default or Tuned, then Solve.
  • Inverse: toolbar Examples: › Inverse › under the ── 2D ── heading, Cahn-Hilliard 2D – 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

Definition and records

How the benchmark values were measured and checked: Reproducibility.

← Back to the example gallery