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):
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):
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)
- Network: FNN, hidden layers 6 × 128, inputs (x, t), 2 outputs; activation tanh, initializer Glorot uniform
- Points: 10,000 domain, 20 boundary, 128 initial, 1,000 test
- Loss weights:
1.0,1.0,1.0,1.0,1.0,1.0,64.0(equations, then boundary-condition rows, then initial conditions) - Methods: time windows (10 windows, transfer learning); backward-compatible PINN (bc-PINN) across the windows; initial-condition guided learning
| 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).
- Network: FNN, hidden layers 4 × 128, inputs (x, t), 2 outputs; activation tanh, initializer Glorot uniform
- Points: 10,000 domain, 200 boundary, 512 initial, 1,000 test
- Loss weights:
1.0,1.0,1.0,1.0,1.0,1.0,100.0(equations, then boundary-condition rows, then initial conditions) - Methods: time windows (38 windows, transfer learning); SA-PINN point weights; exact periodicity (periodic input features)
| 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⁻⁵ |
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¶
- Reference data files:
reference_data/1D/cahn_hilliard_mattey/
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¶
- Definition: template "1D Cahn-Hilliard (Mattey & Ghosh)" in
MainWindow._on_template_selected,pinnstudio/ui/main_window.py- Settings: Default (the paper's method):
_ch1d_mginpinnstudio/core/paper_settings.py - Settings: Tuned: entry "1D Cahn-Hilliard (Mattey & Ghosh)" in
pinnstudio/resources/tuned_settings.json
- Settings: Default (the paper's method):
- Equations: Governing equations on this page
- Reference data:
reference_data/1D/cahn_hilliard_mattey/, written bytools/make_phase_field_reference_data.py - Measured data (Inverse):
reference_data/1D/cahn_hilliard_mattey/, written bytools/make_phase_field_reference_data.py - Benchmark records:
benchmarks/problems/cahn-hilliard-1d-mattey-ghosh.md, its entry in the examples overview, the benchmark collection - Tuning-study configurations (records of the tuning study; open one with Problem › Open Saved Problem...; not presets of the Examples list):
Cahn-Hilliard 1D – Mattey & Ghosh (PINNStudio template) (best setup) (tuned).pinn.json - Methods (Default and Tuned settings): Time windows and bc-PINN, IC pre-training and guided learning, RBA and SA-PINN, Exact constraints
- Cite: Mattey & Ghosh 2022
How the benchmark values were measured and checked: Reproducibility.
