Skip to content

Heat 3D

Example
Source PINNStudio template
Problem Forward and Inverse
Dimension 3D (x, y, z, t)
Regime Time-dependent
Geometry Cuboid
Outputs u
Settings Default, Tuned
Animated 3D voxel plot of the heat-equation PINN solution in the unit cube
Animation from the repository's figures (`assets/Images/Top_GIFs/`): the PINN solution of this example over time.

Governing equations

Mathematical form (from the benchmark records):

\[\frac{\partial u}{\partial t} = 0.4\left(\frac{\partial^2 u}{\partial x^2} + \frac{\partial^2 u}{\partial y^2} + \frac{\partial^2 u}{\partial z^2}\right), \qquad (x, y, z) \in [0, 1]^3,\ t \in [0, 1]\]

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

du_t - 0.4*(du_xx + du_yy + du_zz)

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

du_t - alpha*(du_xx + du_yy + du_zz)

Domain

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

Initial conditions

Output Initial value How it is imposed (Settings: Default)
u 0.0 loss term

Boundary conditions

Type Where Output Value Details
Neumann BC left u 0 —
Dirichlet BC right u 1 —
Neumann BC bottom u 0 —
Neumann BC top u 0 —
Neumann BC front u 0 —
Neumann BC back u 0 —

Unknowns and measured data (Inverse)

Trainable parameter Initial value True value
alpha 1 0.4

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

From the benchmark records: same template, switched to Inverse, recovering the diffusivity coefficient (fixed at \(0.4\) in Forward mode) as an unknown parameter.

Settings

Forward mode

Settings: Default — the template's own settings

  • Network: FNN, hidden layers 4 × 128, inputs (x, y, z, t), 1 output; activation tanh, initializer Glorot uniform
  • Points: 15,000 domain, 1,000 boundary, 1,000 initial, 10,000 test
  • Loss weights: 1.0,1.0,100.0,1.0,1.0,1.0,1.0,100.0 (equations, then boundary-condition rows, then initial conditions)
Phase Optimizer Iterations Learning rate Decay
1 Adam 20,000 0.001 none
2 L-BFGS 20,000 — none

No separate Tuned preset: the Tuned item is greyed out for this example (its Default settings are PINNStudio's best).

Inverse mode

Settings: Default — the template's own settings

  • Network: FNN, hidden layers 4 × 128, inputs (x, y, z, t), 1 output; activation tanh, initializer Glorot uniform
  • Points: 15,000 domain, 1,000 boundary, 1,000 initial, 10,000 test
  • Loss weights: 1.0,1.0,100.0,1.0,1.0,1.0,1.0,100.0,100.0 (equations, then boundary-condition rows, then initial conditions, then measured data)
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: 10× the weight of the measured data. The change is applied to the example's own settings.

  • Network: FNN, hidden layers 4 × 128, inputs (x, y, z, t), 1 output; activation tanh, initializer Glorot uniform
  • Points: 15,000 domain, 1,000 boundary, 1,000 initial, 10,000 test
  • Loss weights: 1.0,1.0,100.0,1.0,1.0,1.0,1.0,100.0,100.0 (equations, then boundary-condition rows, then initial conditions, then measured data)
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: Default — the example's own settings (not in the tuning sweep); the example has no separate Tuned preset for this mode. Values: one run, seed 2026.

Output Relative L₂
u 2.6 × 10⁻³
Forward result: PINN, reference and error
Forward, Default settings: PINN, reference and error.
Forward result: 3D view
Forward, Default settings: 3D view.

Inverse problem

Settings: Tuned — 10× weight on the measured data. Values: one run, seed 2026.

Parameter True value Recovered Relative error
α 0.4 0.39911 0.22 %

Worst parameter error: 0.22 %.

Inverse result: PINN, reference and error
Inverse, Tuned settings: PINN, reference and error.
Inverse result: 3D view
Inverse, Tuned settings: 3D view.
Inverse result: parameter convergence
Inverse, Tuned settings: parameter convergence.

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 ── 3D ── heading, Heat 3D › Default, then Solve.
  • Inverse: toolbar Examples: › Inverse › under the ── 3D ── heading, Heat 3D › 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