Snapshot: Subcell limiting strategies for the DGSEM with Legendre–Gauss nodes

The discontinuous Galerkin spectral element method (DGSEM) is a nodal discontinuous Galerkin collocation scheme that uses a set of Legendre-Gauss or Legendre-Gauss-Lobatto nodes to represent the solution with Lagrange interpolating polynomials and to compute integrals with a quadrature rule.

It was recently shown [1] that the DGSEM semi-discretization of a conservation law using Legendre-Gauss nodes can be written in finite-volume form as
\begin{equation*}
J_{j} \dot{\mathbf{u}}^{DG}_{j} =
\frac{1}{\omega_j}
\left(
\hat{\mathbf{f}}^{DG}_{(j-1,j)}
– \hat{\mathbf{f}}^{DG}_{(j,j+1)}
\right),
\end{equation*}
where $J_j$ is the mapping Jacobian, $\omega_j$ are the Legendre-Gauss quadrature weights, and $\hat{\mathbf{f}}^{DG}_{(\cdot,\cdot)}$ are high-order DGSEM fluxes between adjacent nodes.

The existence of a FV form for the Legendre–Gauss DGSEM enables the use of the subcell limiting strategies described in [2]. In these methods, a hybrid DGSEM/FV method is used, where the semi-discretization at each node reads
\begin{equation*}
J_{j} \dot{\mathbf{u}}_{j} =
\frac{1}{\omega_j}
\left(
\hat{\mathbf{f}}_{(j-1,j)}
– \hat{\mathbf{f}}_{(j,j+1)}
\right),
\end{equation*}
and the local fluxes are obtained as a convex combination of high-order DGSEM and low-order FV fluxes,
\begin{equation*}
\hat{\mathbf{f}}_{(i,j)} = (1-\alpha_{(i,j)}) \hat{\mathbf{f}}^{DG}_{(i,j)}
+
\alpha_{(i,j)}
\hat{\mathbf{f}}^{DG}_{(i,j)},
~~~~
\alpha_{(i,j)} \in [0,1].
\end{equation*}

To illustrate the shock-capturing capacity of the hybrid DGSEM/FV method, we simulate a Sedov blast problem describing the evolution of a blast wave expanding from an initial concentration of density and pressure, and adjust the blending coefficient $\alpha_{(i,j)}$ to avoid non-physical density oscillations in the vicinity of shocks.

The video shows the distribution of density and the blending coefficient obtained for entropy-stable variants of the Legendre-Gauss and Legendre-Gauss-Lobatto DGSEM methods.

The simulation runs stably without any spurious oscillations for both variants of the DGSEM method.
The figures below show the mean blending coefficient and the number of time steps for the simulation of the blast wave.
Although the Legendre–Gauss DGSEM requires more limiting than the Legendre-Gauss-Lobatto DGSEM to avoid spurious density oscillations, it completes the simulation in fewer time steps.
The Legendre-Gauss subcell distribution allows for longer time-step sizes than the Legendre-Gauss-Lobatto subcell distribution for the same CFL number.

Mean blending coefficient

Number of time steps

Figure 1: Evolution of the mean blending coefficient and number of time steps taken for the simulation of the blast wave with CFL=0.9.


References

[1] Mateo-Gabín, A., Rueda-Ramírez, A. M., Valero, E., & Rubio, G. (2022). Entropy-stable flux-differencing formulation with Gauss nodes for the DGSEM. arXiv preprint arXiv:2211.05066.
[2] Rueda-Ramírez, A. M., Pazner, W., & Gassner, G. J. (2022). Subcell limiting strategies for discontinuous Galerkin spectral element methods. Computers & Fluids, 247, 105627. arXiv preprint arXiv:2202.00576.

Thesis Snapshot: Ameisenalgorithmen – Metaheuristische Verfahren zur Lösung des Travelling Salesman Problems (Bachelorarbeit von Marie Becker)

In den neunziger Jahren wurden erstmals Ameisenalgorithmen von Marco Dorigo vorgestellt. Der erste Algorithmus war das sogenannte Ant System (AS), welches in der Bachelorarbeit implementiert wurde, um das Travelling Salesman Problem zu lösen. Dabei wird das Verhalten von Ameisen in einen Algorithmus übertragen, um den kürzesten Hamiltonkreis in einem Graphen zu finden. Die Ameisenalgorithmen bauen auf dem Prinzip auf, dass jede virtuelle Ameise, ausgehend von einem zufälligen Startknoten, einen Hamiltonkreis in dem gegebenen Graphen abläuft und auf dieser Tour dann Duftstoffe, sogenannte Pheromone, hinterlässt. Die hinterlassene Menge der Pheromone hängt dabei davon ab, wie lang die Tour einer Ameise ist. Durch die Duftstoffe werden andere Ameisen dazu angeregt, auch diesen Weg zu wählen. Je mehr Pheromone sich auf einer Kante befinden, desto wahrscheinlicher ist es, dass eine Ameise diese Kante in ihrer Tour wählt. Nach einigen Iterationen befindet sich also die größte Menge der Pheromone auf dem kürzesten Hamiltonkreis. Eine Erweiterung dieses Algorithmus ist das Ant Colony System (ACS), welches ebenfalls auf das Travelling Salesman Problem angewandt wurde. Einer der Unterschiede zum Ant System ist es, dass die Ameisen alle die gleiche Menge an Pheromonen auf ihrer Tour hinterlassen und außerdem die beste Ameise ausgewählt wird, welche eine zusätzliche Menge an Pheromonen auf ihrem Hamiltonkreis abgibt. Im Laufe der Jahre wurden weitere Modifikationen entwickelt, die sich auch auf andere Optimierungsprobleme anwenden lassen.

Abbildung: Beispiel für die Lösung des Travelling Salesman Problems mit dem ACS [1] M. Dorigo und T. Stuetzle, Ant Colony Optimization. MIT Press Ltd, 2004, isbn: 9780262042192

Snapshot: Prediction of annual earth surface temperature with Fourier Neural Operator

Recently, a lot of research has been done on the development of Neural Operators. The aim is to map infinite-dimensional functions to infinite-dimensional functions with neural networks. One approach is the Fourier Neural Operator [1]. We use this model to estimate the annual temperature based on the global land-sea-ice distribution. The input of the neural network is the earth’s geography, the output is the global temperature over one year. The training and testing data set is generated with the simulation framework “Klimakoffer” (for more information see Snapshot: Numerical simulations of earth’s climate and [2]).

The best results are achieved when using 4 Fourier integral operator layers, 16 Fourier modes, and a network width of 20. The model thus has 52 433 557 trainable parameters. The remaining specifications are as chosen by Li et al. [1]. It took 4 hours and 26 minutes to train the model on an NVIDIA GeForce RTX 3090 GPU and 0.77 seconds to evaluate it for one given example on a CPU. A relative L2 loss of approximately 0.0025 was achieved during training.

The first video shows one exemplary output. The second animation visualizes the difference between the temperature calculated by the FNO model and the “true” temperature determined by the framework “Klimakoffer”.

References:
[1] Li, Z., Kovachki, N., Azizzadenesheli, K., Liu, B., Bhattacharya, K., Stuart, A., Anandkumar, A. (2020). “Fourier Neural Operator for Parametric Partial Differential Equations”, arXiv, https://arxiv.org/abs/2010.08895
[2] Zhuang, K., North, G.R., Stevens, Mark J. (2017). “A NetCDF version of the two-dimensional energy balance model based on the full multigrid algorithm”, SoftwareX

Thesis Snapshot: Bottom topography modelling for the shallow water equations in Trixi.jl (Master’s thesis by Maximilian Bertrand)

Back in the summer of 2021, severe floods struck Western Germany, resulting in several cities and villages being destroyed and hundreds of people losing their lives. Modelling and predicting those floods can be crucial for investigating such natural disasters. The shallow water equations are a system of physical conservation equations that can model water flow over a given domain. The two dimensional shallow water equations are given as follows:

\begin{equation*}
\left\{\begin{aligned}
\frac{\partial}{\partial t} h + \left( h v_1\right)_x + \left( h v_2\right)_y =0&\\
\frac{\partial}{\partial t} hv_1 + \left( hv_1^2 + \frac{1}{2} gh^2\right)_x + \left(h v_1v_2\right)_y &= -ghb_x\\
\frac{\partial}{\partial t}h v_2 + \left( hv_1v_2\right)_x + \left(hv_2^2 +\frac{1}{2} gh^2\right)_y &= -ghb_y
\end{aligned}\right.
\end{equation*}

Here the variable $b$ describes the underlying bottom topography function of the domain. As this system is set up of hyperbolic partial differential equations, we use the numerical solver Trixi.jl to approximate the solutions. This solver is part of the trixi-framework. Trixi.jl already implemented the shallow water equations but did not yet offer the functionality to include real-world topography data into the calculations. Therefore the add-on TrixiBottomTopography.jl has been included in the trixi-framework. This tool uses B-spline interpolation approaches to remodel the bottom topography function from real-world data, which is often given as elevation data at specific points. One example is the DGM1 data set which provides uniformly spaced elevation data of the whole German state of North Rhine-Westphalia. Using this data set and the functionalities implemented in Trixi.jl as well as TrixiBottomTopography.jl, we can simulate a dam break problem over a section of the Rhine river valley.

Snapshot: Dam break against a flexible structure with Smoothed Particle Hydrodynamics

To simulate elastic structures, we use a total Lagrangian SPH formulation [1].
We simulate a dam break against a flexible structure based on the setup given by [1].
For the fluid dynamics, a weakly-compressible Lagrangian SPH formulation with an artificial viscosity by Monaghan [2] and boundary force particles to model the tank [3] was used.
This animation shows the simulation in 0.1x real time with 8.7k fluid particles and 455 particles to model the flexible structure.

References:
[1] O’Connor, J., Rogers, B. D. (2021). “A fluid–structure interaction model for free-surface flows and flexible structures using smoothed particle hydrodynamics on a GPU.” In: Journal of Fluids and Structures, 104. https://doi.org/10.1016/J.JFLUIDSTRUCTS.2021.103312
[2] Monaghan, J. J. (1989). “On the Problem of Penetration in Particle Methods”. In: Journal of Computational Physics, 82(1), 1–15. https://doi.org/10.1016/0021-9991(89)90032-6
[3] Monaghan, J. J., & Kajtar, J. B. (2009). “SPH particle boundary forces for arbitrary boundaries”. In: Computer Physics Communications, 180(10), 1811–1820. https://doi.org/10.1016/j.cpc.2009.05.008

Snapshot: High Mach number Kelvin-Helmholtz instability with DG and subcell positivity limiter

We solve the compressible Euler equations of gas dynamics with a fourth-order accurate entropy-stable discontinuous Galerkin (DG) method and combine it with a first-order accurate finite volume (FV) method at the node level to impose positivity of density and pressure [1,2].
The initial condition of this problem is given by:
\[
\begin{array}{rlrl}
\rho (t=0) &= \frac{1}{2}
+ \frac{3}{4} B,
&
p (t=0) &= 0.1, \\
v_1 (t=0) &= \frac{1}{2} \left( B-1 \right),
&
v_2 (t=0) &= \frac{1}{10} \sin(2 \pi x),
\end{array}
\]
with $B=\tanh \left( 15 y + 7.5 \right) – \tanh(15y-7.5)$, where $\rho$ is the density, $\vec{v}=(v_1,v_2)$ is the velocity, and $p$ is the pressure.

The video shows the evolution of the density in time using $1024^2$ and degrees of freedom. We use the entropy-conservative and kinetic energy preserving flux of Ranocha [3] for the volume fluxes and the Rusanov solver for the surface fluxes of the DG and FV methods. During this simulation, the FV method acts on average in 0.000086% of the computational domain, and never more than 0.002% of the computational domain at a specific time.

References
[1] A. M. Rueda-Ramírez, G. J. Gassner, A Subcell Finite Volume Positivity-Preserving Limiter for DGSEM Discretizations of the Euler Equations, WCCM-ECCOMAS2020, pp. 1–12.
[2] A. M. Rueda-Ramírez, W. Pazner, G. J. Gassner, Subcell limiting strategies for discontinuous galerkin spectral element methods, Computers & Fluids 247 (2022) 105627.
[3] H. Ranocha, Generalised summation-by-parts operators and entropy stability of numerical methods for hyperbolic balance laws, Cuvillier Verlag, 2018.

Snapshot: Multi-component magneto-hydrodynamics simulations with a bounds-preserving discontinuous Galerkin method

We solve the multi-component magneto-hydrodynamics (MHD) equations using a hybrid finite volume (FV)/discontinuous Galerkin (DG) method [1], which combines the two discretization approaches at the node level. To test the robustness of the hybrid FV/DG method, we compute a modification of the Orszag-Tang vortex problem [2], where we use two ion species and initialize the flow with a sharp interface at $y=0$:
\[
\begin{array}{rlrl}
\rho^1(x,y,t=0) &= \begin{cases}
{25}/{36 \pi} & y \ge 0 \\
10^{-8} & y < 0
\end{cases} ,
&\rho^2(x,y,t=0) &= \begin{cases}
10^{-8} & y < 0\\
{25}/{36 \pi} & y \ge 0
\end{cases} , \\
v_1 (x,y,t=0) &= – \sin (2 \pi y),
&v_2 (x,y,t=0) &= \sin (2 \pi x), \\
B_1 (x,y,t=0) &= -\frac{1}{\sqrt{4 \pi}} \sin (2 \pi y),
&B_2 (x,y,t=0) &= -\frac{1}{\sqrt{4 \pi}} \sin (4 \pi x). \\
p (x,y,t=0) &= \frac{5}{12 \pi},
& & \\
\end{array}
\]
where $\rho^1$ is the density of the first ion species, $\rho^2$ is the density of the second ion species,$\vec{v}=(v_1,v_2)$ is the plasma velocity, $\vec{B}=(B_1,B_2)$ is the magnetic field, and $p$ is the plasma pressure (without magnetic pressure).
 
The fourth-order DG method delivers high accuracy, but fails to describe shocks and material interfaces. Therefore, we use a modal indicator [3] to detect the elements where the solution changes abruptly. In those elements, we combine the DG method with a robust lower order FV scheme locally (at the node level) to impose TVD-like conditions on the density of the ion species,
\[
\min_{k \in \mathcal{N} (j)} {\rho}^{i,\mathrm{FV}}_{k}
\le \rho^i_{j} \le
\max_{k \in \mathcal{N} (j)} {\rho}^{i,\mathrm{FV}}_{k},
\]
and a local minimum principle on the specific entropy,
\[
s({\mathbf{u}}_{j}) \ge \min_{k \in \mathcal{N} (j)} s(\mathbf{u}^{\mathrm{FV}}_{k}),.
\]
where $\mathcal{N} (j)$ denotes the collection of nodes in the low-order stencil of each node $j$.
 
The video shows the total density ($\rho=\rho^1+\rho^2$), the density of the first ion species ($\rho^1$), and the so-called blending coefficient ($\alpha$) for the combination of a fourth-order accurate entropy stable DG method with first- and second-order accurate FV methods (Rusanov solver) and $1024^2$ degrees of freedom. A blending coefficient $\alpha=0$ means that only the DG is being used, and a blending coefficient $\alpha=1$ means that only the FV method is being used. The example shows that the hybrid FV/DG scheme is able to capture the shocks of the simulation correctly, deal with near-vacuum conditions and sharp interfaces.

[1] Rueda-Ramírez, A. M.; Pazner, W., & Gassner, G. J. (2022). Subcell limiting strategies for discontinuous Galerkin spectral element methods. Computers & Fluids. arXiv:2202.00576.
[2] Orszag, S.; Tang, C (1979). Small-scale structure of two-dimensional magnetohydrodynamic turbulence. Journal of Fluid Mechanics.
[3] Persson, P. O.; Peraire, J. (2006). Sub-cell shock capturing for discontinuous Galerkin methods. In 44th AIAA Aerospace Sciences Meeting and Exhibit (p. 112).

Snapshot: Dam break simulation with Smoothed Particle Hydrodynamics

To study the Smoothed Particle Hydrodynamics method, we simulate a dam break based on the setup given by [1].
We use a weakly-compressible Lagrangian SPH formulation with an artificial viscosity by Monaghan [2] and boundary force particles to model the tank [3].

This animation shows the simulation in 0.5x real time with 125k fluid particles and 7k boundary particles.

References:
[1] Marrone, S., Antuono, M., Colagrossi, A., Colicchio, G., le Touzé, D., & Graziani, G. (2011). “δ-SPH model for simulating violent impact flows”. In: Computer Methods in Applied Mechanics and Engineering, 200(13–16), 1526–1542. https://doi.org/10.1016/J.CMA.2010.12.016
[2] Monaghan, J. J. (1989). “On the Problem of Penetration in Particle Methods”. In: Journal of Computational Physics, 82(1), 1–15. https://doi.org/10.1016/0021-9991(89)90032-6
[3] Monaghan, J. J., & Kajtar, J. B. (2009). “SPH particle boundary forces for arbitrary boundaries”. In: Computer Physics Communications, 180(10), 1811–1820. https://doi.org/10.1016/j.cpc.2009.05.008