1D layered medium: PINN vs analytic

Part 5 — Forward modelling and where PINNs fall short

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

2ut2=c(z)22uz2\frac{\partial^2 u}{\partial t^2} = c(z)^2 \frac{\partial^2 u}{\partial z^2}

on z[0,1],t[0,0.8]z \in [0, 1], t \in [0, 0.8] with smoothly-varying velocity

c(z)=1+0.5σ(40(z0.5)),σ()=sigmoid(),c(z) = 1 + 0.5 \, \sigma(40(z - 0.5)) ,\qquad \sigma(\cdot) = \textrm{sigmoid}(\cdot) ,

so c(0)=1c(0) = 1 near the surface and c(1)=1.5c(1) = 1.5 deep below, with a smooth transition of width 1/40=0.025\sim 1/40 = 0.025 centred at z=0.5z = 0.5. A Gaussian downgoing pulse centred at z0=0.2z_0 = 0.2 propagates downward, hits the velocity contrast near z=0.5z = 0.5, 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 ρ\rho (so impedance Z=ρccZ = \rho c \propto c) the pressure-wave reflection and transmission coefficients are

R=Z2Z1Z1+Z2=c2c1c1+c2=0.2,T=2Z2Z1+Z2=2c2c1+c2=1.2.R = \frac{Z_2 - Z_1}{Z_1 + Z_2} = \frac{c_2 - c_1}{c_1 + c_2} = 0.2 ,\qquad T = \frac{2 Z_2}{Z_1 + Z_2} = \frac{2 c_2}{c_1 + c_2} = 1.2 .

Note that T>1T > 1: pressure amplitude in the lower-impedance medium increases on transmission. Energy is conserved because the energy flux for a plane wave is ZA2\propto Z |A|^2:

R2+Z1Z2T2=0.04+11.51.44=0.04+0.96=1.|R|^2 + \frac{Z_1}{Z_2} |T|^2 = 0.04 + \frac{1}{1.5} \cdot 1.44 = 0.04 + 0.96 = 1 . \checkmark

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 c(z)2c(z)^2 baked into the PDE residual r=uttc(z)2uzzr = u_{tt} - c(z)^2 , u_{zz}.

Try it

Layered 1dInteractive figure — enable JavaScript to interact.

What you should observe

  • The wavefield snapshot at t=0.35t = 0.35 shows the pulse just hitting the interface — a small reflected lobe is forming above z=0.5z = 0.5 and a transmitted pulse is emerging below.
  • At t=0.70t = 0.70 the reflected pulse has travelled back to about z=0.25z = 0.25 (above interface, speed c1=1c_1 = 1), and the transmitted pulse has travelled to about z=0.80z = 0.80 (below interface, speed c2=1.5c_2 = 1.5).
  • The widget extracts peak amplitudes from the time traces at z=0.25z = 0.25 and z=0.85z = 0.85 and computes measured R,TR, T. Expected at this PINN budget: R0.10R \approx 0.100.200.20 (correct sign, magnitude within ~30% of Fresnel) and T0.85T \approx 0.851.201.20. 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 R,TR, T 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.

This page is prerendered for SEO and accessibility. The interactive widgets above hydrate on JavaScript load.