Chapter 5
ENO and WENO Schemes
Y.-T. Zhang* and C.-W. Shu† *University of Notre Dame, Notre Dame, IN, United States †Brown University, Providence, RI, United States
Chapter Outline 1 Introduction 104 4 Selected Topics of Recent 2 ENO and WENO Developments 113 Approximations 105 4.1 Unstructured Meshes 113 2.1 Reconstruction 105 4.2 Steady State Problems 117 2.2 ENO Approximation 107 4.3 Time Discretizations for 2.3 WENO Approximation 108 Convection–Diffusion 3 ENO and WENO Schemes for Problems 118 Hyperbolic Conservation Laws 110 4.4 Accuracy Enhancement 119 3.1 Finite Volume Schemes 110 Acknowledgements 119 3.2 Finite Difference Schemes 111 References 120 3.3 Remarks on Multidimensional Problems and Systems 112
ABSTRACT The weighted essentially nonoscillatory (WENO) schemes, based on the successful essen- tially nonoscillatory (ENO) schemes with additional advantages, are a popular class of high-order accurate numerical methods for hyperbolic partial differential equations (PDEs) and other convection-dominated problems. The main advantage of such schemes is their capability to achieve arbitrarily high-order formal accuracy in smooth regions while maintaining stable, nonoscillatory and sharp discontinuity transitions. The schemes are thus especially suitable for problems containing both strong discontinuities and com- plex smooth solution structures. In this chapter, we review the basic formulation of ENO and WENO schemes, outline the main ideas in constructing the schemes and discuss sev- eral of recent developments in using the schemes to solve hyperbolic type PDE problems. Keywords: Essentially nonoscillatory (ENO) schemes, Weighted essentially nonoscilla- tory (WENO) schemes, High-order accuracy, Hyperbolic partial differential equations, Convection-dominated problems, Finite volume schemes, Finite difference schemes AMS Classification Code: 65M99
Handbook of Numerical Analysis, Vol. 17. http://dx.doi.org/10.1016/bs.hna.2016.09.009 © 2016 Elsevier B.V. All rights reserved. 103 104 Handbook of Numerical Analysis
1 INTRODUCTION High-order accuracy numerical methods are especially efficient for solving partial differential equations (PDEs) which contain complex solution struc- tures. Here we refer to high-order accurate numerical methods by those with an order of accuracy at least three, measured by local truncation errors when the solution is smooth. High-order numerical schemes have been applied extensively in computational fluid dynamics for solving convection- dominated problems with both discontinuities/sharp gradient regions and complicated smooth structures, for example, the Rayleigh–Taylor instability simulations (Remacle et al., 2003; Shi et al., 2003; Zhang et al., 2003, 2006b), the shock vortex interactions (Grasso and Pirozzoli, 2001; Zhang et al., 2005, 2006a, 2009) and direct simulation of compressible turbulence (Taylor et al., 2007). Its resolution power over the lower-order schemes was verified in these applications. For hyperbolic PDEs or convection-dominated problems, their solutions can develop singularities such as discontinuities, sharp gradients, discontinu- ous derivatives, etc. For problems containing both singularities and comp- licated smooth solution structures, schemes with uniform high order of accuracy in smooth regions of the solution which can also resolve singulari- ties in an accurate and essentially nonoscillatory (ENO) fashion are desirable, since a straightforward high-order approximation for the nonsmooth region of a solution will generate instability called Gibbs phenomena. A popular class of such schemes is the class of weighted essentially nonoscillatory (WENO) schemes. WENO schemes are designed based on the successful ENO schemes (Harten et al., 1987; Shu and Osher, 1988, 1989) with additional advantages. The first WENO scheme was constructed by Liu, Osher and Chan in their pio- neering paper (Liu et al., 1994) for a third-order finite volume version. Jiang and Shu (1996) constructed arbitrary-order accurate finite difference WENO schemes for efficiently computing multidimensional problems, with a general framework for the design of the smoothness indicators and nonlinear weights. The fifth-order finite difference WENO scheme in Jiang and Shu (1996) has been used in most applications. The main idea of the WENO schemes is to form a weighted combination of several local reconstructions based on different stencils (usually referred to as small stencils) and use it as the final WENO reconstruction. The combi- nation coefficients (also called nonlinear weights) depend on the linear weights, often chosen to increase the order of accuracy over that on each small stencil, and on the smoothness indicators which measure the smoothness of the reconstructed function in the relevant small stencils. Hence an adaptive approximation or reconstruction procedure is actually the essential part of the WENO schemes. In this article, we review the basic formulation of ENO and WENO schemes, describe the main ideas in constructing the finite volume and finite difference ENO and WENO Schemes Chapter 5 105 versions of the schemes and emphasize several of recent developments in using the schemes to solve hyperbolic type PDE problems. The organization of this paper is as follows. ENO and WENO approximation or reconstruction proce- dure is explained in Section 2.InSection 3, we describe the finite volume and finite difference ENO/WENO schemes for solving hyperbolic conservation laws. Several recent developments are discussed in Section 4.
2 ENO AND WENO APPROXIMATIONS The essential part of the ENO and WENO schemes is an adaptive approxima- tion or reconstruction procedure. In this section, we describe the basic idea of this procedure using the third-order ENO and the fifth-order WENO approx- imations as examples.
2.1 Reconstruction We first explain the reconstruction procedure which is the building block of all ENO and WENO approximations. For simplicity of the explanation, a uniform mesh ⋯ < x0 < x1 < x2 < ⋯ is used and the mesh size Dx ¼ xi+1 xi is a 1 constant. The half-grid points x = ¼ ðx + x Þ, and the domain is parti- i +1 2 2 i i +1 … … tioned into computational cells Ii ¼ (xi 1/2, xi+1/2), i ¼ ,0,1,2, .Wewould like to emphasize that the uniform mesh assumption is not necessary for the reconstruction procedure here, although it may be needed for specific cases (for example, a uniform mesh or a smoothly varying mesh should be used in constructing a high-order conservative finite difference ENO or WENO scheme). Given the cell average values Z xi +1=2 1 ui ¼ D uðxÞdx (1) x xi 1=2 of a function u(x) over the cells Ii for all i, we would like to find an approxi- mation of u(x) at a given point, for example, at the half-grid points xi+1/2. Lagrange interpolation technique can be applied here. Define the primitive function of u(x)by Z x UðxÞ¼ uðxÞdx, (2) x 1=2 where the lower limit x 1/2 is irrelevant and can be replaced by any other half- grid point, then the point values of the primitive function U(xi+1/2) at all half- grid points can be obtained from the cell average values as the following Z xi +1=2 Xi Uðxi +1=2Þ¼ uðxÞdx ¼ Dxu l: (3) x 1=2 l¼0 106 Handbook of Numerical Analysis
Hence we can construct interpolation polynomials for U(x), and approximate u(x) by directly taking the derivative of the interpolation polynomials. Differ- ent stencils will lead to different approximations. For example, if we would like to find a polynomial p1(x) of degree at most two which reconstructs u(x) on the stencil S1 ¼ {Ii 2, Ii 1, Ii}, namely, Z xj +1=2 1 ðp1Þj ¼ D p1ðxÞdx ¼ uj, j ¼ i 2,i 1,i, (4) x xj 1=2 a polynomial P1(x) of degree at most three will be constructed which interpolates the function U(x) at the four half-grid points xj+1/2, j ¼ i 3, i 2, i 1, i and 0 let p1ðxÞ¼P1ðxÞ. The condition (4) can be easily verified for such p1(x). Hence u(xi+1/2)isapproximatedbyp1(xi+1/2). Denoting the approximation by ð1Þ ≜ ui +1=2 p1ðxi +1=2Þ,wehaveanexplicitformulaforit: 1 7 11 uð1Þ ¼ u u + u : (5) i +1=2 3 i 2 6 i 1 6 i This is a third-order accuracy approximation
ð1Þ D 3 ui +1=2 uðxi +1=2Þ¼Oð x Þ, (6) if the function u(x) is smooth in the stencil S1. Similarly, if a different stencil S2 ¼ {Ii 1, Ii, Ii+1} is chosen, we could find a different reconstruction polyno- mial p2(x) of degree at most two to satisfy ðp2Þj ¼ uj for j ¼ i 1, i, i +1. ð2Þ ≜ Then a different third-order accuracy approximation ui +1=2 p2ðxi +1=2Þ can be obtained if u(x) is smooth in the stencil S2. The formula is 1 5 1 uð2Þ ¼ u + u + u : (7) i +1=2 6 i 1 6 i 3 i +1
The third choice of a approximation stencil to include the “target” cell Ii is S3 ¼ {Ii, Ii+1, Ii+2}. The third reconstruction polynomial p3(x) of degree at most two to satisfy ðp3Þj ¼ uj for j ¼ i, i +1,i + 2 is constructed and gives ð3Þ ≜ another approximation ui +1=2 p3ðxi +1=2Þ. Again the approximation has third- order accuracy if u(x) is smooth in the stencil S3. The explicit formula of this approximation is
1 5 1 uð3Þ ¼ u + u u : (8) i +1=2 3 i 6 i +1 6 i +2
Remark 1. Another method of reconstruction is to directly find the polynomial whose averages on the stencil’s cells agree with the given values by solving the resulting linear system. This method is convenient to be applied in re- constructions on unstructured meshes. Techniques such as using a closer to orthogonal basis and least square methods were developed to improve ENO and WENO Schemes Chapter 5 107 the condition numbers of the linear system for reconstructions on high dimensional unstructured meshes. These two approaches result in the same reconstruction and hence the same error. For details, see Ciarlet and Raviart (1972), Abgrall et al. (1999), Abgrall and Sonar (1997) and Zhang and Shu (2003).
2.2 ENO Approximation For hyperbolic PDEs or convection-dominated problems, solutions often have discontinuities (or sharp gradients). For such solutions, a fixed stencil approx- imation may not be adequate near discontinuities (or sharp gradient locations). Oscillations happen when the stencils contain the discontinuities (or sharp gradients). The basic idea of ENO approximation is to adaptively avoid including the discontinuous cell (i.e., the cell on which the solution is discontinuous) in the stencil, if possible (Harten et al., 1987; Shu and Osher, 1988). For the recon- structions in Section 2.1, the ENO approximation is to choose one of the three ð1Þ ð2Þ ð3Þ approximations ui +1=2, ui +1=2 and ui +1=2 given by (5), (7)and(8), respectively, based on the three stencils S1, S2 and S3. The selection criterion is to compare the local smoothness of the reconstruction polynomials, measured by divided differences. Here we describe the procedure to construct a third-order ENO approximation. The job is to find a stencil which must include xi 1/2 and xi+1/2, such that the primitive function U(x) (hence the corresponding recon- struction polynomial) is the “smoothest” in this stencil comparing with other possible stencils. The divided differences of U(x) are used. We emphasize here that in the implementation of the procedure, the divided differences of U(x)can be expressed completely by the divided differences of the given cell averages u , without any need to reference U(x)(Harten et al., 1987; Shu and Osher, 1988, 1989). Thus in cell Ii we start with a two point stencil S2ðiÞ¼ fxi 1=2,xi +1=2g for U(x), which is equivalent to a one cell stencil S1ðiÞ¼ fIig for v . Next we have two choices to expand the stencil by adding either the left neighbour xi 3/2 or the right neighbour xi+3/2. This is decided by comparing the absolute values of two relevant divided differences U[xi 3/2, xi 1/2, xi+1/2] and U[xi 1/2, xi+1/2, xi+3/2], and a smaller one implies that the function is “smoother” in that stencil. So, if < jU½xi 3=2,xi 1=2,xi +1=2 j jU½xi 1=2,xi +1=2,xi +3=2 j, (9) the three-point stencil will be taken as S3 ðiÞ¼fxi 3=2,xi 1=2,xi +1=2g; (10) otherwise, we will take the stencil : S3 ðiÞ¼fxi 1=2,xi +1=2,xi +3=2g (11) 108 Handbook of Numerical Analysis
This procedure can be repeated to add the next grid point to the stencil, according to the smaller of the absolute values of two relevant divided differ- ences. For a third-order approximation, with one more grid point we will obtain ð1Þ ð2Þ ð3Þ the desired stencil, and one of the approximations ui +1=2, ui +1=2 or ui +1=2 will be the final ENO approximation. Of course we can continue this procedure to add more grid points to the stencil for a higher-order accuracy ENO approximation.
2.3 WENO Approximation WENO approximation is based on ENO, with additional advantages. For example, WENO approximation has higher-order accuracy than ENO approx- imation on the same stencils used in forming the reconstructions. WENO approximation results in more smooth numerical flux than ENO one when it is applied in solving a hyperbolic PDE. The basic idea of WENO approximation is the following: instead of using only one of the candidate stencils to form the reconstruction, one uses a con- vex combination of all of them. If all three stencils S1, S2 and S3 of a third- order ENO approximation are combined to form a large stencil S ¼ {Ii 2, Ii 1, Ii, Ii+1, Ii+2}, a reconstruction polynomial p(x) of degree at most four is obtained. p(x) satisfies pj ¼ uj, for j ¼ i 2, i 1, i, i +1,i + 2 and gives an approximation ui +1=2 ≜pðxi +1=2Þ. The explicit formula is 1 13 47 9 1 u = ¼ u u + u + u u : (12) i +1 2 30 i 2 60 i 1 60 i 20 i +1 20 i +2 Notice that this is a fifth-order accurate approximation if the function u(x)is smooth in the large stencil S. Further investigation on the fifth-order approxi- ð1Þ ð2Þ mation ui+1/2 in (12) and the three third-order approximations ui +1=2, ui +1=2 ð3Þ and ui +1=2, defined by (5), (7) and (8) reveals the following linear combina- tion relationship:
ð1Þ ð2Þ ð3Þ ui +1=2 ¼ g1ui +1=2 + g2ui +1=2 + g3ui +1=2, (13) where the constants g1, g2 and g3, satisfying g1 + g2 + g3 ¼ 1, are called the linear weights. In this case they take values 1 3 3 g ¼ , g ¼ , g ¼ : (14) 1 10 2 5 3 10 To deal with the situation that u(x) is not smooth, WENO approximation uses the “nonlinear weights” technique to adaptively avoid including the discontinu- ous cell in the stencil. It chooses the final approximation as a convex combina- ð1Þ ð2Þ ð3Þ tion of the three third-order approximations ui +1=2, ui +1=2 and ui +1=2: ð1Þ ð2Þ ð3Þ ui +1=2 ¼ w1ui +1=2 + w2ui +1=2 + w3ui +1=2, (15) ENO and WENO Schemes Chapter 5 109
where wj 0, and w1 + w2 + w3 ¼ 1. The nonlinear weight wj is determined by the “smoothness indicator” bj, which measures the relative smoothness of the function u(x) in the stencil Sj. A larger bj indicates that the function u(x)is less smooth in the stencil Sj. In most of the WENO papers, the smoothness indicator bj is chosen as in Jiang and Shu (1996), Z Xk = 2 xi +1 2 dl b ¼ Dx2l 1 p ðxÞ dx, (16) j dxl j l¼1 xi 1=2 where k is the polynomial degree of pj(x) (here, k ¼ 2). This is a scaled sum of the square L2 norms of all the derivatives of the relevant reconstruction poly- 2l 1 nomial pj(x) in the relevant cell Ii, with the scaling factor Dx to make the final explicit formulas for the smoothness indicators independent on the grid size Dx. In this example, the explicit formulas of the smoothness indicators are the following quadratic functions of the cell average values of u(x)in the relevant stencils:
13 1 b ¼ ðu 2u + u Þ2 + ðu 4u +3u Þ2, 1 12 i 2 i 1 i 4 i 2 i 1 i 13 1 b ¼ ðu 2u + u Þ2 + ðu u Þ2, (17) 2 12 i 1 i i +1 4 i 1 i +1 13 1 b ¼ ðu 2u + u Þ2 + ð3u 4u + u Þ2: 3 12 i i +1 i +2 4 i i +1 i +2
With these smoothness indicators, the nonlinear weights are defined as g aj j : wj ¼ , aj ¼ 2 , j ¼ 1,2,3 (18) a1 + a2 + a3 ðE + bjÞ
Here E is a small positive number used to avoid the denominator becoming zero and is typically chosen to be E ¼ 10 6 in computations. It is verified in Jiang and Shu (1996) that with such nonlinear weights, the WENO approx- imations (15) is fifth-order accurate if the function u(x) is smooth in the large stencil S.Ifu(x) is not smooth in a stencil Sj but is smooth in at least one of the other two stencils, the WENO approximations would guarantee a nonos- cillatory result since the contribution from any stencil containing the discon- tinuity of u(x) has an essentially zero weight. Remark 2. There may be situations in which all small stencils contain the discontinuity. For example, there may be a discontinuity point in the cell Ii. It turns out that this seemingly difficult case is actually not problematic in ENO or WENO approximations, because the reconstruction polynomials are all essentially monotone in Ii (Harten et al., 1986). 110 Handbook of Numerical Analysis
3 ENO AND WENO SCHEMES FOR HYPERBOLIC CONSERVATION LAWS In this section, we describe the finite volume and finite difference ENO and WENO schemes for solving hyperbolic conservation laws. First the simple one-dimensional scalar equation
ut + f ðuÞx ¼ 0 (19) is used to show the ideas of constructing the schemes.
3.1 Finite Volume Schemes In finite volume schemes, the integral form of the conservation law (19) du iðtÞ 1 + f ðui +1=2Þ f ðui 1=2Þ ¼ 0 (20) dt Dxi Z 1 is considered. Here ui ¼ D uðx,tÞdx is the spatial cell average of the solu- xi Ii tion u(x, t) in the cell Ii. For linear stability of the schemes, upwinding prop- erty (i.e. numerical schemes should propagate solution information in the same characteristic direction as that of a hyperbolic PDE) is required. We ^ + ^ replace f(ui+1/2)byf ðui +1=2,ui +1=2Þ, where f ða,bÞ is a monotone numerical flux satisfying the following conditions: (1) f^ða,bÞ is nondecreasing in its first argument and nonincreasing in its second argument; (2) f^ða,bÞ is consistent with the physical flux f(u), i.e., f^ðu,uÞ¼f ðuÞ; (3) f^ða,bÞ is Lipschitz continu- ous with respect to both arguments. Some examples of monotone fluxes include the Godunov flux min f ðuÞ if a b, f^ða,bÞ¼ a x b (21) max b x a f ðuÞ if a > b; the Engquist–Osher flux Z Z a b 0 0 f^ða,bÞ¼ maxðf ðuÞ,0Þdu + minðf ðuÞ,0Þdu + f ð0Þ; (22) 0 0 and the Lax–Friedrichs flux 1 f^ða,bÞ¼ ½ f ðaÞ + f ðbÞ aðb aÞ , (23) 2 0 where a ¼ max ujf ðuÞj is a constant and the maximum is taken over the relevant + range of u. ui +1=2 and ui +1=2 are ENO/WENO approximations based on cell average values in stencils one cell biased to the left and one cell biased to the right, respectively. For a third-order ENO or a fifth-order WENO scheme, the ENO and WENO Schemes Chapter 5 111