The 1D viscous Burgers equation is solved using a Physics-Informed Neural Network (PINN):
where
The spatial and temporal domains are:
$x \in [-1,1]$ $t \in [0,1]$
This configuration is commonly used in PINN benchmarks because the solution develops steep gradients during evolution, making it a challenging nonlinear PDE problem.
A fully connected neural network with tanh activation functions is used to approximate the solution
The PINN is trained by minimizing three components:
- PDE residual loss
- Initial condition loss
- Boundary condition loss
- Interior collocation points enforce the PDE.
- Initial points enforce the initial condition.
- Boundary points enforce the boundary conditions.
Training uses a two-stage optimization scheme:
- Adam optimizer – coarse optimization
- L-BFGS optimizer – refinement
This hybrid strategy improves convergence when minimizing the physics residual.
The standard PINN reproduces the global structure of the Burgers solution:
- Sinusoidal initial condition
- Wave steepening over time
- Symmetric Burgers dynamics
The PDE residual remains small across most of the domain, with slightly higher values near the shock region around
This region contains steep gradients, which are challenging for standard PINNs.
Standard neural networks tend to learn low-frequency components more easily than high-frequency structures.
Since Burgers dynamics produce sharp spatial gradients, this can limit the model's representation capacity.
To address this limitation, Fourier feature embeddings are introduced before the neural network.
The input coordinates are mapped as
This expands the input representation using periodic basis functions.
The Fourier PINN produces:
- Sharper representation of the evolving wave
- Better modeling of steep gradients near the shock region
The PDE residual heatmap also shows a more consistent distribution of error across the domain.
Two visualizations are used to evaluate the model.
Shows the predicted Burgers solution across space and time.
Displays the magnitude of the physics residual:
This highlights regions where the physics constraint is hardest for the network to satisfy.
Residual values are lowest across most of the domain and increase slightly near the shock region, which is expected due to the large gradients present there.
Both models successfully solve the Burgers equation using physics-informed training.
- Captures the overall dynamics
- Correctly models the global solution
- Improves representation of sharp spatial features
- Better handles high-frequency gradients
These results demonstrate how feature embeddings can enhance PINN performance when modeling nonlinear PDEs with steep gradients.