Snapshot: Purely hyperbolic gravity simulations with Trixi.jl

One of the challenges when simulating astrophysical flows with self-gravity is to compute the gravitational forces. In contrast to the hyperbolic compressible Euler equations, the gravity field is described by an elliptic Poisson equation. In [1], we present a purely hyperbolic approach by reformulating the elliptic problem into a hyperbolic diffusion problem, which is solved in pseudotime using the same explicit high-order discontinuous Galerkin method we use for the flow solution.

We start with the Poisson equation for the Newtonian gravitational potential $\phi$,

$$-\vec{\nabla}^2\phi = -4\pi G \rho\label{grav}$$

where G is the universal gravitational constant and $\rho$ is the mass density. Following Nishikawa’s work, we convert the Poisson equation for the gravitational potential into the hyperbolic gravity equations,

$$\frac{\partial}{\partial t}\begin{bmatrix}
\phi\\[0.1cm]
q_1\\[0.1cm]
q_2\\[0.1cm]
\end{bmatrix}
+
\frac{\partial}{\partial x}\begin{bmatrix}
-q_1\\[0.1cm]
-\phi/T_r\\[0.1cm]
0\\[0.1cm]
\end{bmatrix}
+
\frac{\partial}{\partial y}\begin{bmatrix}
-q_2\\[0.1cm]
0\\[0.1cm]
-\phi/T_r\\[0.1cm]
\end{bmatrix}
=
\begin{bmatrix}
-4\pi G \rho\\[0.1cm]
-q_1/T_r\\[0.1cm]
-q_2/T_r\\[0.1cm]
\end{bmatrix},\label{hyp}$$

where the auxiliary variables $(q_1,q_2)^\intercal\approx\vec{\nabla}\phi$ and $T_r$ is the relaxation time. The steady-state solution of the hyperbolic system is, in fact, the desired solution of the original Poisson problem.

The flow and the gravity solvers operate on a joint hierarchical Cartesian mesh and are two-way coupled in each Runge-Kutta stage via the source terms. A key benefit of our strategy is that it allows the reuse of existing explicit hyperbolic solvers without modifications, while retaining their advanced features such as non-conforming and solution-adaptive grids.

We implemented this purely hyperbolic approach for self-gravitating gas dynamics in Trixi.jl, a tree-based numerical simulation framework for hyperbolic PDEs, which is written in Julia [2]. It was first validated by computing the Jeans gravitational instability, which demonstrates excellent agreement of the numerical results with the analytical solution:

Evolution of the computed kinetic, internal, and potential energies for the Jeans
instability using polynomial order N = 3 on a uniform 16 × 16 mesh. The analytical energies are included for reference.

In a second example, we consider a modification of the Sedov blast wave problem that incorporates the effects of gravitational acceleration and which involves strong shocks and complex fluid interactions. We include it to demonstrate the shock capturing and AMR capabilities of Trixi.jl to resolve the cylindrical Sedov blast wave:

Self-gravitating Sedov explosion approximated with polynomial order $N = 3$ on an AMR grid with four levels of possible refinement at $T = 0.5$ (left) and $T = 1.0$ (right). (first and third row) Two dimensional plots of the density and gravitational potential at two times. The white overlay of squares in the density plots shows the AMR grids used by both solvers. (second and last row) One dimensional slices of the solutions along a line from the origin to the edge of the domain in the positive x-direction.

Finally, we show the evolution of the solution together with the adaptive mesh, which is dynamically refined and coarsened to maintain high accuracy while reducing the overall computation time:

https://raw.githubusercontent.com/trixi-framework/paper-self-gravitating-gas-dynamics/master/assets/sedov-rho-phi-mesh.gif
Simulation of self-gravitating Sedov blast wave with adaptive mesh refinement, where adaptation performed after every time step of the compressible Euler solver. The total run time compared to a uniformly refined mesh is reduced by a factor of 19, while the solutions are virtually unchanged.

All results in the paper can be easily reproduced by using the resources provided in [3], including step-by-step instructions for how to obtain and install Trixi.jl.

References

[1] Schlottke-Lakemper, Michael and Winters, Andrew R and Ranocha, Hendrik and Gassner, Gregor J, A purely hyperbolic discontinuous Galerkin approach for self-gravitating gas dynamics, submitted to J Comp Phys, 2020. arXiv:2008.10593

[2] Schlottke-Lakemper, Michael and Gassner, Gregor J and Ranocha, Hendrik and Winters, Andrew R, Trixi.jl: A tree-based numerical simulation framework for hyperbolic PDEs written in Julia, 2020. doi:10.5281/zenodo.3996439

[3] Schlottke-Lakemper, Michael and Winters, Andrew R and Ranocha, Hendrik and Gassner, Gregor J, Self-gravitating gas dynamics simulations with Trixi.jl, 2020. doi:10.5281/zenodo.3996575

Snapshot: A new approach for approximating conservation laws

A new approach for approximating conservation laws has been tested: instead of monitoring the changes of the means of a quantity within a certain volume over time like a finite volume procedure, this method mimics the behavior of simple solutions.

First the current state is split into waves w, each aligned along one of the eigenvectors of the Fluxjacobian and living on its own grid. Then the corresponding grids are being moved with their eigenvelocity and finally all waves w are being overlayed and normalized yielding the solution after one timestep.

The plots show the solution of isothermal Euler equations at Time T=0.0000 (initial condition) and T=0.0025 with N=40 gridpoints for each mesh.

Snapshot: Higher-order schemes for the MHD equations

A robust and easy way of simulating a hyperbolic test case with discontinuities is to use a 1st order finite volume scheme. Using such a method for magnetohydrodynamics (MHD) problems like the Orszag-Tang vortex leads to following results:

For this and the following examples we used a 4th order time integration scheme and 256 degrees of freedom in each spatial direction.

A way to generate more accurate results is to increase the order of the scheme, which has to be treated with caution near discontinuities because oscillations may occur. To overcome this issue one could use higher order schemes in smooth regions and lower order schemes in regions with discontinuities. An example for such an approach is our so called DGFV scheme, which blends e.g. a 4th order Discontinuous Galerkin scheme with a 1st order Finite Volume scheme.

Another way of doing it, is to use a suitable 4th order finite-volume scheme for MHD with a fitting limiter.

Snapshot: Smoothed-Particle Hydrodynamics (SPH) simulation of the Numerical Simulation Research Group

Smoothed-particle hydrodynamics (SPH) is a computational method used for simulating the mechanics of continuum media, such as solid mechanics and is being increasingly used to model fluid motion as well.
This method is well-suited for problems dominated by complex boundary dynamics, since SPH is a mesh-free method, as well as for mass conservation problems since the particles themselves represent mass.

We used a 2D Python/OpenCL SPH code that solves the incompressible Navier-Stokes equations in real time. In this simulation, 52,700 particles were used to smash the people of the Numerical Simulation Research Group against each other.

Snapshot: Blast wave simulation computed in FLUXO with an entropy-stable high-order Discontinuous Galerkin/Finite Volume hybrid scheme

Blast wave simulation with periodic boundaries computed in FLUXO with an
entropy-stable high-order Discontinuous Galerkin/Finite Volume scheme.

The scheme is formulated in Hennemann and Gassner. “A provably entropy stable subcell shock capturing approach for high order split form DG.” Journal of Computational Physics (submitted). The scheme computes the spatial operator as F = (1-a) F_{DG} + a F_{FV}, where a is the blending function

Snapshot: Postdoctoral researcher Dr. Andrés Rueda-Ramírez joins our research group

Andrés M. Rueda-Ramírez completed his undergraduate studies in Mechanical Engineering at the National University of Colombia (Universidad Nacional de Colombia, UNAL). After graduating, he worked as a research and teaching assistant at the Research Group on biomechanics at UNAL, where he collaborated with a highly interdisciplinary team in the development of a Finite Element software to simulate bone growing processes.

AMRR completed his Ph.D. studies in Aerospace Engineering at the Polytechnic University of Madrid (Universidad Politécnica de Madrid). During his Ph.D., AMRR studied and developed p-adaptation algorithms, implicit time-integration schemes, and multigrid solvers for high-order Discontinuous Galerkin Spectral Element Methods (DGSEM).

AMRR is now a member of the Numerical Simulation Research Group at the University of Cologne, where he joined the development team of the DGSEM code FLUXO. AMRR is currently working on sub-cell shock-capturing schemes and time integrators for the Navier-Stokes and the MHD equations.