Heat 1D – Dirichlet¶
| Example | |
|---|---|
| Source | DeepXDE example |
| Problem | Forward and Inverse (the Inverse mode is PINNStudio's addition) |
| Dimension | 1D (x, t) |
| Regime | Time-dependent |
| Geometry | Interval |
| Outputs | u |
| Settings | Default, Tuned |
Governing equations¶
Mathematical form (from the benchmark records):
As typed in PINNStudio's Equations page (each expression is a residual, set to zero):
Constants: a = 0.4, L = 1, n = 1
Inverse-mode form (from the benchmark records):
Domain¶
- Interval: \(x \in [0, 1]\)
- Time interval: \(t \in [0, 1]\)
Initial conditions¶
| Output | Initial value | How it is imposed (Settings: Default) |
|---|---|---|
u |
sin(n*pi*x/L) |
loss term |
Boundary conditions¶
| Type | Where | Output | Value | Details |
|---|---|---|---|---|
| Dirichlet BC | True (the whole boundary) |
u |
0 |
— |
Unknowns and measured data (Inverse)¶
| Trainable parameter | Initial value | True value |
|---|---|---|
a |
1 | 0.4 |
Measured data (Inverse page, measured-data files):
reference_data/1D/heat/t_1.0.txt→ outputu, weight 100
From the benchmark records: pick the example from the Inverse list: the diffusivity \(a\) is unknown (initial guess 1, true value 0.4) and is learned together with \(u\) from \(u\) measured at \(t = 1\) (the exact solution, reference_data/1D/heat/t_1.0.txt).
Settings¶
Forward mode¶
Settings: Default — DeepXDE's own settings
- Network: FNN, hidden layers 3 × 20, inputs (x, t), 1 output; activation tanh, initializer Glorot normal
- Points: 2,540 domain, 80 boundary, 160 initial, 2,540 test
- Loss weights:
1,1,1(equations, then boundary-condition rows, then initial conditions)
| Phase | Optimizer | Iterations | Learning rate | Decay |
|---|---|---|---|---|
| 1 | Adam | 20,000 | 0.001 | none |
| 2 | L-BFGS | 15,000 | — | none |
Settings: Tuned
The Training Log reports: Tuned settings: 3× iterations, a larger network, 3× points and an L-BFGS phase together. The change is applied to the example's own settings.
- Network: FNN, hidden layers 4 × 40, inputs (x, t), 1 output; activation tanh, initializer Glorot normal
- Points: 7,620 domain, 240 boundary, 480 initial, 2,540 test
- Loss weights:
1,1,1(equations, then boundary-condition rows, then initial conditions)
| Phase | Optimizer | Iterations | Learning rate | Decay |
|---|---|---|---|---|
| 1 | Adam | 60,000 | 0.001 | none |
| 2 | L-BFGS | 45,000 | — | none |
Inverse mode¶
Settings: Default — DeepXDE's settings with PINNStudio's Inverse-mode changes (see Notes)
- Network: FNN, hidden layers 3 × 20, inputs (x, t), 1 output; activation tanh, initializer Glorot normal
- Points: 2,540 domain, 80 boundary, 160 initial, 2,540 test
- Loss weights:
1,1,1(equations, then boundary-condition rows, then initial conditions)
| Phase | Optimizer | Iterations | Learning rate | Decay |
|---|---|---|---|---|
| 1 | Adam | 20,000 | 0.001 | none |
| 2 | L-BFGS | 15,000 | — | none |
Settings: Tuned
The Training Log reports: Tuned settings: 3× iterations, a larger network, 3× points and an L-BFGS phase together. The change is applied to the example's own settings.
- Network: FNN, hidden layers 4 × 40, inputs (x, t), 1 output; activation tanh, initializer Glorot normal
- Points: 7,620 domain, 240 boundary, 480 initial, 2,540 test
- Loss weights:
1,1,1(equations, then boundary-condition rows, then initial conditions)
| Phase | Optimizer | Iterations | Learning rate | Decay |
|---|---|---|---|---|
| 1 | Adam | 60,000 | 0.001 | none |
| 2 | L-BFGS | 45,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 — all of the changes together. Values: median over seeds 2026, 1, 2.
| Output | Relative L₂ |
|---|---|
| u | 1.3 × 10⁻² |
Inverse problem¶
Settings: Tuned — all of the changes together. Values: median over seeds 2026, 1, 2.
| Parameter | True value | Recovered | Relative error |
|---|---|---|---|
| a | 0.4 | 0.400406 | 0.1 % |
Worst parameter error: 0.1 % (the median over the seeds of each seed's largest 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, Heat 1D – Dirichlet › Default or Tuned, then Solve.
- Inverse: toolbar Examples: › Inverse › under the ── 1D ── heading, Heat 1D – Dirichlet › 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¶
- Forward mode: exact solution, Error Analysis › reference from formula:
u = exp(-n**2*pi**2*a*t/L**2)*sin(n*pi*x/L) - Inverse mode: exact solution, Error Analysis › reference from formula:
u = exp(-n**2*pi**2*0.4*t/L**2)*sin(n*pi*x/L)
Notes¶
- Inverse mode (PINNStudio's addition): the diffusivity a is unknown (initial guess 1, true 0.4) and learned from u measured at t = 1 (the exact solution, reference_data/1D/heat/t_1.0.txt).
Definition and records¶
- Definition:
EXAMPLESentry "Heat equation" inpinnstudio/core/deepxde_examples.py- Settings: Tuned: entry "Heat equation" in
pinnstudio/resources/tuned_settings.json
- Settings: Tuned: entry "Heat equation" in
- Equations: Governing equations on this page
- Reference data: the exact-solution formula under Reference solution (no data files)
- Measured data (Inverse):
reference_data/1D/heat/, written bytools/make_exact_reference_data.py - Benchmark records:
benchmarks/problems/heat-1d-dirichlet.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):
Heat 1D – Dirichlet (tuned).pinn.json,Heat 1D – Dirichlet, inverse mode (tuned).pinn.json - DeepXDE example: heat.py (documentation)
- Cite: Lu et al. 2021 (DeepXDE)
How the benchmark values were measured and checked: Reproducibility.