TRACE User Guide  TRACE Version 9.8.1
Discontinuous Galerkin Method

In TRACE, the governing equations are discretized with a nodal DG schemes, namely the Discontinous Galerkin Spectral Element Method (DGSEM), where a collocation of the interpolation and quadrature nodes is applied.

Discontinous Galerkin Spectral Element Method

The Navier-Stokes equations can be written in the following conservative form "NSE_conservative"

\begin{equation} \frac{\partial \mathbf{q}}{\partial t} + \nabla_x \cdot \mathbf{F}(\mathbf{q}, \nabla_x \mathbf{q}) = 0, \end{equation}

with suitable initial and boundary conditions, see Navier-Stokes equations for details. Here, \(\mathbf{q}\) denotes the conservative state vector \(\mathbf{q} = (\rho, \rho u_1, \rho u_2, \rho u_3, \rho E)^T\) with \(\mathbf{u} = (u_1, u_2, u_3)\) and \(\nabla_x\) the gradient operator in physical space. The physical flux \(\mathbf{F}\) being the difference of advective and viscous fluxes, \(\mathbf{F} = \mathbf{F}^a(\mathbf{q}) - \mathbf{F}^v(\mathbf{q}, \nabla_x \mathbf{q})\). The domain is subdivided into shape-regular meshes \(\mathcal{T}_h = \{ K \}\) consisting of non-overlapping elements \(K\), where \(h\) denotes a piecewise constant mesh function. For each element \(K \in \mathcal{T}_h\), we define a polynomial continuous invertible mapping \(M^K\) to a reference element \(K_\text{ref}\) with \(\mathbf{x} = M^K(\mathbf{\xi})\), where \(\mathbf{x} = (x,y,z)\) are the Cartesian coordinates and \(\mathbf{\xi} = (\xi, \eta, \zeta)\) are the generalized coordinates of the reference element \(K_\text{ref}\). The mapping is used to transform Eqn. NSE_conservative from the physical space into the reference space, which results in

\begin{equation} J \mathbf{q}_t + \nabla_\xi \cdot \mathbf{\mathcal{F}}(\mathbf{q}, \nabla_x \mathbf{q}) = 0, \end{equation}

where \(J\) is the Jacobian determinant \(J(\mathbf{\xi}) = \text{det}\left(\frac{\partial \mathbf{x}}{\partial \mathbf{\xi}}\right)\) and \(\mathbf{\mathcal{F}}\) is the contravariant flux. The construction of the metric terms to ensure free-stream preserving is derived in Metrics. Thereafter, the solution vector \(\mathbf{q}\) is approximated as piecewise polynomial functions and can be expressed by the polynomial expansion

\begin{equation} \mathbf{q}_h(\mathbf{\xi}, t)|_K = \sum_{n=0}^{N^3} \mathbf{q}_{n}(t) \ \phi^N_n(\mathbf{\xi}) \quad \forall K \in \mathcal{T}_h, \label{eq:ansatz} \end{equation}

where the 3D polynomial basis function \(\phi_n^N = l^N_i(\xi) l^N_j(\eta) l^N_k(\zeta)\) is constructed in a tensor product fassion with 1D Lagrange polynomials \(l_i^N\) of degree \(N\). Following that we multiply by a sufficiently smooth test function \(\mathbf{v}\), use the same ansatz for the test function \(\mathbf{v}\) as for the solution, integrate by parts and test only against the basis function \(\phi_m^N\) for all \(m=0\ldots N^3\). We seperate the advective \(\mathbf{\widetilde{\mathcal{F}}}^a = \left( \mathbf{\widetilde{\mathcal{F}}}^a_1, \mathbf{\widetilde{\mathcal{F}}}^a_2,\mathbf{\widetilde{\mathcal{F}}}^a_3 \right)\) and viscous contributions \(\mathbf{\widetilde{\mathcal{F}}^v}\), which yields in the semi-discrete weak formulation

\begin{equation} \int_{K_\text{ref}} J \left(\mathbf{q}_h\right)_t \phi_m d\mathbf{\xi} + \overbrace{\left[\int_{\partial K_\text{ref}} \phi_m \mathbf{\mathcal{H}}^a d\mathbf{S} - \int_{K_\text{ref}} \mathbf{\mathcal{F}}^a(\mathbf{q}) \cdot \nabla_\xi \phi_m d\mathbf{\xi}\right]}^{\let\scriptstyle\textstyle\mathbf{\widetilde{\mathcal{F}}}^a} \\\nonumber - \underbrace{\left[\int_{\partial K_\text{ref}} \phi_m \mathbf{\mathcal{H}}^v d\mathbf{S} - \int_{K_\text{ref}} \mathbf{\mathcal{F}}^v(\mathbf{q}, \nabla_x \mathbf{q}) \cdot \nabla_\xi \phi_m d\mathbf{\xi}\right]}_{\let\scriptstyle\textstyle\mathbf{\widetilde{\mathcal{F}}}^v} = 0. \end{equation}

Here, \(\mathbf{\mathcal{H}}^a\) and \(\mathbf{\mathcal{H}}^v\) denote the surface normal numerical flux function for the advection and viscous terms, respectivly. Approximate Riemann solvers are used as a advective numerical flux function, see Riemann Solver.
The integrals are approximated by a gaussian quadrature. In the DGSEM, we use the same points as interpolation and quadrature nodes, i.e. we apply collocation. By doing that, the 1D mass matrix \(\mathbf{M}\) is diagonal

\begin{equation} \mathbf{M} = \text{diag}[\omega_0,\ldots,\omega_{N}], \end{equation}

where \(\{\omega_i\}_{i=0}^N\) are the quadrature weights. Thus, due to the diagonal mass matrix and the tensor product nature, the advective contributions of each nodal coefficients \((i,j,k)\) in \(\xi\)-direction can be rewritten to

\begin{equation} \left(\mathbf{\widetilde{\mathcal{F}}}^a_1\right)_{ijk} = \mathbf{\mathcal{H}}^a(1, \eta_j, \zeta_k) \frac{l_i(1)}{\omega_i} - \mathbf{\mathcal{H}}^a(0, \eta_j, \zeta_k) \frac{l_i(0)}{\omega_i} - \sum_{n=0}^N \frac{\omega_n}{\omega_i} \mathbf{D}_{in} \left(\mathbf{\mathcal{F}}^a_1\right)_{njk}. \end{equation}

The remaining directions follow analogously. Here, \(\mathbf{D}\) is the 1D polynomial derivative matrix,

\begin{equation} \mathbf{D}_{ij} = \frac{\partial l_j (\xi_i)}{\partial \xi}, \quad i,j = 0,\ldots,N, \end{equation}

where \(\{\xi_i\}_{i = 0}^N\) are the interpolation nodes.

Metrics

For the mapping \( \mathbf{x} = \mathbf{M}^K(\mathbf{\xi})\) of the equations on the reference element \( K_\text{ref}=[0,1]^3\), we define three covariant basis vectors

\begin{equation} \mathbf{a}_i = \frac{\partial \mathbf{x}}{\partial \xi^i}, \ i=1,2,3 \end{equation}

and volume weighted contravariant vectors

\begin{equation} \mathbf{\mathcal{J}a}^i = \mathbf{a}_j \times \mathbf{a}_k, \ (i,j,k) \ cyclic, \end{equation}

where

\begin{equation} \mathcal{J} = \mathbf{a}_i \cdot (\mathbf{a}_j \times \mathbf{a}_k), \ (i,j,k) \ cyclic \end{equation}

is the Jacobian of the transformation. The contravariant coordinate vectors satisfy the metric identities

\begin{equation} \sum_{i=1}^3 \frac{\partial \mathbf{\mathcal{J}a}^i_n}{\partial \xi^i} = 0, \ n = 1,2,3. \end{equation}

In terms of reference space variables, the divergence (in conservative form) of an vector \( \mathbf{g}\) is

\begin{equation} \nabla_x \cdot \mathbf{g} = \frac{1}{\mathcal{J}} \sum_{i=1}^3 \frac{\partial (\mathbf{\mathcal{J}a}^i \cdot \mathbf{g})}{\partial \xi^i} \end{equation}

Within DGSEM, the metric terms are approximated by a polynomial of degree \(N\). It is important, that the approximated metric terms also ensure that the discrete metric identities

\begin{equation} \sum_{i=1}^3 \frac{\partial I^N(\mathbf{\mathcal{J}a}^i_n)}{\partial \xi^i} = 0, \ n = 1,2,3 \end{equation}

are satisfied. Therefore, the metric have to be computed as

\begin{equation} I^N(\mathbf{\mathcal{J}a}^i_n) = -x_i \cdot \nabla_\xi \times \left( I^N (x_l \nabla_\xi x_m) \right), \quad i=1,2,3, \ n = 1,2,3, \ (n,m,l) \ cyclic. \end{equation}

Shock Capturing

The theory about the present shock capturing approach was published in

  • "A provably entropy stable subcell shock capturing approach for high order split form DG for the compressible Euler equations" [22]

The Shock Indicator

The first part of the algorithm is to determine the shock danger level for each element. Here we take a modified version of the modal energy indicator from Persson and Peraire [49] . Modal energy in this context does not refer to physical energy of the fluid, but to squared coefficients of the DG polynomial in a modal representation. The question which physical values are used for indication is still open in the community. In TRACE we use density times pressure, which led to very good results, as can be seen in the paper.

The steps to indicate a troubled DG element are:

  • Transform the DG coefficients originally represented as nodal collocated values as modal coefficients. Here we use a hierarchical Legendre basis. So coefficients can be directly linked to frequencies / wavelengths of the polynomial.
  • Determine the energy (squared coefficients) sum of the polynomial and figure out how much energy is relatively contained in the highest modes.
  • Precomputed threshold: This threshold is empirically determined and depends only on the polynomial order. The user does not have to specify any parameters. It states what are dangerous high mode energy levels.
  • Define the blending value \( \alpha \in [0, 1] \), where 0 means no shock danger, so do full DG, and 1 means high danger, so full FV. In many investigations we found out, that \( \alpha = 1 \) seems to be never necessary. In TRACE \( \alpha \) is capped at 0.5. There are more minor details to the final computation of the blending function, the reader is referred to Chapter 4 of the paper.

Blending of high and low order scheme

A troubled high order element will be stabilized by adding numerical dissipation from a low order scheme. The blending of the two spatial schemes is pretty straight forward (Chapter 2 of the paper). We use the blending value \( \alpha \) and define the new right hand side operator:

\begin{equation} R := \alpha R^{FV} + (1-\alpha) R^{DG} \end{equation}

The Finite Volume method is the standard first order variant. The DG nodal values can be directly treated as FV sub element values due to the collocation property. This is computationally advantageous, because the FV solutions does not have to be constructed explicitly.

The only tricky part is the computation of the metric terms in 3 dimensions when using curvilinear DG elements. Details can be found in Appendix B.4 of the paper.

Nicely the method here is defined per DG element. The coupling between two DG elements is done by both spatial schemes through a standard Riemann solver in the same way. Thus, no blending has to be applied for surface integrals, but only for the volume integrals. The method is only applied to the Euler part of the Navier-Stokes Equations.