1D layered medium: PINN vs analytic
Learning objectives
- Solve the 1D wave equation in a smoothly varying two-layer medium with a PINN
- Measure reflection and transmission coefficients R, T from PINN output
- Compare to the Fresnel formulas R = (c₂-c₁)/(c₁+c₂), T = 2c₂/(c₁+c₂)
- Establish a quantitative baseline for the rest of Part 5
Part 5 is the textbook's honest reckoning: pure forward modelling is not where PINN earns its keep. To make the case rigorously we need quantitative benchmarks against problems where we know the right answer. This section starts with the simplest case: the 1D acoustic wave equation in a smooth two-layer medium.
The setup
Solve
on with smoothly-varying velocity
so near the surface and deep below, with a smooth transition of width centred at . A Gaussian downgoing pulse centred at propagates downward, hits the velocity contrast near , and partially reflects + partially transmits. The 1.5× contrast (rather than 2× or 3×) is chosen so the PINN can converge in the browser-feasible compute budget; the same recipe extends to any contrast.
The Fresnel coefficients
For a sharp acoustic interface with constant density (so impedance ) the pressure-wave reflection and transmission coefficients are
Note that : pressure amplitude in the lower-impedance medium increases on transmission. Energy is conserved because the energy flux for a plane wave is :
The PINN setup
4-term NTK-balanced loss (PDE + IC pos + IC vel + BC) on a 3-48-48-1 Tanh network. Same recipe as §4.1 but with the spatially-varying baked into the PDE residual .
Try it
What you should observe
- The wavefield snapshot at shows the pulse just hitting the interface — a small reflected lobe is forming above and a transmitted pulse is emerging below.
- At the reflected pulse has travelled back to about (above interface, speed ), and the transmitted pulse has travelled to about (below interface, speed ).
- The widget extracts peak amplitudes from the time traces at and and computes measured . Expected at this PINN budget: – (correct sign, magnitude within ~30% of Fresnel) and –. The smoothed-step velocity slightly blurs the sharp-interface formula, and the in-browser PINN budget caps spacetime accuracy.
- The honest framing: even a tame 1D layered problem is borderline for a vanilla PINN at browser-feasible compute. This is itself a Part 5 message — the FDTD reference in §5.2 will recover to 1–2% in milliseconds.
References
- Aki, K., Richards, P.G. (1980, 2002). Quantitative Seismology. Standard reference for Fresnel coefficients and reflection/transmission at acoustic interfaces.
- Sheriff, R.E., Geldart, L.P. (1995). Exploration Seismology. Cambridge.