109Center for Turbulence ResearchAnnual Research Briefs 2014Taming nonlinear instability for discontinuousGalerkin scheme with artificial viscosityBy Y. LvANDM. Ihme1. Motivation and objectivesOver recent years, the advantages of discontinuous Galerkin (DG) scheme has beendemonstrated in applications to smooth problems. For conservation laws, the interactionamong different physical invariants can lead to discontinuous solutions. In those cases,strong numerical oscillations are triggered in the numerical solution through the DGdiscretization. To address the issue that arises due to nonlinearities of the problem, certainstabilization mechanisms must be imposed. Popular examples include limiting techniquesand artificial viscosity (AV). Over the past few years, several limiters have been proposed,for example, Cockburn & Shu (1998), Qiu & Shu (2005), and Krivodonova (2007). Themain idea of suppressing oscillation is to modify the local solution by considering theinformation about solutions in neighboring cells. The main shortcomings of limiting are(i) poor adaptability to elements with complex shapes; (ii) accuracy reduction in regionsof smooth solutions; and (iii) lack of support to the order higher than DGP2 (quadraticpolynomial representation).Realization of these shortcomings has made the design artificial viscosity method forDG a central focus of recent research activities. Hartmann (2006) used an AV formulabased on a scaled residual for steady-state problems. Persson & Peraire (2006) proposeda non-smoothness sensor for estimating artificial viscosity. The sensor uses information ofhigher-order moments and results in a viscosity quantity scaled with h/p, where h is theelement size and p is the order of the polynomial. The success of this formulation has beendemonstrated in implicit RANS simulations by Nguyen et al. (2007). Because of numericalissues associated with piecewise constant artificial viscosity, Barter & Darmofal (2010)suggested imposing viscosity continuity across adjacent elements using a PDE-basedapproach. Another modification was recently proposed by Casoni et al. (2013). In contrastto the h/p-scaling, they used an artificial viscosity that scales with hp , and demonstratedimproved performance on coarse grids up to DGP11 in a 1D setting. As artificial viscositymethods have become more popular, other interesting formulations have also appearedin the literatures. For example, Yu & Yan (2013) implemented a viscosity formulationfor DG scheme, which originated from the finite-difference community (Kawai & Lele2008). With this formulation, fine scales in Rayleigh-Taylor instability were successfullycaptured with orders up to DGP3. Zingan et al. (2013) implemented the entropy-viscosityformulation for DG scheme, which was initially proposed by Guermond & Pasquetti(2008) for finite volume methods. This idea leads to the estimation of artificial viscositybased on the local residual of the entropy equation of the nonlinear conservation system.In the present study, we propose a new AV-approach for the DG scheme, specificallytailored for explicit time stepping. Technically this scheme consists of the following steps:(i) re-examine the AV formulation of Persson & Peraire (2006); (ii) identify and amendthe shortcomings of this method by conducting stability analysis and developing a newdetector; and (iii) demonstrate the performance through numerical tests.

110Lv & Ihme2. Methodology2.1. Governing equationsWe consider the solution of the conservation equations in the most general form t U · F 0 ,(2.1)which might contain discontinuities in the solution. To stabilize the solution procedure,we introduce a linear Laplacian regularization on the right side, t U · F · (bµe U ) ,(2.2)in which µbe quantifies the amount of artificial viscosity that is added locally for suppressing nonlinear instabilities.2.2. Discretization and AV formulationThe DG discretization follows the standard conventions and readers are referred to ourprevious work (Lv & Ihme 2013a,b, 2014) for more details. In a DG cell Ωe , the solutionis approximated asU eh (t, x) NpXe e (t)φe (x) ,Ull(2.3)l 1where Np is the number of bases. In the present study, an orthogonal basis is used, Np (p 1)(p 2)/2, where p is the order of the polynomial representation. In the followingderivation, we assume that the basis indices are ordered with increasing polynomial order.A Rusanov flux (Rusanov 1961) is used as a Riemann solver, and the BR2 scheme (Bassi& Repay 2000) is used for discretization of the diffusion operator.Here we briefly summarize the AV formulation of Persson & Peraire (2006). Thisformulation is based on a non-smoothness indicator and a mapping function to evaluatethe element-wise viscosity. The non-smoothness indicator is defined as follows: beb e, Ue UU eh Uhhhe,(2.4)Se ee(U h , U h )eb e represents the truncated solution up to order p 1, and is written asin which Uhb e (x, t) UhNp (p 1)Xe e (t)φe (x) .Ull(2.5)l 1After evaluating Se , the following mapping is applied to determine the amount of artificialviscosity required for the target element, if Se S0 κ 0, π(Se S0 )µ0µbe 1 sin, if S0 κ Se S0 κ(2.6)22κ µ ,if S S κ,0e0where several parameters have been introduced. These parameters can be estimated usingthe arguments S0 log(1/p4 ), µ0 h/p, and κ is an empirical parameter that is sufficiently large. This AV formula was originally proposed for an implicit simulation. Basedon numerical tests, we found that the original version of this formula has shortcomingsfor application to explicit time integration. More specifically, there are two problems that

Taming nonlinear instability for DG with AV111need to be addressed: (1) difficulty in determining µ0 . Although a scaling argument isgiven, a rigorous guideline to determining µ0 is required. Otherwise, either the discontinuity will be excessively smeared out, or not enough diffusion will be added to suppressthe oscillations. In addition, the large value of µ0 can lead to substantial numerical stiffness of the discretized system. If µ0 is naively set to h/p, for most cases, the time-stepsize has to be significantly reduced to guarantee stability. For implicit aerodynamic computations, µ0 can be fine-tuned around steady-state solutions to produce optimal shockprofiles. But for unsteady simulations, having a solid approach for evaluating µ0 andusing it during the entire simulation is desirable. A guideline for determining µ0 willbe proposed based on the eigenmode argument and stability analysis; (2) difficulty indetermining κ. In Eq. (2.6), the role of κ is to control the selectivity; in other words, κdetermines candidate elements to which artificial dissipation should be added. However,it is difficult to apply because there is no physical interpretation associated with κ. If κis too small, the artificial diffusion tends to be added on smooth solutions. To overcomethis drawback, a novel algorithm is required to account for the selectivity of trouble cellsand κ is fixed to 10S0 .2.3. Improvement 1: the AV magnitude for explicit time steppingIn order to facilitate explicit time stepping, we require that the amount of artificial viscosity is not so large that it significantly influences the time-step size that should bedetermined by convection. The rationale for this argument is that the nature of the hyperbolic equation determines the problem to be dominated by convective modes. Theartificial viscosity is purposely added to suppress the nonlinear interaction between different modes (or nonlinear instability). Otherwise, both the accuracy and consistencyare questionable. Based on this argument, we are able to find µ0 in Eq. (2.6) from thefollowing analysis.We characterize the convection mode in the discretized system using the smallesteigenvalue along the real axis, R(λadv )min ( 0). The addition of AV transforms theeigenvalue structure and leads to the change of R(λadv )min to R(λadv AV )min , whichcan be approximated asR(λadv AV )min R(λadv )min R(λAV )min βR(λadv )min ,(2.7)in which β is the key parameter determining both the amount of AV and the time-stepsize of the explicit DG-scheme. Based on the above argument, a suitable choice for β is1 β 2. If β 2, the diffusion exceeds convection and locally dominates the flowfield. Therefore, the range of the parameter, β, that is introduced here is significantlyconstrained. From numerical experiments, we found a rather robust selection of β, whichis β 1.15 for linear cases and β 1.5 for nonlinear cases. In order to utilize this scalingargument for finding µ0 , we conducted a stability analysis in which AV is added locallyinto one element on a 1D domain. Based on this analysis, the following estimations canbe obtained:a(2.8)R(λadv )min C1 (p) ,hµ0R(λAV )min C2 (p) 2 ,(2.9)hin which a denotes the maximum characteristic speed over the computational domain;and h is the element size; the constants C1 and C2 are both functions of p and can bedetermined numerically, as shown in Figure 1 and in Table 1. Combining these relations

112Lv & Ihme620000 1000 2x 10ℜ ( λ a d v) m i n100ℑ(λ)500 50ℜ ( λ A V ) mi n150 2000 3000 Slope C1 100 4000 Slope C 42 6DGP0DGP1DGP2DGP3DGP4 8 150 200 600 400 2000200 5000050ℜ(λ)100150 1001/h(a) Reformed eigen-structureby AV121/h2adv(b) Scaling of R(λ)min4x 10AV(c) Scaling of R(λ)minFigure 1. Eigen-structure reformation by AV and the scaling of R(λadv )min and R(λAV )minwith respect to element size h ((a) pure advection advection with AV .020.574.0173.0362.3Table 1. Constants derived from the stability analysis for different orders of polynomial bases.with Eq. (2.7) yields the following expression,µ0 (β 1)C1 (p)ah .C2 (p)(2.10)a/h can be expressed as time step under the well-known RKDG CFL constraint (Cockburn & Shu 2001),a t1 ,(2.11)hβ(2p 1)where β is added to account for the eigenvalue amplification by AV. With this, we canrelate µ0 to the time-step size,µ0 β 1 C1 (p) h2.β(2p 1) C2 (p) t(2.12)Since t O(h) for the convection-dominated problem, the scaling of µ0 , µ0 O(h) isconsistent with that proposed by Persson and Peraire. However, the advantage of this newformulation is that a rigorous expression is given for different orders of bases, instead ofa simple scaling argument. Moreover, this new formulation balances the AV performance(see Section 3 for details) and time-stepping efficiency for explicit DG schemes.2.4. Improvement 2: trouble-cell selectivityInstead of using κ for trouble-cell selectivity, we propose the following detection procedure, which is based on monitoring the entropy variation in each DG-cell. The idea isillustrated in Figure 2. Let us suppose we are able to record the maximum and minimum

Taming nonlinear instability for DG with AV113ssmaxsminUe(t tn)Ue(t tn 1)Figure 2. (Color online) Illustration of an entropy-based instability detector.entropy of the solution U eh in a DG cell at t tn . After one time step, the entropy profileof this cell will vary. If we find that the entropy overshot and undershot in the interiorpart of the cell, it is likely that the cell is troubled by nonlinear instability. Now theissue is how to implement this physical observation in DG-cells. To numerically searchthe entropy minimum and maximum in Ωe can be very costly and might fail. Therefore,we have to implement this idea in a discrete setting as an approximation to its continuous counterpart. For this, we first define the set of quadrature points that are used toevaluate the integral in the governing equation to be D. D includes quadrature pointson Ωe Ω e , in which superscript ‘ ’ denotes the exterior. Let us define another set ofquadrature point Dchk , which only includes the quadrature points on the interior part ofΩe , Ωe \ Ω e . The detecting procedure is given as follows:First, estimate the minimum and maximum of a set of entropy values that are evaluatedon D at t tn usingh,p 1h max s(U (x)) C4 sref,x Dp 1smin semin min s(U (x)) C3 srefx Dsmax semax(2.13)(2.14)in which sref accounts for the normalization, and C3 and C4 are constant parameters (setto 0.1).Second, after the time advances from tn to tn 1 , check the entropy values for the setof points in Dchk and determine if Ωe is a troubled cell using the metric:if x Dchk , s(U (x)) smax s(U (x)) smin , then Ωe is a troubled cell. (2.15)In the case where Ωe is a trouble cell, µ0 will be evaluated thought the approach presentedin Section 2.3 and µbe will be determined though Eq. (2.6), and added to the discretization.Finally, repeat the first step for the present time level tn 1 .3. Numerical testsFor the following tests, the standard Runge-Kutta time-stepping scheme is used.

114Lv & Ihme3.1. Burgers’ equationFor the first case, we consider the nonlinear scalar equation, also known as Burgers’equation, with F U 2 /2. The initial condition is given asU (x, 0) 1 sin(2πx) ,(3.1)on a one-dimensional periodical domain x [0.0, 1.0). The experiment stops at t 1.0when the discontinuity is located at the center of the domain. Solution snapshots aregiven in Figure 3, confirming the effectiveness of the trouble-cell sensor. It can be seenthat the detected trouble cells alway follow the discontinuity, so that shock-capturingerrors can be localized. The simulation result without AV is also given in Figure 3(d)for comparison. It can been seen that big oscillations are triggered in the vicinity ofthe discontinuity, which directly leads to the blow-up right after t 0.3. Results fromrefinement are shown in Figure 4. It can be seen that the resolution of the discontinuityis improved with p- or h-refinements.3.2. Euler equationIn this section, we test our AV formulation by considering that Euler equations,U (ρ, ρu, ρE)T ,(3.2)F (ρu, ρu u Ip, u(ρE p))T ,(3.3)in which ρ, u, p and E refer to density, velocity, pressure, and total energy. The closurefor this conservation law is the ideal gas assumption: ρ u 2,(3.4)p (γ 1) ρE 2and γ, the ratio of heat capacities, is set to Sod shock tubeThe initial conditions are defined as((1.0, 0.0, 1.0)TT(ρ, u, p) (0.125, 0.0, 0.1)Tfor x 0.5 ,for x 0.5 ,(3.5)on a 1D domain x [0.0, 1.0]. The convergence study is conducted on this problem,and the simulation runs until t 0.25. The performance of the detector is assessed inFigure 5. As we can see, the detector precisely flagged the trouble cells in the vicinityof the shock, with which the shock-capturing error can be highly localized, as shown inFigure 5(d). For the local error assessment, the exact solution is obtained with an exactrefinement and the error is evaluated point-wise in L1 -norm. A refinement study is alsoconducted and the results are summarized in Figure 6. The observation is similar to thatof the above test case.3.2.2. Double Mach reflectionThis test case studies a moving shock that reflects at a wall. The setting is consistentwith that described by Woodward & Colella (1984). We consider a two-dimensionaldomain x(1) x(2) [0.0, 4.0] [0.0, 1.0]. A Mach 10 shock is initially aligned with a60o angle with respect to the horizontal axis. The pre- and post-shock states take the

Taming nonlinear instability for DG with AV2.522.510.5110.50trouble cell marker11.5U1.50 0.5000. 0.51000.20.4x0.60.81x(a) t 0.3(b) t 0.62.522.52110.501.5U1.5trouble cell marker22110.5trouble cell markerU22trouble cell marker2U1150 0.5000. 0.5000.20.4x0.60.81x(c) t 0.9(d) t 0.3 without AVFigure 3. Numerical test on the trouble cell sensing for Burger’s equation (DGP4 with 120elements).following formsU pre (1.4, 0.0, 0.0, 2.5)T ,(3.6)TU post (8.0, 57.16, 33.0 , 563.50) ,and the initial condition can be prescribed as(U pre x(1) U (x, 0) U post x(1) 1616 (2)x 3(2)x 3,.(3.7)(3.8)In order to enforce the shock-wall interaction, the left boundary and the [0.0, 1/6)part of the bottom boundary are prescribed by a supersonic inflow with the state given

116Lv & 530 elementsU10.450.50.450.55x0.60.550.510.6120 3DGP4U0.50.40.660 6xU0.50.4p-refinementDGP41.530 elems60 elems120 elemsUh-refinement1.50.50.495 0.5 0.50510.50.40.450.50.550.6xFigure 4. Numerical test for h- and p- refinements for Burgers’ U post , while the region [1/6, 4.0] of the bottom boundary is prescribed using slipwall conditions. The right boundary is prescribed by a supersonic outflow, where theNeumann condition can be safely used. Furthermore, the top boundary is a free boundaryimposed analytically to describe the moving discontinuity as a function of time. At the(1) . The simulation stops at ttop boundary, the jump is a function of time xs 16 1 20t3 2.5. The refinement studies are summarized in Figure 7. The important feature of theflow field is the formulation of a wall jet along the slip line, which is very sensitive to thenumerical dissipation. With h-refinement, we can clearly observe finer vortex structuresinduced by the Kelvin-Helmholtz instability. In the results generated by DGP4, a fastergrowth of the wall jet is observed compared to the results for DGP2, by which the jetfront merges earlier with part of the Mach stem. This feature was not captured by mostof the previous case studies on such a coarse mesh.3.2.3. Forward facing stepThis test case studies a Mach 3 flow passing through a wind tunnel, [0, 3] [0, 1]. Astep of 0.2 unit is located at 0.6 units away from the left boundary. The left boundaryis a supersonic inflow with the conditions (ρ, u(1) , u(2) p)T (1.4, 3.0, 0.0, 1.0)T ,and the right boundary is specified by the Neumann conditions. The top and bottomboundaries are prescribed by slip walls. At the beginning, the computational domainis initialized uniformly with the inflow condition, which can be expressed in terms ofsolution variables:U (x, 0) (1.4, 4.2, 0.0, 8.8)T .(3.9)The flow evolves until t 4.0. The numerical study for this case with high-order polynomial bases is still quite rare. In order to demonstrate the potential of our method, we

Taming nonlinear instability for DG with AV1.221.220.610.40.20.8U0.80.610.4trouble cell marker1trouble cell ) density profile t 0.05(b) density profile t 0.151.22U0.80.610.4trouble cell marker10.20000. density profile t 0.25(d) Local error of density in space-timeFigure 5. Numerical test on the sensor performance and the error locality for the 1D shocktube case (DGP4, 120 elements).conducted the test with DGP2 (third-order) and DGP4 (fifth-order). Mesh refinementis also considered and two Cartesian meshes with h 0.02 and h 0.01 are used forthis test. The simulation results are illustrated in Figure 8. We can clearly see the improvement by p- or h- refinement in terms of the sharpness of the wave fronts and theresolution of the top slip line from which Kelvin-Helmholtz instability is triggered. Onthe fine mesh, the simulation results with different bases become very close to each other.However, if we focus on the vortex structures that are resolved at the slip line, DGP4gives finer structures than DGP2 due to the reduced numerical dissipation.3.2.4. Kelvin-Helmholtz instabilityThe above two classic test cases are both shock-dominated flows, and it has beenshown that under certain conditions hydrodynamic instabilities can be triggered. In thiscase, we would like to isolate the instability and assess the capability of high-order

118Lv & 0.960.430 elems60 elems120 elems00.940. 1ρ0.10.92ρ0.60.6120 0.60.430 6. Numerical test on the refinement consistency for the 1D shock tube case.DG schemes in resolving small scales. Hence, a classic two-dimensional simulation ofthe Kelven-Helmholtz instability is considered. The computational domain is a periodicsquare, [ 0.5, 0.5]2 . The initial condition is specified as( T(1.0, 0.5 0.01 sin(2πx), 0.01 sin(2πx), 2.5)Tfor x 0.25 ,(1)(2)ρ, u , u , p T(2.0, 0.5 0.01 sin(2πx), 0.01 sin(2πx), 2.5)for x 0.25 ,(3.10)in which a single moded sin-wave is superimposed on the shear flow as a small initialperturbation. The test is conducted with the polynomial bases of different orders but thesame degree of freedom for fair comparison. For DGP1, DGP2, DGP3, and DGP4, theelement sizes are h 1/300, 1/200, 1/150, and 1/120, respectively. The CFL numbersare set according to Eq. (2.11), and the resultant time-step sizes are almost the same fordifferent cases. The simulation runs to t 5. Due to singularities and nonlinearities ofEuler equations, there are no exact solutions for this case. Therefore, the benefits of usinghigh-order bases continue to be in resolving smaller scale vortices and in preserving thesharp density interface, which is illustrated in Figure 9(a) and (b). The reduced numericaldissipation of the high-order scheme is also more capable of retaining the small initialperturbation and hence earlier growth of the kinetic energy. This numerical characteristicsis shown in Figure 9(c).4. Conclusion and outlookIn the present study, we extended the AV formulation by Persson & Peraire (2006)and propose a new AV formulation for DG, suitable specifically from explicit time integration. The proposed AV formulation is built on stability analysis for determining

Taming nonlinear instability for DG with AV119(a) DGP2, h 0.02(b) DGP2, h 0.01(c) DGP4, h 0.02(d) DGP4, h 0.01Figure 7. Simulation results of the double-Mach-reflection case with different polynomialorders and mesh sizes.the viscosity magnitude and the development of a detecting procedure for identifyingtrouble cells. The performance of this AV formulation was examined in the context ofshock-dominated flows and was shown to be capable of supporting the order up to DGP4(the highest we considered in this study). Artificial viscosity is activated only in the vicin-

120Lv & Ihme(a) DGP2, h 0.02(b) DGP2, h 0.01(c) DGP4, h 0.02(d) DGP4, h 0.01Figure 8. Simulation results of the forward-facing-step case with different polynomial ordersand mesh sizes.

Taming nonlinear instability for DG with AV121 1ki net i c ener g y a l o ng y10 210 310DGP1DGP2DGP3DGP4 410 51000. DGP1 solution at t 5(b) DGP3 solution at t 5(c) Early growth of kineticenergy as a function of timeFigure 9. Simulation results of Kelvin-Helmholtz instability.ity of discontinuities, which helps maximize the scheme’s resolution for smooth solutionswhile localizing the shock-capturing errors.In a future study, we will use this AV formulation for compressible turbulence simulations and extend DG’s capability towards more complex flow physics.AcknowledgmentsFinancial support through the NSF CAREER program with award No. CBET-0844587is gratefully acknowledged. Helpful discussions with Dr. Yee Chee See on stability analysisare greatly appreciated.REFERENCESBarter, G. & Darmofal, D. 2010 Shock capturing with PDE-based artificial viscosityfor DGFEM: Part i. formulation. J. Comp. Phys. 229, 1810–1827.Bassi, F. & Repay, S. 2000 GMRES discontinuous Galerkin solution of the compressibleNavier-Stokes equations. In: Discontinuous Galerkin Methods: Theory, Computationand Applications, (ed. B. Cockburn & C. W. Shu), pp. 197–208. Springer.Casoni, E., Peraire, J. & Huerta, A. 2013 One-dimensional shock-capturing forhigh-order discontinuous Galerkin methods. Int. J. Numer. Meth. Fluids 71, 737–755.Cockburn, B. & Shu, C. W. 1998 The Runge-Kutta discontinuous Galerkin methodfor conservation laws V: multidimensional systems. J. Comp. Phys. 141, 199–224.Cockburn, B. & Shu, C.-W. 2001 Runge-Kutta discontinuous Galerkin methods forconvection-dominated problems. J. Sci. Comput. 16 (3), 173–261.Guermond, J.-L. & Pasquetti, R. 2008 Entropy-based nonlinear viscosity for Fourierapproximations of conservation laws. C. R. Acad. Sci. Paris, Ser. I 346, 801–806.Hartmann, R. 2006 Adaptive discontinuous Galerkin methods with shock-capturing forthe compressible Navier-Stokes equations. Int. J. Numer. Meth. Fluids 51, 1131–1156.Kawai, S. & Lele, S. 2008 Localized artificial diffusivity scheme for discontinuity capturing on curvilinear meshes. J. Comp. Phys. 227, 9498–9526.Krivodonova, L. 2007 Limiters for high-order discontinuous Galerkin methods. J.Comp. Phys. 226, 879–896.

122Lv & IhmeLv, Y. & Ihme, M. 2013a Development of discontinuous Galerkin method for detonationand supersonic combustion. In 51st AIAA Aerospace Sciences Meeting including theNew Horizons Forum and Aerospace Exposition.Lv, Y. & Ihme, M. 2013b Discontinuous Galerkin method for compressible viscousreacting flow. In 21st AIAA Computational Fluid Dynamics Conference.Lv, Y. & Ihme, M. 2014 Discontinuous Galerkin method for multicomponent chemicallyreacting flows and combustion. J. Comp. Phys. 270, 105–137.Nguyen, N., Persson, P.-O. & Peraire, J. 2007 RANS solutions using high orderdiscontinuous Galerkin methods. AIAA 2007-914.Persson, P.-O. & Peraire, J. 2006 Sub-cell shock capturing for discontinuousGalerkin methods. AIAA 2006-112.Qiu, J. & Shu, C.-W. 2005 Hermite WENO schemes and their application as limitersfor Runge-Kutta discontinuous Galerkin method II: two dimensional case. Comput.Fluids 34, 642–663.Rusanov, V. 1961 Calculation of intersection of non-steady shock waves with obstacles.J. Comput. Math. Phys. USSR 1, 267279.Woodward, P. & Colella, P. 1984 The numerical simulation of two-dimensionalfluid flow with strong shocks. J. Comp. Phys. 54, 115–173.Yu, J. & Yan, C. 2013 An artificial diffusivity discontinuous Galerkin scheme for discontinuous flows. Comput. & Fluids 75, 56–71.Zingan, V., Guermond, J.-L., Morel, J. & Popov, B. 2013 Implementation of theentropy viscosity method with the discontinuous Galerkin method. Comput. MethodAppl. M. 253, 479–490.

a non-smoothness sensor for estimating arti cial viscosity. The sensor uses information of higher-order moments and results in a viscosity quantity scaled with h p, where his the element size and pis the order of the polynomial. The success of this formulation has been demonstrated in implicit RANS simulations by Nguyen et al. (2007).