Abstract
In astrophysics, the two main methods traditionally in use for solving the Euler equations of ideal fluid dynamics are smoothed particle hydrodynamics and finite volume discretization on a stationary mesh. However, the goal to efficiently make use of future exascale machines with their ever-higher degree of parallel concurrency motivates the search for more efficient and more accurate techniques for computing hydrodynamics. Discontinuous Galerkin (DG) methods represent a promising class of methods in this regard, as they can be straightforwardly extended to arbitrarily high order while requiring only small stencils. Especially for applications involving comparatively smooth problems, higher-order approaches promise significant gains in computational speed for reaching a desired target accuracy. Here, we introduce our new astrophysical DG code TENET designed for applications in cosmology, and discuss our first results for 3D simulations of subsonic turbulence. We show that our new DG implementation provides accurate results for subsonic turbulence at considerably reduced computational cost compared with traditional finite volume methods. In particular, we find that DG needs about 1.8 times fewer degrees of freedom to achieve the same accuracy and at the same time is more than 1.5 times faster, confirming its substantial promise for astrophysical applications.
Introduction
Simulating the complex dynamics of gas—governed by the Euler equations—is a cornerstone of modern astrophysics. From the birth of stars to the large-scale structure of the universe, fluid dynamics plays a decisive role. Historically, researchers have relied on two primary techniques: Smoothed Particle Hydrodynamics (SPH) and Finite Volume (FV) discretization. While these methods have served the community well, the transition to the "exascale" era of computing presents a significant hurdle.
Exascale supercomputers, capable of $10^{18}$ calculations per second, demand algorithms with high parallel concurrency. Traditional high-order FV schemes require "large stencils," where each cell must communicate with a wide range of distant neighbors to calculate its next state. This creates a communication bottleneck that hinders scalability on modern hardware. SPH, while Lagrangian in nature, often lacks the precision required for subtle phenomena like subsonic turbulence. To address these challenges, we introduce TENET, a new astrophysical code utilizing the Discontinuous Galerkin (DG) method.
The Discontinuous Galerkin Approach
The DG method acts as a hybrid between Finite Volume and Finite Element methods. Unlike FV, which represents a cell by a single average value, DG represents the solution within each cell using a polynomial expansion—specifically Legendre polynomials.
This approach offers several key advantages for high-performance computing:
- Locality and Small Stencils: High-order accuracy is achieved by increasing the degree of the internal polynomial rather than expanding the stencil. Consequently, DG only requires information from immediate neighbors, regardless of the order of accuracy, significantly reducing communication overhead.
- Information Retention: In standard FV methods, sub-cell information is often lost during the averaging step of each timestep. DG evolves the coefficients of the polynomial expansion independently, preserving a much richer description of the fluid state and capturing finer structures within a single cell.
- Stability: To ensure physical consistency (e.g., preventing non-physical results like negative pressure or density), TENET incorporates a specialized positivity limiter. This allows the code to maintain stability near steep gradients without degrading the accuracy of the high-order scheme.
Benchmarking Subsonic Turbulence
To evaluate TENET, we focused on 3D subsonic turbulence, a critical test case for astrophysical fluid solvers. The simulations were conducted in a periodic box ($L=1$) with an effectively isothermal gas. Turbulence was generated using a purely solenoidal (non-compressional) external force field in Fourier space, targeting a Mach number of approximately 0.2.
We compared TENET’s performance against a standard second-order MUSCL-type Finite Volume solver, focusing on the velocity power spectrum, degrees of freedom (DoF), and computational efficiency.
Key Results
Our findings demonstrate that DG methods offer a superior accuracy-to-cost ratio for subsonic problems:
- Resolution Efficiency: A 3rd-order DG simulation achieved a velocity power spectrum comparable to a 2nd-order FV simulation that had four times the spatial resolution per dimension.
- Computational Speed: When matched for accuracy, the DG 128³ (3rd order) run was 1.53 times faster than the corresponding FV 512³ run.
- Degrees of Freedom (DoF): TENET required approximately 1.8 times fewer DoF than the FV baseline to reach the same target accuracy in subsonic turbulence.
- Numerical Dissipation: While 1st-order schemes failed due to excessive numerical dissipation, all higher-order DG schemes (2nd order and above) successfully reached the steady-state Mach number of ~0.21.
Future Directions
While TENET shows immense promise for smooth flows like subsonic turbulence, challenges remain in handling strong shocks where accuracy can drop to 1st order. Future iterations will explore more sophisticated limiters to maintain high-order precision across discontinuities.
Furthermore, the DG framework is uniquely suited for Magnetohydrodynamics (MHD). It allows for the enforcement of the $\text{div}(\mathbf{B}) = 0$ constraint directly at the basis function level—a major hurdle in astrophysical simulations. With the planned integration of self-gravity, TENET is poised to become a powerful tool for the next generation of cosmological research on exascale machines.
Summary updated