Skip to content

Inviscid Burgers

The vanishing-viscosity limit — a genuine shock forms in finite time and the PDE residual becomes ill-defined at the discontinuity:

ut+uux=0.

Without regularization, PINNs are known to converge to spurious weak solutions here: profiles that satisfy the residual almost everywhere but place the shock incorrectly.

Results

relative L2 error 0.127recipe adaptive pseudo-time100k steps, single GPU

Adaptive pseudo-time stepping reaches a relative L2 error of 0.127, versus 0.214 for the baseline and 0.166 for constant pseudo-time weights — consistent with the method's core claim that the damping term steers training away from spurious weak solutions and toward the entropy solution. The remaining error is dominated by the immediate neighborhood of the discontinuity, where any pointwise residual is ill-defined; away from the shock the profile is essentially exact. This is the paper-motivating example for pseudo-time stepping, with the adaptive step size earning its keep over the fixed one.

Inviscid Burgers prediction vs reference

Reference, PINN prediction, and absolute error; the error concentrates at the moving shock.

Inviscid Burgers convergence

Training losses and relative L2 error of the showcase (adaptive pseudo-time) run.

Run

bash
cd examples/inviscid_burgers
python3 main.py --config=configs/pseudo_time.py
ConfigDescription
configs/baseline.pyPirateNet + causal weighting
configs/pseudo_time.pyAdaptive pseudo-time stepping (showcase)
configs/fixed_pseudo_time.pyConstant pseudo-time weights

Notes

  • Supports a fixed collocation batch (--config.training.random_sampling=False) to isolate the effect of the pseudo-time weights from resampling noise.

Released under the Apache 2.0 License.