Burgers' equation is the simplest nonlinear PDE that develops shocks — discontinuities from smooth initial data. The inviscid version creates sharp fronts in finite time; the viscous version smooths them into steep gradients. Standard numerical methods handle each regime separately: shock-capturing schemes for inviscid, diffusion-based schemes for viscous. The two regimes get different algorithms.
Lohmann et al. (arXiv:2603.12992) cast both inviscid and viscous Burgers' equations as port-Hamiltonian systems — a framework where the dynamics are described by an energy (the Hamiltonian), a structure matrix (encoding the physics), and port variables (encoding boundary interactions). The convective nonlinearity enters through the structure matrix; the viscous dissipation enters as a separate dissipative port. Both are handled within a single framework.
The finite element discretization preserves the port-Hamiltonian structure exactly — the discrete system inherits the energy balance, the boundary coupling, and the separation between conservative and dissipative dynamics from the continuous system. This structural preservation has a practical consequence: the stability conditions for time stepping depend explicitly and transparently on the interplay between spatial discretization and viscosity. When viscosity is large, the dissipative port dominates and the system is naturally stable. When viscosity approaches zero, the convective structure matrix must be resolved accurately, and the time step must shrink in a way the framework makes explicit.
The unified treatment means the same code, the same structure, handles both the shock-forming inviscid limit and the smooth viscous regime — the viscosity parameter interpolates continuously between them rather than switching algorithms at a threshold.