A Robust, Performance-Portable Discontinuous Galerkin Method for Relativistic Hydrodynamics

Forrest W. Glines, Kristian Beckwith, Joshua R. Braun, Eric C. Cyr, Curtis Ober, Matthew Tyler Bettencourt, Keith Cartwright, Sidafa Conda, Sean Miller, Nicholas Roberds, Nathan V. Roberts, Roger P. Pawlowski, Matthew S. SwanSSRN 2022 · DOI

Abstract

This paper introduces a high-order Discontinuous Galerkin (DG) method for simulating relativistic fluids, emphasizing numerical robustness and performance portability across CPU and GPU architectures. Key innovations include a physicality-enforcing operator to maintain valid states near shocks and a comparative analysis of variable recovery solvers for different equations of state.

Introduction

Simulating relativistic hydrodynamics (RHD)—the study of fluids moving near the speed of light, such as astrophysical jets or plasmas in particle accelerators—is notoriously difficult. Two major hurdles exist: numerical stability and hardware evolution. High-order numerical methods are prone to producing "unphysical" results near sharp changes (shocks), such as negative densities or speeds exceeding the speed of light. Furthermore, modern supercomputers rely heavily on GPUs, where traditional Finite Volume methods are often limited by memory bandwidth.

Discontinuous Galerkin (DG) methods are more computationally intensive, making them better suited for GPUs, but they are historically harder to stabilize in relativistic regimes. This work bridges these gaps by creating a DG framework that remains stable during violent shocks and runs efficiently on diverse hardware without rewriting core code.

Methods

The researchers implemented a DG method using the Kokkos library, which allows a single C++ codebase to run on both NVIDIA GPUs and standard CPUs. The framework includes several key technical components:

  • Physicality-Enforcing Operator: This is the paper's primary algorithmic innovation. When a cell develops an unphysical state (e.g., superluminal velocity), this operator smooths the values toward the cell's volume average until the state becomes physically valid, all while strictly preserving total mass, momentum, and energy.
  • Equations of State (EoS): The study compares the standard Ideal Gas EoS with the more complex Taub-Matthews EoS, which better approximates a relativistic "Synge" gas.
Comparison of thermodynamic variables for different Equations of State (EoS).
  • Primitive Variable Recovery: In RHD, conserved variables must be converted to primitive variables (like pressure and velocity) to calculate fluxes. The authors rigorously compared analytical solvers (exact formulas) against iterative solvers (like Newton-Raphson) to determine optimal performance for different EoS models.

Results and Discussion

The method was evaluated using a suite of rigorous numerical benchmarks, including 1D/2D Riemann problems and the Relativistic Kelvin-Helmholtz Instability (KHI).

Key Insights

  • Solver Selection: A major finding was that the best solver depends on the physics model. For an Ideal Gas, an iterative Newton-Raphson solver is faster and more accurate. However, for the Taub-Matthews EoS, the analytical (cubic) solver is superior.
  • Suppressing Artifacts: In KHI tests, the high-order DG method suppressed "secondary vortices" often seen in lower-order methods, suggesting some features in older simulations might be numerical artifacts rather than real physics.
  • Performance Portability: On an NVIDIA V100 GPU, the code achieved roughly the same number of updates per second as a 48-core Intel Xeon node. However, GPUs require much larger problem sizes to reach peak efficiency due to kernel launch overhead.

Numerical Robustness

The method demonstrated 3rd-order convergence for smooth flows and remained stable even in ultra-relativistic shock scenarios where the ratio of pressure to density ($P/\rho$) reached $10^3$. The new physicality-enforcing operator allowed the code to handle shocks that would typically cause standard high-order DG methods to fail.

Conclusion and Future Work

While the framework is robust and portable, the authors identified areas for improvement. At very high resolutions, non-physical artifacts were observed near outflow boundaries, suggesting a need for more sophisticated boundary treatments. Additionally, future work will involve "fusing" computational steps into larger kernels to better utilize GPU hardware and extending these techniques to include magnetic fields (Relativistic MHD).

Summary updated

BibTeX
@misc{glines2022robust,
  author = {Forrest W. Glines and Kristian Beckwith and Joshua R. Braun and Eric C. Cyr and Curtis Ober and Matthew Tyler Bettencourt and Keith Cartwright and Sidafa Conda and Sean Miller and Nicholas Roberds and Nathan V. Roberts and Roger P. Pawlowski and Matthew S. Swan},
  title = {{A Robust, Performance-Portable Discontinuous Galerkin Method for Relativistic Hydrodynamics}},
  year = {2022},
  eprint = {2205.00095},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.00095},
  howpublished = {SSRN},
}
Figure