The 2D acoustic wave equation
Learning objectives
- Generalise the 1D PINN of §4.1 to the 2D acoustic wave equation
- Train a PINN with 3D input (x, z, t) and Hessian-diagonal AD on three coordinates
- Verify the 2D standing-wave eigenmode against the analytic solution
- See where the compute cost grows: same recipe as 1D, but ~3× heavier per epoch
The 2D acoustic wave equation,
is the underlying physics of every 2D seismic shot record. The PINN has three inputs () instead of two, and the PDE residual involves three Hessian-diagonal entries (). The IC and BC bookkeeping is otherwise identical to §4.1.
Setup
To get a clean analytic solution we use the 2D analogue of §4.1's separable mode:
- Domain .
- IC: .
- BC: on all four edges.
Because is an eigenmode of the Laplacian with eigenvalue , the exact solution is
which oscillates uniformly across the domain at angular frequency . The temporal frequency is times higher than the 1D case at the same .
The compute budget
Going from 1D to 2D triples the per-point AD cost (3 input dimensions instead of 2). To stay tractable in-browser we use a smaller collocation grid: 8 × 8 × 6 = 384 PDE points, 36 IC points, ~96 BC points. With 1500 epochs of 4-term NTK-balanced training, the run takes ~2–3 minutes. Production seismic-PINN papers (Rasht-Behesht 2022, Moseley 2020) use 10⁴–10⁵ collocation points and run on a GPU for hours; the recipe scales but the wall-clock cost grows roughly linearly with .
Try it
What you should observe
- For the PINN reaches relative-L² of ~10–15% in the browser-feasible compute budget. The IC and BC terms are tight (); the PDE residual is what bottlenecks the spacetime accuracy. This is the 2D-vs-1D lesson: the same recipe scales but at quadratic compute cost, and the in-browser budget is not enough to drive PDE residual to the level §4.1 reaches in 1D.
- For the temporal frequency reaches , putting ~1.06 cycles inside . Spectral-bias error grows; relative-L² climbs into the 20–30% range. Production codes (Rasht-Behesht 2022) use Fourier features (§2.2) and 10× more colloc points to handle higher temporal frequencies.
- The IC-velocity term is the slowest to converge initially, because it depends on at a 2D boundary surface. NTK rebalancing is what eventually drives it down.
- The PINN and analytic spacetime fields differ visibly only at the late-time crests where the temporal frequency stresses the network width. Time-zero and the first peak match cleanly.
From the eigenmode toy to the real shot record
The eigenmode test is pedagogical, not realistic. A real 2D seismic forward model has:
- A localised source term (Ricker wavelet) on the right-hand side of the wave equation, not just an initial condition. The PINN PDE residual gains a source term: .
- A spatially-varying velocity field — the medium being imaged. For the forward problem this is a fixed input to the PDE; for the inverse problem (Part 6) it becomes another trainable network.
- Boundary conditions tailored to a half-space: a free surface at (§4.5) and absorbing/PML boundaries on the other three sides (§4.6, §4.7).
All of these change the residuals in the PINN loss, not the structure of the loss itself. The 4-term NTK-balanced recipe is robust to these changes; it is the same recipe Moseley et al. (2020) used for the original wave-equation PINN paper.
References
- Moseley, B., Markham, A., Nissen-Meyer, T. (2020). Solving the wave equation with physics-informed deep learning. arXiv:2006.11894.
- Rasht-Behesht, M., Huber, C., Shukla, K., Karniadakis, G.E. (2022). Physics-informed neural networks (PINNs) for wave propagation and full-waveform inversions. JGR Solid Earth 127, e2021JB023120.