# Smooth and Compactly Supported Viscous Sub-cell Shock Capturing for Discontinuous Galerkin Methods

- 245 Downloads

## Abstract

In this work, a novel artificial viscosity method is proposed using smooth and compactly supported viscosities. These are derived by revisiting the widely used piecewise constant artificial viscosity method of Persson and Peraire as well as the piecewise linear refinement of Klöckner et al. with respect to the fundamental design criteria of conservation and entropy stability. Further investigating the method of modal filtering in the process, it is demonstrated that this strategy has inherent shortcomings, which are related to problems of Legendre viscosities to handle shocks near element boundaries. This problem is overcome by introducing certain functions from the fields of robust reprojection and mollifiers as viscosity distributions. To the best of our knowledge, this is proposed for the first time in this work. The resulting \(C_0^\infty \)*artificial viscosity method* is demonstrated to provide sharper profiles, steeper gradients, and a higher resolution of small-scale features while still maintaining stability of the method.

## Keywords

Hyperbolic conservation laws Euler equations Discontinuous Galerkin methods Shock capturing Artificial viscosity## Mathematics Subject Classification

35L65 65N30 65N35 35L67 35D40## 1 Introduction

In the last decades, great efforts have been made to develop accurate and stable numerical methods for time dependent partial differential equations (PDEs), especially for hyperbolic conservation laws. Traditionally, low order numerical schemes, have been used to solve hyperbolic conservation laws, in particular in industrial applications. But since they become quite costly for high accuracy or long time simulations, there is a rising demand for high order methods. Such high order methods, like flux reconstruction [42, 68] or several Discontinuous Galerkin schemes [20, 27, 38], typically use polynomial approximations to the solution. At least for smooth solutions, they are capable of reaching spectral orders of accuracy. Yet, special care has to be taken to the fact that solutions of hyperbolic conservation laws might form spontaneous discontinuities. Due to the Gibbs phenomenon, polynomial approximations of jump functions typically show spurious oscillations and yield the underlying numerical scheme to break down. While low-order methods add too much dissipation to the numerical solution, hence smearing smaller scaled features, high-order methods add too little. Therefore, in recent hp-methods, the idea is to add artificial dissipation in elements where discontinuities arise. Such procedures are known as *shock capturing techniques*.

In this work, a novel artificial viscosity method is proposed for sub-cell shock capturing in Discontinuous Galerkin and related methods. This new artificial viscosity method, referred to as the \(C_0^\infty \)*artificial viscosity method*, essentially relies on the idea to replace commonly used viscosities in the artificial viscosity method [47, 58] by certain weight functions from the field of robust reprojection [25] and mollifiers [66].

Further, the novel \(C_0^\infty \) artificial viscosity method is derived by revisiting the most commonly used existing viscosity methods, such as the piecewise constant artificial viscosity method of Persson and Peraire [58] as well as the piecewise linear method of Klöckner et al. [47], with regard to the fundamental design criteria of conservation and entropy stability. To the best of the authors’ knowledge, this is the first work to investigate these methods in a strictly analytical sense. In the process, we are able to pinpoint certain drawbacks of these methods, formulate precise criteria on the viscosity terms for certain properties to hold, and thus construct novel ones with favorable properties.

It should be noted that the related strategy of modal filtering is addressed, which is a widely used tool [8, 28, 30, 37], since it promises to be somewhat of a more efficient and easy to implement formulation of the artificial viscosity method. We will show, however, that modal filtering has inherent drawbacks which can not be overcome. This will be demonstrated by showing that modal filtering (at least for exponential filters) corresponds to specific Legendre or more general Jacobi artificial viscosities which again are highlighted to perform poor when shock discontinuities form near element boundaries. To the best of our knowledge, this is the first time modal filtering (by exponential filters) is exposed to hold such a shortcoming.

The rest of this work is organised as follows. In Sect. 2, a short description of the Discontinuous Galerkin method is given. Section 3 exposes the essential design criteria of conservation and entropy stability for hyperbolic conservation laws on which the subsequent theoretical investigation of different artificial viscosity methods are based. The artificial viscosity method is then introduced in Sect. 4 and the most widely used versions of Persson and Peraire as well as of Klöckner et al. are revisited. In this section it is further proved that conservation holds for the viscosity extension of a conservation law, once the artificial viscosity is continuous and compactly supported. In Sect. 5 this discussion is extended to entropy stability of viscosity extensions, where it is shown that the artificial viscosity in addition has to be nonnegative for entropy stability to carry over. Moreover pinpointing the crucial drawbacks of modal filtering, we utilize the acquired design criteria for artificial viscosity terms to propose novel ones. Section 6 introduces the shock sensor which will be used for the subsequent numerical tests in order to steer the location and strength of dissipation added by the novel artificial viscosity method. Numerical tests demonstrating the performance of the proposed novel strategies—also in comparison with the commonly used one of Klöckner et al.—are provided in Sect. 7 for the system of Euler equations. The work closes in Sect. 8 by summarizing the characteristic features of the proposed new artificial viscosity methods and discussing possible future applications.

## 2 Discretization

*I*disjoint, face-conforming elements \(\Omega _i\), \(\Omega = \bigcup _{i=1}^I \Omega _i\).

The DG method in one space dimension uses a nodal or modal polynomial basis of order *p* in a reference element \(\Omega _\textit{ref} = [-\,1,1]\). The *I* elements are mapped to this reference element, where all computations are performed then. The extension to multiple dimensions can be achieved by tensor products. Thus, in the following, just this one dimensional case is briefly revised. For a more detailed as well as more general description of DG schemes, see for instance the works [38, 45] and references cited therein.

*u*(

*t*,

*x*) respectively the flux

*f*(

*u*) at time

*t*. It is constructed by the approach of the residual

The resulting system of ordinary differential equations for the solution coefficients \(\underline{u}\), is integrated in time using for instance a Runge–Kutta method then. See the extensive literature [31, 32, 33, 46, 52]. In this work, the later numerical tests are obtained by the explicit strong stability preserving (SSP) Runge–Kutta (RK) method of third order using three stages (SSPRK(3,3)) or of forth order using five stages (SSPRK(4,5)) given by Gottlieb and Shu in [32] and Hesthaven and Warburton in [38], respectively.

## 3 Design Principles and Equations

### 3.1 Design Principles

*u*in a fixed domain \(\Omega \) is equal to the flux of that property across the boundary of \(\Omega \), i.e.

*U*(

*u*) and

*F*(

*u*) are any strictly convex entropy function and corresponding entropy-flux associated with the conservation law (12) in the sense that they have to satisfy \(U'(u) f'(u) = F'(u)\). A strict inequality in (14) reflects the existence of physically relevant shock waves in the solution of the system (12), (14) then. Similar to the associated conservation law, the entropy condition (14) ensures that the rate of change of the total amount of entropy

*U*in a fixed domain \(\Omega \) is equal or less to the entropy-flux across the boundary of \(\Omega \), i.e.

### 3.2 Linear Advection and Euler Equations

*linear advection equation*,

*U*,

*F*) of a strictly convex entropy

*U*and an entropy-flux

*F*. One such pair associated to the linear advection equation, is therefore already given by

*entropy*. In fact, for scalar conservation laws, any strictly convex function

*U*is an entropy [29]. Note that it is much more difficult to find an entropy

*U*in the general case of systems. In fact, the existence of entropy functions is a special property of the system. However, in all practical examples derived from Mechanics or Physics, finding an entropy which has a physical meaning is possible.

*Euler equations*

*v*is the velocity,

*E*is the total energy, \(m = q \rho \) is the momentum, \(P = (\gamma - 1)(E-\frac{1}{2}v^2 \rho )\) is the pressure, and \(\gamma \) is the ratio of specific heats. Euler equations broadly apply to compressible, inviscid flow problems. An entropy-entropy flux pair (

*U*,

*F*) associated to the Euler equations (20) is given by

*s*is the physical entropy

## 4 Motivation for \(C^0\) Artificial Viscosity

Further, a numerical full upwind flux \(f^\mathrm {num}(u_-,u_+) = u_-\) and time integration by the third order SSPRK method using three stages—SSPRK(3,3)—by Gottlieb and Shu [32] has been used. It is known [13] that for stability to hold the time step size \(\varDelta t\) should be bounded as \(\varDelta t \le C \frac{h}{(2p+1) \lambda _{\text {max}}}\), where \(\lambda _{\text {max}} = 1\) is the magnitude of the velocity and \(h=1/I\) is the (local) mesh size. Using 1000 time steps, the CFL number *C* has been chosen as \(C = 0.38\).

- 1.
The linear advection equation is the simplest partial differential equation that can feature discontinuous solutions. Thus, the (shock capturing) method can be observed in a well-understood setting, isolated from nonlinear effects.

- 2.
The knowledge of the exact solution \(u(t,x) = u_0(x-t)\), in particular, allows to suspend the discussion of shock senors. By eliminating potential shortcomings of a shock sensor, one is able to solely examine the behavior of the shock capturing method.

- 3.
At the same time, the linear advection equation provides a most challenging example to be treated. Similar to contact discontinuities in the Euler equations, discontinuities are not self-steeping. Once such a discontinuity is smeared by the method, nothing will recover it to its original sharp shape.

*U*associated to (18) remains constant for the exact solution. While the entropy stable numerical flux introduces dissipation at the element boundaries, and thus in the spatial semidiscretization, the SSPRK method does in the time integration. As a consequence, the entropy in Fig. 1b slightly decreases. Both mechanisms alone, entropy stable (dissipative) numerical fluxes and time integration, have serious drawbacks however. First, (\(L^2\)) stability of SSPRK schemes is only ensured when the simple forward Euler method \(u^{n+1} = u^n + \varDelta t \partial _t u^n\) already provides (\(L^2\)) stability [33]. Yet, the forward Euler method is most often not stable, since

^{1}Both cases are illustrated in Fig. 2. Sub-cell resolution can neither be enhanced by increasing the polynomial degree nor by refining the mesh.

In both cases, the spurious oscillations are just closer to the discontinuity but will not vanish. A common approach therefore is to identify the elements lying in the shock region and to reduce the order of approximation there, see for instance [6, 9] and references therein. Since this increases inter-element jumps and thus the amount of dissipation naturally added by the DG method, at latest for piecewise constant approximations, the method should be able to handle any shock. Yet, it should be stressed that decreasing the order of approximation is equivalent to adding dissipation proportional to \(\mathcal {O}(\varDelta x)\). Clearly, the accuracy will be reduced. Thus, a widely accepted observation is that the solution, in fact, can be at most first order accurate near shocks. A common idea to bypass this problem is to adaptively refine the mesh in regions of discontinuity. Shocks, however, are lower dimensional objects and strongly anisotropic. An effective strategy for mesh adaptation therefore needs to incorporate some degree of directionality, especially in three dimensions. See for instance [17] and references therein.

### 4.1 Vanishing and Artificial Viscosity

In their pioneering work [69], von Neumann and Richtmyer revised this idea to construct stable FD schemes for the equations of hydrodynamics by including artificial viscosity terms. As they pointed out, when viscosity is taken into account, shocks are seen to be smeared out, so that the mathematical surfaces of discontinuity are replaced by thin layers in which pressure, density, temperature, etc. vary rapidly but continuously. The overall concept is to approximate (discontinuous) entropy solutions by smoother solutions of a parabolic equation and to apply the numerical method to this new equation, where shocks are now replaced by thin but continuous layers. Often, the smooth approximation \(u_\varepsilon \) is also called a *viscose profile* to the entropy solution *u*.

### 4.2 A Local Artificial Viscosity

Considering a viscose profile over the whole domain \(\Omega \), shocks might be spread over several elements if not even the whole domain. Furthermore, also other (especially small-scale) features of the original solution away from shocks typically get smeared by a global artificial viscosity, i.e. \(\varepsilon = \textit{const}\) on \(\Omega \). Breaking new ground in [58], Persson and Peraire therefore proposed a local artificial viscosity in the framework of DG methods. By locally adapting the viscosity strength \(\varepsilon \), artificial viscosity is just added in the elements where shocks arise. Thus, the now piecewise constant function \(\varepsilon \) is chosen \(\varepsilon = 0\) away from discontinuities and \(\varepsilon > 0\) in elements with shocks. Discontinuities that may appear in the original solution will spread over layers of thickness \(\mathcal {O}(\varepsilon )\) in the solution of the modified equation. Hence, Persson and Peraire more precisely suggest that \(\varepsilon \) should be chosen as a function of the resolution available in the approximating space. Since this resolution given by a piecewise polynomial of order *p* and element width *h* scales like \(\frac{h}{p}\), values \(\varepsilon \in \mathcal {O}\left( \frac{h}{p} \right) \) are taken near shocks.

While there are works of Barter and Darmofal [4] as well as Klöckner, Warburton, and Hesthaven [47] that emphasize certain drawbacks of a piecewise constant artificial viscosity, the present work is the first to decline this approach based on a strictly theoretical analysis. In [4], the authors already observed oscillations in state gradients which pollute the downstream flow for element-to-element variations in the artificial viscosity. In the following however, it is demonstrated that already the very first design principle (13) of conservation fails for a just piecewise continuous artificial viscosity.

*i*-th element. Now putting the elements together, the rate of change of the total amount of

*u*is given by

### 4.3 Recent Continuous Refinements: Smoothing the Artificial Viscosity

In [4], Barter and Darmofal took up the work [58] of Persson and Peraire and further improved their ideas. Clear numerical shortcomings of a piecewise constant artificial viscosity are stressed in their work. In particular, they note that the element-to-element variations induce oscillations in state gradients, which pollute the downstream flow. While numerical oscillations are damped, oscillations remain in the derivative \(\partial _x u\). Even though they seem to miss the violation of conservation, they clearly point out the missing smoothness of the viscosity as the crucial problem. Thus, in [4] a smooth artificial viscosity was developed by employing an artificial viscosity PDE model which is appended to the system of governing equations. Effectively, their idea to enhance smoothness of the artificial viscosity is “diffusing the diffusivity”.

### Theorem 1

^{2}Thus, they have formulated an algorithm to enforce continuity of the viscosity—as the authors think, more efficient than the one of Barter and Darmofal—by simple linear interpolation. Building up on a given piecewise constant viscosity, they propose the following steps:

- 1.
At each vertex, collect the maximum viscosity occurring in each of the adjacent elements.

- 2.
Propagate the resulting maximum back to each element adjoining vertex.

- 3.
Use a linear (\(P^1\)) interpolant to extend the values at the vertices into a viscosity on the entire element.

First introducing local artificial viscosity to resolve shock discontinuities within a single element, yet increasing the footprint again by enforcing continuity, the circle closes.

## 5 Modal Filtering and Novel \(C^\infty _0\) Artificial Viscosities

When enforcing continuity of the viscosity, and therefore ensuring conservation, the initial localization of the artificial viscosity proposed by Persson and Peraire [58] is destroyed again. Shocks are spread over several cells and sub-cell resolution is prevented.

*q*, just shift the problem. The efficiency still is reduced, now by the increased complexity of the system under consideration.

- 1.
Spreading of shocks over several elements by enforcement of continuity.

- 2.
Decreased efficiency of the method by introducing second (or higher) order terms of the artificial viscosity.

In order to fill the void that results from rejecting the state of the art viscosities, novel \(C^\infty _0\) artificial viscosities are proposed in Sect. 5.2. To the best of the authors’ knowledge, these viscosities are proposed for the first time.

### 5.1 Legendre Artificial Viscosity and Modal Filtering

*Legendre viscosity*defined on the reference element \([-\,1,1]\) by

*viscosity strength*and \(\nu (x) =\left( 1 - x^2 \right) \) is referred to as the

*viscosity distribution*.

Using the Legendre artificial viscosity, shocks are again resolved within a single element, where now conservation is satisfied by Theorem 1 and entropy stability is further ensured by the subsequent Theorem 2. The Legendre viscosity is such a widespread tool because it enables one to bypass Problem 2 in a certain sense. Here, a procedure first proposed by Majda et al. [53] as well as by Kreiss and Oliger [48] is utilized. Also see the monograph [30].

*order*2 with

*filter strength*\(\alpha := \varepsilon p^2 \varDelta t\). See for instance the work [37] of Hesthaven and Kirby, as well as references therein.

By now, modal filtering is an established shock-capturing tool and was applied in a great number of works, [8, 26, 28, 30, 37, 40, 44, 54, 55, 56, 71]. In our numerical tests however, we observed the Legendre artificial viscosity as well as the corresponding modal filter applied in a Legendre basis to perform poorer than for instance the artificial viscosity method of Klöckner et al. In Fig. 4, this is demonstrated for the linear advection equation.

While there are nearly no oscillations present anymore in the numerical solution obtained by the \(C^0\) artificial viscosity of Klöckner et al. (Fig. 4b), the numerical solution obtained by the Legendre artificial viscosity still shows spurious oscillations (Fig. 4c). This is illustrated in greater detail in Fig. 4d, where the numerical solutions for the \(C^0\) and Legendre artificial viscosity method are compared to the right of the jump discontinuity. By running various numerical tests, the particular viscosity distribution of the Legendre artificial viscosity was explored to be the determining factor for the spurious oscillations in the corresponding numerical solution. Further illustrated by the subsequent Fig. 5a, the Legendre viscosity rapidly vanishes away from the element center. Thus, if a shock discontinuity performs near a cell boundary, nearly no—in fact arbitrary little—dissipation is added there by the Legendre viscosity. This observation can be made whenever shocks perform near element boundaries and yield to the conclusion that the Legendre artificial viscosity method as well as corresponding modal filters should be rejected.

*a*,

*b*and

*c*must be polynomials of degree 2, 1 and 0, respectively. Further keeping in mind that the resulting viscosity needs to vanish at the boundaries to ensure conservation and should be positive (see Theorem 2), up to a positive constant, \(a(x) = 1-x^2\) is the very only choice. Note that every modal filter \(\sigma _k = \exp ( - \alpha k(k+1+\alpha +\beta ) )\) applied in the associated basis of orthogonal Jacobi polynomials \(\{ P_k^{(\alpha ,\beta )} \}\) is equivalent to artificial viscosity of the form

### 5.2 Novel \(C^\infty _0\) Artificial Viscosities

To the best of the authors’ knowledge, this work is the first to decline the whole class of Jacobi viscosities and their corresponding modal filters. In order to somewhat fill the resulting void in sub-cell shock capturing methods for spectral schemes, novel viscosity distributions will be proposed in this subsection in order to overcome the shortcomings of the Legendre and Jacobi ones.

*artificial viscosities*\(\varepsilon \left( \partial _x \nu (x) \partial _x \right) u \) is again ensured by Theorem 1. The crucial requirement is for the viscosity distribution \(\nu (x)\) to vanish at the element boundaries. Thus, other viscosity distributions than the Legendre one are obviously possible. Yet, non-negativity of these is mandatory to carry the design criteria of entropy stability (15) over to the artificial viscosity extension

### Theorem 2

*U*,

*F*).

### Proof

*U*is convex, the inequality

Note that both, the local artificial viscosity of Persson and Peraire [58] using a piecewise constant viscosity as well as the continuous refinement and Klöckner et al. [47] yield entropy stability. In fact, the proof of Theorem 2 easily adapts to continuous artificial viscosities over several cells as long as they are compactly supported on \(\Omega \). This is furthermore in accordance with the well-known effect of dissipative mechanisms on shocks, such as heat conduction and more general viscosity terms [69].

### Remark 3

In Sect. 4, \(C^0\) has been referred to the viscosity being globally \(C^0\), i.e. continuous on the whole domain \(\Omega \). In the present section, however, \(C^\infty _0\) refers to the viscosity being locally \(C^\infty _0\), i.e. smooth and compactly supported in every element \(\Omega _i\). Globally, the viscosity will still be only continuous, if no additional restrictions at the boundaries are enforced for the viscosity.

- 1.The
*Gegenbauer viscosity*for \(\lambda > 0\) is somewhat the ‘natural’ generalisation of the Legendre viscosity. Choosing small values for \(\lambda \), the Gegenbauer viscosity becomes \(\nu \approx 1\) over most of the interval, therefore fulfilling our devise for the novel viscosities. This is further illustrated in Fig. 5a for \(\lambda =1\) and \(\lambda =1/10\).$$\begin{aligned} \nu (x) = \left( 1 - x^2 \right) ^\lambda \end{aligned}$$(55) - 2.The
*super Gaussian viscosity*where \(\alpha = - \ln \varepsilon _M\) with \(\varepsilon _M\) representing machine precision,$$\begin{aligned} \nu (x) = e^{-\alpha x^{2\lambda }}, \end{aligned}$$(56) - 3.as well as the
*Gevrey viscosity*$$\begin{aligned} \nu (x) = {\left\{ \begin{array}{ll} \exp \left( \frac{x^2}{\lambda (x^2 - 1)} \right) , &{} \quad 0 \le |x| < 1, \\ 0 , &{} \quad |x| \ge 1, \end{array}\right. }, \end{aligned}$$(57)

### Remark 4

It should be stressed that in principle \(C_0^\infty \) viscosities yield the same time step restrictions as common viscosities. While this drawback might be overcome by modal filtering, it was shown in Sect. 5.1 that modal filtering corresponds to a Legendre viscosity, which in general is inappropriately distributed and was demonstrated in Fig. 4 to result in undesired numerical solutions. Yet, the compact nature of the new \(C_0^\infty \) viscosities allow a more efficient treatment when, for instance, implicit-explicit (IMEX) time integration schemes [3] are applied to bypass too harsh (explicit) time step restrictions, since they are applied to less elements.

### Remark 5

Implementation of the \(C_0^\infty \) viscosity (45) is done in the very same way as for usual viscosities, i.e. by a local DG method (33), see [15], or by direct calculation of second derivatives as done in [61]. Thus, no additional code is necessary when going over from usual viscosities to \(C_0^\infty \) viscosities. In fact, \(C_0^\infty \) viscosities are easier to implement from scratch, since no additional ‘smoothing procedure’ [4, 47] as described in Sect. 4.3 is needed. In our implementation, we have used the local DG method.

Last but not least, the question of how to choose the viscosity strength \(\varepsilon \) has to be addressed. It is evident that the strength should again be strictly greater than 0 in elements where a shock is present and equal to 0 everywhere else. The next section thus aims at a more precise scaling of the viscosity strength in the presence of discontinuities in the solution.

## 6 Shock Sensor

In this section, we describe the shock sensor which is utilized in the our subsequent numerical tests. The shock detection algorithm is based on the one of Persson and Peraire [58] and does not just flag troubled cells but also steers the viscosity strength \(\varepsilon \).

Further, the sensor is based on the rate of decay of the expansion coefficients of the polynomial approximation \(u_p\) when represented with respect to a hierarchical orthonormal basis \(\{ \varphi _k \}_{k=0}^{K(p)}\) of the approximation space \(\mathbb {P}_p\left( \Omega _\textit{ref} \right) \). Here, \(\Omega _\textit{ref}\) denotes a reference element in which all computations are performed. Typical choices are \(\Omega _\textit{ref}=[-1,1]\) in one dimension and, for instance, in two dimensions \(\Omega _\textit{ref} = [-1,1]^2\) when quadrilateral elements are used or \(\Omega _\textit{ref} = \mathbb {T} := \{(x,y) \in \mathbb {R}^2| x\ge 0,y\ge 0, x+y\le 1\}\) when triangular elements are used. Furthermore, \(K(p)+1\) denotes the number of basis elements needed to generate the approximation space. Thus, when expressed in a hierarchical orthonormal basis \(\{ \varphi _k \}_{k=0}^{K(p)}\), the numerical solution reads \(u_p = \sum _{k=0}^{K(p)} \hat{u}_k \varphi _k\) on every element. The truncated series of reduced degree \(p-1\) is represented by \(u_{p-1} = \sum _{k=0}^{K(p-1)} \hat{u}_k \varphi _k\).

*S*. By assuming analogy to Fourier expansions,

*S*measures the degree of smoothness and is expected to scale like

*u*for which \(u_p\) is the orthogonal projection into \(\mathbb {P}_p\left( \Omega _\textit{ref} \right) \). Thus, artificial viscosity should be activated for \(S>p^{-4}\), since a discontinuity is anticipated then. Applying the logarithm on both terms, the above condition can also be written as

*u*remains constant, the sensor value

*s*linearly increases for increasing smoothness and decreases for decreasing smoothness of

*u*.

*maximal viscosity strength*\(\varepsilon _{max} \sim \frac{h}{p}\) and a problem dependent

*ramp parameter*\(\kappa > 0\). In this work, following [47], the ramp parameter is chosen as \(\kappa = 1\), while, for scalar problems, the maximal viscosity strength is chosen as

*c*is a suitably chosen parameter defined to control the sensor sensitiveness. This parameter becomes the only problem dependent variable and, in general, the stronger the nonlinearity of the underlying equations is the higher the value of

*c*becomes.

Closing this section, we want to note that several other shock sensors have been proposed for the selective application of artificial viscosity as well as mesh refinement. These shock detection algorithms, for instance, use information on the \(L^2\) norm of the residual of the variational form [5, 43], the primary orientation of the discontinuity [36], magnitude of the facial inter-element jumps [4, 19] or entropy pairs [34]. Yet, for most of these sensors it is typically unclear which value indicates a shock discontinuity or other features of instability. A shortcoming of these methods thus is that a variety of scaling choices on a case-by-case basis have to be proposed, where no assignment of the scaled quantity to an explicit meaning is clear anymore.

The above sensor of Persson and Peraire, however, has the advantage of a proper scaling: Most of the listed quantities essentially relate to the smoothness of the underlying solution *u*, and thus how well-resolved it is by a polynomial (best) approximation. There are also enhancements of the sensor of Persson and Peraire, see for instance the recommended work [47], which would exceed the scope of this work. Since we want to focus on the advantage of using novel viscosities rather than on the underlying shock detection algorithm, the subsequent numerical tests are performed by using the basic but fairly reliable sensor (61).

## 7 Extension to the Euler Equations of Gas Dynamics

In this section, the prior theoretical investigations and results are demonstrated for the system of Euler equations. The extension of the proposed artificial viscosity method to the system of Euler equations (or any other system) is straightforward and described in Sect. 7.1. Numerical tests for the problems of Sod’s shock tube as well as Shu and Osher’s shock tube are presented. In order to keep the presentation compact, we have decided to demonstrate the subsequent tests just for the super Gaussian viscosity (56) as a prototype of the proposed \(C^0\) viscosities.

The numerical tests demonstrate that the proposed \(C_0^\infty \) viscosities provide observable sharper profiles and steeper gradients than the usual \(C^0\) viscosity. Shu and Osher’s shock tube—especially designed for high-order methods—further illustrates that the new \(C_0^\infty \) artificial viscosity method, compared to the \(C^0\) artificial viscosity method, is capable of an advanced representation of wave amplitudes of high frequency features.

### 7.1 Sod’s Shock Tube

*v*is the velocity,

*E*is the total energy, \(m = \rho v\) is the momentum, \(P = (\gamma - 1)(E-\frac{1}{2}v^2 \rho )\) is the pressure, and \(\gamma = 1.4\) is taken for the ratio of specific heat. The Euler equations express the conservation of mass, momentum, and energy for a perfect gas. The extension of the artificial viscosity is straightforward, since the method and the prior sensor is applied to the density variable \(u_1 = \rho \) and, once the shock is detected, the viscosity is added to all conserved variables.

The numerical solutions were obtained using \(I=40\) equidistant elements and polynomial degree \(p=5\). We decided for Sod’s shock tube as a first test case since this is a relatively mild test case for which an analytical reference solution can still be determined, [65]. The profiles for density, pressure, and velocity are illustrated in Fig. 6 by (black) dotted lines and consist of a left rarefaction, a contact, and a right shock.

At the same time, the profiles of numerical solutions are realized by (blue) straight lines for the \(C^0\) artificial viscosity method and by (red) dashed lines for the super Gaussian \(C_0^\infty \) artificial viscosity method. For the super Gaussian viscosity (56) the parameters \(\lambda = 100\) and \(\alpha = -\ln \left( 10^{-16}\right) \) were chosen. We made no effort to optimise these parameters, which appeared to be fairly robust in our tests. More suitable choices of parameters, yielding to further enhanced results, thus seem possible. The numerical solution obtained by the super Gaussian \(C_0^\infty \) artificial viscosity method shows a sharper profile and steeper gradients; particularly visible in the density profile at the contact discontinuity around \(x\approx 0.68\), see Fig. 6b.

### 7.2 Shu and Osher’s Shock Tube

The numerical solutions by \(C^0\) artificial viscosity—(blue) straight line—and by super Gaussian \(C_0^\infty \) artificial viscosity—(red) dashed line—are both computed using \(I=80\) equidistant elements and polynomial approximations of degree \(p=5\). The reference solution—(black) dotted line—is computed with polynomial degree \(p=1\), \(I =10{,}000\) elements, and the generalized slope limiter, see [10, 11, 12, 13, 14, 16] or [38, page 152]. We decided for the test case of Shu and Osher’s shock tube, since it demonstrates the advantage of a reasonable chosen amount of dissipation, when the problem involved has some structure. In fact, we can observe an enhanced representation of the small-scale wave amplitudes, especially left from the shock discontinuity in the profile of the density, for the novel super Gaussian \(C_0^\infty \) artificial viscosity method compared to the usual \(C^0\) artificial viscosity method. This is illustrated in greater detail in Fig. 7b. For instance, in long time or large eddy simulations, the preservation of such small-scale features is highly desired.

### Remark 6

The above results raise the question of the effect of the proposed viscosity on the spectral resolution of the method, in particular compared to usual viscosities. Future work will investigate these spectral properties by means of a (nonlinear) spectral analysis as described, for instance, in [18, 59, 70]. We think it would be of interest to have a more rigorous study on how the spectral resolution of the artificial viscosity method depends on the viscosity function.

## 8 Summary and Conclusions

In this work, a novel artificial viscosity method has been introduced utilizing smooth and compactly supported viscosity distributions. In order to derive them, widely used artificial viscosity methods, such as the ones of Persson and Peraire as well as Klöckner et al., were analytically revisited with respect to the essential design criteria of conservation and entropy stability. It was proved for the viscosity extension that conservation carries over if the viscosity is continuous and compactly supported, while entropy stability already holds for positive viscosities.

Further investigating the method of modal filtering, it was demonstrated that this strategy has inherent shortcomings, which are related to the nature of Legendre and more general Jacobi viscosities. Since these have their peak in the middle of elements and rapidly decrease away from the element center, problems arise for shock discontinuities near element boundaries.

Overcoming this drawback, the new \(C_0^\infty \) were constructed such that they are approximately constant over nearly the whole element. Smooth and compactly supported functions with \(\approx 1\) over most of an element can be found in the field of robust reprojection as well as mollifiers and were proposed as viscosity distributions for the first time in this work.

Numerical tests for the Euler equations demonstrated the novel (super Gaussian) \(C_0^\infty \) artificial viscosity to provide sharper profiles, steeper gradients, and a higher resolution of small-scale features while still maintaining stability of the method.

Since all artificial viscosity methods heavily rely on trustworthy detection of discontinuities, further research on shock sensor strategies is mandatory. It is our opinion that especially shock sensors which are capable of detecting the precise location and strength of jump discontinuities, such as the concentration method of Gelb and Tadmor [21, 22, 23, 24, 57] or polynomial annihilation [1, 2], seem highly promising. This would also allow to moreover adapt the artificial viscosity method in every element to the exact location of a shock. Dissipation would just be added where it is needed.

## Footnotes

- 1.
Which would also contradict the idea of high order methods.

- 2.
\(\varepsilon \in C^k\) for \(k > 0\) is required for higher order viscosities, for instance \(\left( \partial _{xx} \nu \partial _{xx} \right) u\). Then, \(\frac{{\text {d}}^k \nu }{{\text {d}}t^k} (\pm 1) = 0\) is further required for conservation.

## Notes

### Acknowledgements

Open access funding provided by Max Planck Society. This work developed during a two-moth stay of the first author at the Max Planck Institute for Mathematics (MPIM) in Bonn during summer of 2017. He would like to express his gratitude for the generous financial support by the MPIM as well as the warm and inspiring research atmosphere provided by its staff. Further, we would like to thank the anonymous referees for many helpful suggestions.

## References

- 1.Archibald, R., Gelb, A., Yoon, J.: Polynomial fitting for edge detection in irregularly sampled signals and images. SIAM J. Numer. Anal.
**43**(1), 259–279 (2005)MathSciNetzbMATHGoogle Scholar - 2.Archibald, R., Gelb, A., Yoon, J.: Determining the locations and discontinuities in the derivatives of functions. Appl. Numer. Math.
**58**(5), 577–592 (2008)MathSciNetzbMATHGoogle Scholar - 3.Ascher, U.M., Ruuth, S.J., Wetton, B.T.: Implicit-explicit methods for time-dependent partial differential equations. SIAM J. Numer. Anal.
**32**(3), 797–823 (1995)MathSciNetzbMATHGoogle Scholar - 4.Barter, G.E., Darmofal, D.L.: Shock capturing with pde-based artificial viscosity for dgfem: Part I. Formulation. J. Comput. Phys.
**229**(5), 1810–1827 (2010)MathSciNetzbMATHGoogle Scholar - 5.Bassi, F., Rebay, S.: Accurate 2D Euler computations by means of a high order discontinuous finite element method. In: Fourteenth International Conference on Numerical Methods in Fluid Dynamics, pp. 234–240. Springer (1995)Google Scholar
- 6.Baumann, C.E., Oden, J.T.: A discontinuous hp finite element method for convection–diffusion problems. Comput. Methods Appl. Mech. Eng.
**175**(3–4), 311–341 (1999)MathSciNetzbMATHGoogle Scholar - 7.Bochner, S.: Über Sturm–Liouvillesche polynomsysteme. Math. Z.
**29**(1), 730–736 (1929)MathSciNetzbMATHGoogle Scholar - 8.Boyd, J.P.: Chebyshev and Fourier Spectral Methods. Courier Corporation, Chelmsford (2001)zbMATHGoogle Scholar
- 9.Burbeau, A., Sagaut, P., Bruneau, C.H.: A problem-independent limiter for high-order Runge–Kutta discontinuous Galerkin methods. J. Comput. Phys.
**169**(1), 111–150 (2001)MathSciNetzbMATHGoogle Scholar - 10.Cockburn, B.: Discontinuous Galerkin methods for convection-dominated problems. In: High-Order Methods for Computational Physics, pp. 69–224. Springer (1999)Google Scholar
- 11.Cockburn, B., Hou, S., Shu, C.W.: The Runge–Kutta local projection discontinuous Galerkin finite element method for conservation laws. IV. The multidimensional case. Math. Comput.
**54**(190), 545–581 (1990)MathSciNetzbMATHGoogle Scholar - 12.Cockburn, B., Lin, S.Y., Shu, C.W.: TVB Runge–Kutta local projection discontinuous Galerkin finite element method for conservation laws III: one-dimensional systems. J. Comput. Phys.
**84**(1), 90–113 (1989)MathSciNetzbMATHGoogle Scholar - 13.Cockburn, B., Shu, C.W.: TVB Runge–Kutta local projection discontinuous Galerkin finite element method for conservation laws. II. General framework. Math. Comput.
**52**(186), 411–435 (1989)MathSciNetzbMATHGoogle Scholar - 14.Cockburn, B., Shu, C.W.: The Runge–Kutta local projection \(p^1\)-discontinuous-Galerkin finite element method for scalar conservation laws. ESAIM Math. Model. Numer. Anal.
**25**(3), 337–361 (1991)zbMATHGoogle Scholar - 15.Cockburn, B., Shu, C.W.: The local discontinuous Galerkin method for time-dependent convection–diffusion systems. SIAM J. Numer. Anal.
**35**(6), 2440–2463 (1998)MathSciNetzbMATHGoogle Scholar - 16.Cockburn, B., Shu, C.W.: The Runge–Kutta discontinuous Galerkin method for conservation laws V: multidimensional systems. J. Comput. Phys.
**141**(2), 199–224 (1998)MathSciNetzbMATHGoogle Scholar - 17.Dervieux, A., Leservoisier, D., George, P.L., Coudière, Y.: About theoretical and practical impact of mesh adaptation on approximation of functions and PDE solutions. Int. J. Numer. Methods Fluids
**43**(5), 507–516 (2003)MathSciNetzbMATHGoogle Scholar - 18.Fauconnier, D., Dick, E.: On the spectral and conservation properties of nonlinear discretization operators. J. Comput. Phys.
**230**(12), 4488–4518 (2011)MathSciNetzbMATHGoogle Scholar - 19.Feistauer, M., Kučera, V.: On a robust discontinuous Galerkin technique for the solution of compressible flow. J. Comput. Phys.
**224**(1), 208–221 (2007)MathSciNetzbMATHGoogle Scholar - 20.Gassner, G.J.: A skew-symmetric discontinuous Galerkin spectral element discretization and its relation to sbp-sat finite difference methods. SIAM J. Sci. Comput.
**35**(3), A1233–A1253 (2013)MathSciNetzbMATHGoogle Scholar - 21.Gelb, A., Cates, D.: Detection of edges in spectral data III—refinement of the concentration method. J. Sci. Comput.
**36**(1), 1–43 (2008)MathSciNetzbMATHGoogle Scholar - 22.Gelb, A., Tadmor, E.: Detection of edges in spectral data. Appl. Comput. Harmon. Anal.
**7**(1), 101–135 (1999)MathSciNetzbMATHGoogle Scholar - 23.Gelb, A., Tadmor, E.: Detection of edges in spectral data II. Nonlinear enhancement. SIAM J. Numer. Anal.
**38**(4), 1389–1408 (2000)MathSciNetzbMATHGoogle Scholar - 24.Gelb, A., Tadmor, E.: Adaptive edge detectors for piecewise smooth data based on the minmod limiter. J. Sci. Comput.
**28**(2), 279–306 (2006)MathSciNetzbMATHGoogle Scholar - 25.Gelb, A., Tanner, J.: Robust reprojection methods for the resolution of the gibbs phenomenon. Appl. Comput. Harmon. Anal.
**20**(1), 3–25 (2006)MathSciNetzbMATHGoogle Scholar - 26.Giraldo, F.X., Hesthaven, J.S., Warburton, T.: Nodal high-order discontinuous Galerkin methods for the spherical shallow water equations. J. Comput. Phys.
**181**(2), 499–525 (2002)MathSciNetzbMATHGoogle Scholar - 27.Glaubitz, J., Öffner, P.: A novel discontinuous Galerkin method using the principle of discrete least squares. MPIM preprint series: 2017-63. Submitted (2017)Google Scholar
- 28.Glaubitz, J., Öffner, P., Sonar, T.: Application of modal filtering to a spectral difference method (2016). ArXiv preprint arXiv:1604.00929
- 29.Godlewski, E., Raviart, P.: Hyperbolic systems of conservation laws. Mathématiques & applications. Ellipses. https://books.google.de/books?id=hzvvAAAAMAAJ (1991)
- 30.Gottlieb, D., Hesthaven, J.S.: Spectral methods for hyperbolic problems. J. Comput. Appl. Math.
**128**(1), 83–131 (2001)MathSciNetzbMATHGoogle Scholar - 31.Gottlieb, S., Ketcheson, D.I., Shu, C.W.: Strong Stability Preserving Runge–Kutta and Multistep Time Discretizations. World Scientific, Singapore (2011)zbMATHGoogle Scholar
- 32.Gottlieb, S., Shu, C.W.: Total variation diminishing Runge–Kutta schemes. Math. Comput. Am. Math. Soc.
**67**(221), 73–85 (1998)MathSciNetzbMATHGoogle Scholar - 33.Gottlieb, S., Shu, C.W., Tadmor, E.: Strong stability-preserving high-order time discretization methods. SIAM Rev.
**43**(1), 89–112 (2001)MathSciNetzbMATHGoogle Scholar - 34.Guermond, J.L., Pasquetti, R.: Entropy-based nonlinear viscosity for fourier approximations of conservation laws. C. R. Math.
**346**(13–14), 801–806 (2008)MathSciNetzbMATHGoogle Scholar - 35.Harten, A.: On the symmetric form of systems of conservation laws with entropy. J. Comput. Phys.
**49**(1), 151–164 (1983)MathSciNetzbMATHGoogle Scholar - 36.Hartmann, R.: Adaptive discontinuous Galerkin methods with shock-capturing for the compressible Navier–Stokes equations. Int. J. Numer. Methods Fluids
**51**(9–10), 1131–1156 (2006)MathSciNetzbMATHGoogle Scholar - 37.Hesthaven, J., Kirby, R.: Filtering in legendre spectral methods. Math. Comput.
**77**(263), 1425–1452 (2008)MathSciNetzbMATHGoogle Scholar - 38.Hesthaven, J.S., Warburton, T.: Nodal Discontinuous Galerkin Methods: Algorithms, Analysis, and Applications. Springer, Berlin (2007)zbMATHGoogle Scholar
- 39.Hewitt, E., Hewitt, R.E.: The Gibbs-Wilbraham phenomenon: an episode in Fourier analysis. Arch. Hist. Exact Sci.
**21**(2), 129–160 (1979)MathSciNetzbMATHGoogle Scholar - 40.Hu, F.Q.: On absorbing boundary conditions for linearized euler equations by a perfectly matched layer. J. Comput. Phys.
**129**(1), 201–219 (1996)MathSciNetzbMATHGoogle Scholar - 41.Hughes, T.J., Franca, L., Mallet, M.: A new finite element formulation for computational fluid dynamics: I. Symmetric forms of the compressible Euler and Navier–Stokes equations and the second law of thermodynamics. Comput. Methods Appl. Mech. Eng.
**54**(2), 223–234 (1986)MathSciNetzbMATHGoogle Scholar - 42.Huynh, H.T.: A flux reconstruction approach to high-order schemes including discontinuous Galerkin methods. AIAA Paper, vol. 4079 (2007)Google Scholar
- 43.Jaffre, J., Johnson, C., Szepessy, A.: Convergence of the discontinuous Galerkin finite element method for hyperbolic conservation laws. Math. Models Methods Appl. Sci.
**5**(03), 367–386 (1995)MathSciNetzbMATHGoogle Scholar - 44.Kanevsky, A., Carpenter, M.H., Hesthaven, J.S.: Idempotent filtering in spectral and spectral element methods. J. Comput. Phys.
**220**(1), 41–58 (2006)MathSciNetzbMATHGoogle Scholar - 45.Karniadakis, G., Sherwin, S.: Spectral/hp Element Methods for Computational Fluid Dynamics. Oxford University Press, Oxford (2013)zbMATHGoogle Scholar
- 46.Ketcheson, D.I.: Highly efficient strong stability-preserving Runge–Kutta methods with low-storage implementations. SIAM J. Sci. Comput.
**30**(4), 2113–2136 (2008)MathSciNetzbMATHGoogle Scholar - 47.Klöckner, A., Warburton, T., Hesthaven, J.S.: Viscous shock capturing in a time-explicit discontinuous Galerkin method. Math. Model. Nat. Phenom.
**6**(3), 57–83 (2011)MathSciNetzbMATHGoogle Scholar - 48.Kreiss, H.O., Oliger, J.: Stability of the Fourier method. SIAM J. Numer. Anal.
**16**(3), 421–433 (1979)MathSciNetzbMATHGoogle Scholar - 49.Kuzmin, D., Löhner, R., Turek, S.: Flux-Corrected Transport: Principles, Algorithms, and Applications. Scientific Computation. Springer, Berlin. https://books.google.de/books?id=bZj8pI3ioOwC (2006)
- 50.Lax, P.D.: Hyperbolic Systems of Conservation Laws and the Mathematical Theory of Shock Waves. SIAM, Philadelphia (1973)zbMATHGoogle Scholar
- 51.LeVeque, R.J.: Finite Volume Methods for Hyperbolic Problems, vol. 31. Cambridge University Press, Cambridge (2002)Google Scholar
- 52.Levy, D., Tadmor, E.: From semidiscrete to fully discrete: stability of Runge–Kutta schemes by the energy method. SIAM Rev.
**40**(1), 40–73 (1998)MathSciNetzbMATHGoogle Scholar - 53.Majda, A., McDonough, J., Osher, S.: The Fourier method for nonsmooth initial data. Math. Comput.
**32**(144), 1041–1081 (1978)MathSciNetzbMATHGoogle Scholar - 54.Meister, A., Ortleb, S., Sonar, T.: Application of spectral filtering to discontinuous Galerkin methods on triangulations. Numer. Methods Partial Differ. Equ.
**28**(6), 1840–1868 (2012)MathSciNetzbMATHGoogle Scholar - 55.Meister, A., Ortleb, S., Sonar, T., Wirz, M.: An extended discontinuous Galerkin and spectral difference method with modal filtering. J. Appl. Math. Mech. Zeitschrift für Angewandte Mathematik und Mechanik (ZAMM)
**93**(6–7), 459–464 (2013)MathSciNetzbMATHGoogle Scholar - 56.Öffner, P., Glaubitz, J., Ranocha, H.: Stability of correction procedure via reconstruction with summation-by-parts operators for Burgers’ equation using a polynomial chaos approach (2017). ArXiv preprint arXiv:1703.03561
- 57.Öffner, P., Sonar, T., Wirz, M.: Detecting strength and location of jump discontinuities in numerical data. Appl. Math.
**4**(12), 1 (2013)Google Scholar - 58.Persson, P.O., Peraire, J.: Sub-cell shock capturing for discontinuous Galerkin methods. In: 44th AIAA Aerospace Sciences Meeting and Exhibit, p. 112 (2006)Google Scholar
- 59.Pirozzoli, S.: On the spectral properties of shock-capturing schemes. J. Comput. Phys.
**219**(2), 489–497 (2006)MathSciNetzbMATHGoogle Scholar - 60.Ranocha, H., Glaubitz, J., Öffner, P., Sonar, T.: Time discretisation and \( l\_2 \) stability of polynomial summation-by-parts schemes with Runge–Kutta methods (2016). ArXiv preprint arXiv:1609.02393
- 61.Ranocha, H., Glaubitz, J., Öffner, P., Sonar, T.: Stability of artificial dissipation and modal filtering for flux reconstruction schemes using summation-by-parts operators. Appl. Numer. Math.
**128**, 1–23 (2018). https://doi.org/10.1016/j.apnum.2018.01.019. See also arXiv:1606.00995 [math.NA] and arXiv:1606.01056 [math.NA] - 62.Routh, E.J.: On some properties of certain solutions of a differential equation of the second order. Proc. Lond. Math. Soc.
**1**(1), 245–262 (1884)MathSciNetzbMATHGoogle Scholar - 63.Sheshadri, A., Jameson, A.: Shock detection and capturing methods for high order discontinuous-Galerkin finite element methods. In: 32nd AIAA Applied Aerodynamics Conference, p. 2688 (2014)Google Scholar
- 64.Shu, C.W., Osher, S.: Efficient implementation of essentially non-oscillatory shock-capturing schemes II. J. Comput. Phys.
**83**(1), 32–78 (1989)MathSciNetzbMATHGoogle Scholar - 65.Sod, G.A.: A survey of several finite difference methods for systems of nonlinear hyperbolic conservation laws. J. Comput. Phys.
**27**(1), 1–31 (1978)MathSciNetzbMATHGoogle Scholar - 66.Tadmor, E., Tanner, J.: Adaptive mollifiers for high resolution recovery of piecewise smooth data from its spectral information. Found. Comput. Math.
**2**(2), 155–189 (2002)MathSciNetzbMATHGoogle Scholar - 67.Tanner, J.: Optimal filter and mollifier for piecewise smooth spectral data. Math. Comput.
**75**(254), 767–790 (2006)MathSciNetzbMATHGoogle Scholar - 68.Vincent, P.E., Castonguay, P., Jameson, A.: A new class of high-order energy stable flux reconstruction schemes. J. Sci. Comput.
**47**(1), 50–72 (2011)MathSciNetzbMATHGoogle Scholar - 69.VonNeumann, J., Richtmyer, R.D.: A method for the numerical calculation of hydrodynamic shocks. J. Appl. Phys.
**21**(3), 232–237 (1950)MathSciNetzbMATHGoogle Scholar - 70.Wheatley, V., Jeltsch, R., Kumar, H.: Spectral performance of RKDG methods. Math. Balk.
**25**(3), 257–276 (2011)MathSciNetzbMATHGoogle Scholar - 71.Yang, B., Gottlieb, D., Hesthaven, J.S.: Spectral simulations of electromagnetic wave scattering. J. Comput. Phys.
**134**(2), 216–230 (1997)zbMATHGoogle Scholar

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.