Helmholtz 2D – square with hole¶
| Example | |
|---|---|
| Source | DeepXDE example |
| Problem | Forward |
| Dimension | 2D (x, y) |
| Regime | Steady |
| Geometry | Rectangle − Disk |
| 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: n = 1, k0 = 2*pi*n, R = 1/4
Domain¶
- Custom geometry (Geometry › Custom): Rectangle (x_min = -0.5, x_max = 0.5, y_min = -0.5, y_max = 0.5), minus Disk (cx = 0, cy = 0, r = 0.25)
Boundary conditions¶
| Type | Where | Output | Value | Details |
|---|---|---|---|---|
| Neumann BC | np.isclose(x**2 + y**2, R**2) |
u |
-(k0*cos(k0*x)*sin(k0*y)*x + k0*sin(k0*x)*cos(k0*y)*y)/R |
— |
| Dirichlet BC | left or right or bottom or top |
u |
sin(k0*x)*sin(k0*y) |
— |
Settings¶
Settings: Default — DeepXDE's own settings
- Network: FNN, hidden layers 3 × 350, inputs (x, y), 1 output; activation sin, initializer Glorot uniform
- Points: 225 domain, 240 boundary, 900 test
- Loss weights:
1,10,100(equations, then boundary-condition rows)
| Phase | Optimizer | Iterations | Learning rate | Decay |
|---|---|---|---|---|
| 1 | Adam | 5,000 | 0.001 | none |
Settings: Tuned
The Training Log reports: Tuned settings: an L-BFGS phase after Adam. The change is applied to the example's own settings.
- Network: FNN, hidden layers 3 × 350, inputs (x, y), 1 output; activation sin, initializer Glorot uniform
- Points: 225 domain, 240 boundary, 900 test
- Loss weights:
1,10,100(equations, then boundary-condition rows)
| Phase | Optimizer | Iterations | Learning rate | Decay |
|---|---|---|---|---|
| 1 | Adam | 5,000 | 0.001 | none |
| 2 | L-BFGS | 15,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 — L-BFGS phase added. Values: median over seeds 2026, 1, 2.
| Output | Relative L₂ |
|---|---|
| u | 7.0 × 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 ── 2D ── heading, Helmholtz 2D – square with hole › 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¶
- Exact solution, Error Analysis › reference from formula:
u = sin(k0*x)*sin(k0*y)
Definition and records¶
- Definition:
EXAMPLESentry "Helmholtz 2D with a hole" inpinnstudio/core/deepxde_examples.py- Settings: Tuned: entry "Helmholtz 2D with a hole" in
pinnstudio/resources/tuned_settings.json
- Settings: Tuned: entry "Helmholtz 2D with a hole" in
- Equations: Governing equations on this page
- Reference data: the exact-solution formula under Reference solution (no data files)
- Benchmark records:
benchmarks/problems/helmholtz-2d-square-with-hole.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):
Helmholtz 2D – square with hole (tuned).pinn.json - DeepXDE example: Helmholtz_Neumann_2d_hole.py (documentation)
- Cite: Lu et al. 2021 (DeepXDE)
How the benchmark values were measured and checked: Reproducibility.