Вы находитесь на странице: 1из 10

Weighted essentially non-oscillatory schemes

Matthew Emmett

January 14, 2010

1 Introduction

We follow C.W. Shu in “Essentially Non-oscillatory and Weighted Essentially Non-oscillatory Schemes for
Hyperbolic Conservation Laws” (NASA/CR-97-206253, ICASE report no. 97-65).

Weighted esstentially non-oscillatory (WENO) techniques have many applications. We will focus our atten-
tion on one-dimensional hyperbolic conservation law of the form

qt + f (q) x = 0. (1.1)

Finite-volume schemes do not solve (1.1) directly. They solve its integrated version instead. Integrating
(1.1) over the interval [a, b] we obtain

d 1   
q(t) + f q(b, t) − f q(a, t) = 0
dt b−a
where Z b
1
q(t) ≡ q(ξ, t) dξ
b−a a

is the average value of q over [a, b]. This leads us to one of the central problems in implementing a numerical
scheme to solve (1.1): obtaining the values of q at the boundaries a and b based on the average q of q. This
is the reconsturction problem.

1
2 Grid

We consider a grid over the interval [a, b] with N cells. We denote the N + 1 cell boundaries by

xi−1/2 for i = 1, . . . , N + 1 (2.1)

so that
a = x1/2 < x3/2 < · · · < xN −1/2 < xN +1/2 = b. (2.2)
Subsequently, we denote the N cells by

Ci = [xi−1/2 , xi+1/2 ] for i = 1, . . . , N ; (2.3)

the N cell centres by


xi−1/2 + xi+1/2
xi = for i = 1, . . . , N ; (2.4)
2
the N cell sizes by
∆xi = xi+1/2 − xi−1/2 for i = 1, . . . , N ; (2.5)
and the maximum cell size by
∆x = max ∆xi . (2.6)
i=1,...,N

We denote the contiguous stencil around the cell Ci , containing k cells shifted to the left by r cells, by

Sir,k = Ci−r ∪ · · · ∪ Ci−r+k−1 . (2.7)

Note that Sir,k spans k cells and contains k + 1 cell boundaries.

2
3 One dimensional reconstruction for smooth functions

Given the cell averages f j of a function f where


Z xj+1/2
1
fj = f (ξ) dξ (3.1)
∆xj xj−1/2

we wish to find approximations to the function f at various points within each cell. In particular, we might
be interested in approximating the function at the left cell boundary xi−1/2 , the right cell boundary xi+1/2 ,
or at any point ξ within the cell Ci . If the approximations are computed using k cell averages, they should be
k-order accruate. The remainder of this section will be devoted to finding these approximations and showing
that they are k-order accuarate. As it turns out, we will show that there are constants cj (hereafter called
reconstruction coefficients) such that the reconstructed values are given by
k−1
X
f (ξ) ≈ cj f i−r+j .
j=0

That is, given a stencil Sir,k that spans the k cells Ci−r , . . . , Ci−r+k−1 , the reconstructed value of the original
function at some point ξ in Ci can be obtained using the cell averages f j over the cells Cj in the stencil Sir,k .
In general, the reconstruction coefficients cj depend on the reconstruction point ξ, order k, left shift r, and
cell Ci , but not on the function f .
In order to obtain the reconstruction coefficients cj and prove accuracy, we will find polynomials pri of degree
at most k − 1 such that each pri is a k-order accurate approximation to f inside Ci . That is, given the cell
averages f j , we will find polynomials pri such that

pri (x) = v(x) + O(∆xk ) for x ∈ Ci .

In order to find these polynomials, we consider the function


Z x
V (x) = f (ξ) dξ. (3.2)
a

Using the cell averages f j we can compute V at the cell boundaries xi+1/2 through
Z xi+1/2
V (xi+1/2 ) = f (ξ) dξ
a
i Z
X xj+1/2
= f (ξ) dξ
j=1 xj−1/2

i
X
= f j ∆xj . (3.3)
j=1

Focusing on a particular cell Ci and stencil Sir,k , the unique polynomial Pir of order k which interpolates V
at the k + 1 points
xi−r−1/2 , . . . , xi−r+k−1/2
is given by !
k k
X Y (x − xi−r+m−1/2 )
Pir (x) = V (xi−r+l−1/2 ) . (3.4)
(xi−r+l−1/2 − xi−r+m−1/2 )
l=0 m=0,m6=l

This is the interpolating polynomial of V in Lagrange form. It can be shown (see Appendix A) that

Pir (x) = V (x) + O(∆xk+1 ) for x ∈ Sir,k .

3
Therefore, the derivative pri of Pir satisfies

d r
pri (x) = P (x) = f (x) + O(∆xk ) for x ∈ Sir,k
dx i
and pri is of order k − 1.

Furthermore, the cell averages of pri over the cells Cj that comprise the stencil Sir,k satisfy
Z xj+1/2 Z xj+1/2
1 1
pri (ξ) dξ = P 0 (ξ) dξ
∆xj xj−1/2 ∆xj xj−1/2 i
 
1 r r
= Pi (xj+1/2 ) − Pi (xj−1/2 )
∆xj
 
1
= V (xj+1/2 ) − V (xj−1/2 )
∆xj
Z xj+1/2 Z xj−1/2 
1
= f (ξ) dξ − f (ξ) dξ
∆xj a a
Z xj+1/2 
1
= f (ξ) dξ
∆xj xj−1/2

= fj for j = i − r, . . . , i − r + k − 1.

That is, the cell averages of the approximating polynomials pri match the cell averages the original function
in each of the cells Cj which comprise the stencil Sir,k .

So far we have constructed polynomials pri that approximate the original function f on the stencils Sir,k to
k-order using only the cell averages f j for j = i − r, . . . , i − r + k − 1.

Now we consider the practical problem of finding the constants cj . Subtracting V (xi−r−1/2 ) from Pir (x) and
using
k k
X Y (x − xi−r+m−1/2 )
=1 and V (xi−r+l−1/2 ) − V (xi−r−1/2 ) ≡ 0 for l = 0
(xi−r+l−1/2 − xi−r+m−1/2 )
l=0 m=0,m6=l

we obtain
k k
!
X Y (x − xi−r+m−1/2 )
Pir (x) − V (xi−r−1/2 ) =

V (xi−r+l−1/2 ) − V (xi−r−1/2 ) .
(xi−r+l−1/2 − xi−r+m−1/2 )
l=1 m=0,m6=l

Taking the derivative of the above, we obtain


" k k
!#
d r d X  Y (x − xi−r+m−1/2 )
P (x) = V (xi−r+l−1/2 ) − V (xi−r−1/2 )
dx i dx (xi−r+l−1/2 − xi−r+m−1/2 )
l=1 m=0,m6=l

and hence
k Pk Qk !
m=0,m6=l n=0,n6=l,m (x − xi−r+n−1/2 )
X
pri (x)

= V (xi−r+l−1/2 ) − V (xi−r−1/2 ) Qk . (3.5)
l=1 m=0,m6=l (xi−r+l−1/2 − xi−r+m−1/2 )

Employing (3.3), we obtain


k l−1  Pk Qk !
n=0,n6=l,m (x − xi−r+n−1/2 )
X
m=0,m6=l
X
pri (x) = f i−r+j ∆xi−r+j Qk . (3.6)
l=1 j=0 m=0,m6=l (xi−r+l−1/2 − xi−r+m−1/2 )

4
Rearranging, we obtain
k−1 k Pk Qk
m=0,m6=l n=0,n6=l,m (x − xi−r+n−1/2 )
X X
pri (xi+1/2 ) = Qk ∆xi−r+j v i−r+j .
j=0 l=j+1 m=0,m6=l (xi−r+l−1/2 − xi−r+m−1/2 )

Therefore, the reconstruction coefficients cj used to reconstruct the function f at the point ξ are given by
k Pk Qk
m=0,m6=l n=0,n6=l,m (ξ − xi−r+n−1/2 )
X
cj = Qk ∆xi−r+j . (3.7)
l=j+1 m=0,m6=l (xi−r+l−1/2 − xi−r+m−1/2 )

Note that the the reconstruction coefficients cj depend on ξ, i, r, and k.

3.1 Further derivatives

In order to approximate the first derivative of the original function f we consider the first derivative of pri (x).
We obtain
" k Pk Qk !#
d r d X  m=0,m6=l n=0,n6=l,m (x − xi−r+n−1/2 )
p (x) = V (xi−r+l−1/2 ) − V (xi−r−1/2 ) Qk
dx i dx m=0,m6=l (xi−r+l−1/2 − xi−r+m−1/2 )
l=1
k Pk
k P Q !
m=0,m6=l n=0,n6=l,m p=0,p6=l,m,n (x − xi−r+p−1/2 )
X 
= V (xi−r+l−1/2 ) − V (xi−r−1/2 ) Qk .
l=1 m=0,m6=l (xi−r+l−1/2 − xi−r+m−1/2 )

Employing (3.3), we obtain


k l−1  Pk Pk Q !
p=0,p6=l,m,n (x − xi−r+p−1/2 )
X
d r X m=0,m6=l n=0,n6=l,m
pi (x) = v i−r+j ∆xi−r+j Qk .
dx j=0 m=0,m6=l (xi−r+l−1/2 − xi−r+m−1/2 )
l=1

Rearranging, we obtain
k−1 k Pk Pk Q
d r m=0,m6=l n=0,n6=l,m p=0,p6=l,m,n (x − xi−r+p−1/2 )
X X
p (x) = ∆xi−r+j v i−r+j .
dx i
Qk
j=0 l=j+1 m=0,m6=l (xi−r+l−1/2 − xi−r+m−1/2 )

Therefore, the reconstruction coefficients for the first derivative are


k Pk Pk Q
m=0,m6=l n=0,n6=l,m p=0,p6=l,m,n (ξ − xi−r+p−1/2 )
X
cj = Qk ∆xi−r+j
l=j+1 m=0,m6=l (xi−r+l−1/2 − xi−r+m−1/2 )

3.2 Summary

In summary, given a stencil Sir,k and the cell averages f j of a function f , we can reconstruct f at any point
ξ in the cell Ci according to
k−1
X
f (ξ) ≈ cj f i−r+j (3.8)
j=0

where Pk Qk
k
m=0,m6=l n=0,n6=l,m (ξ − xi−r+n−1/2 )
X
cj = Qk ∆xi−r+j . (3.9)
l=j+1 m=0,m6=l (xi−r+l−1/2 − xi−r+m−1/2 )

5
Furthermore, the approximation is accurate to order k so that
k−1
X
cj f i−r+j = f (ξ) + O(∆xk )
j=0

where
∆x = max ∆xj .
j=i−r,...,i−r+k−1

The permissable values of left shift parameter r in (3.8) are −1, . . . , k − 1 so that the results of Appendix A
hold.

6
4 One dimensional reconstruction for piece-wise smooth functions

The solutions of hyperbolic conservation laws may contain discontinuities, and therefore we are interested in
reconstructing piecewise smooth functions. A piecewise smooth function f is smooth except at finitely many
isolated points. At these points, f and its derivatives (at least up to the order of the scheme) are assumed
to have finite left and right limits.

For such piecewise smooth functions, the order of accuracy herein referred to is formal. That is, it is defined
as the accuracy determined by the local error in the smooth regions of the function.

The basic idea of WENO is to use a convex combination of several stencils to form the reconstruction of f ,
and, if a stencil contains a discontinuity, its weight should be close to zero. In smooth regions, using several
stencils will also serve to increase the order of accuracy.

Consider the k stencils


Sir,k for r = 0, . . . , k − 1
that can be used to reconstruct the value of f at some point ξ in the cell Ci . These stencils span 2k − 1
cells. We denote the k different reconstructions by
k−1
X
f (ξ) ≈ f r = crj v̄i−r+j for r = 0, . . . , k − 1 (4.1)
j=0

where we have added the superscript r to the function f and the reconstruction coefficients cj to make their
dependance on the left shift r explicit.

A WENO reconstruction takes a convex combination of all f r defined in (4.1) as a new approximation
according to
k−1
X
f (ξ) ≈ ωir f r (4.2)
r=0

where we require
k−1
X
ωir ≥0 and ωir = 1. (4.3)
r=0

In smooth regions where all k stencils that can be used to reconstruct f (ξ) in (4.1) do not contain disconti-
nuities, we could reconstruct f (ξ) to order 2k − 1 using the stencil Sik−1,2k−1 to obtain
2k−2
X
f (ξ) = c∗j f¯i−(k−1)+j (4.4)
j=0

where we have added the superscript ∗ to the reconstruction coefficients cj to highlight that they are optimal
(ie, higher order). Combining (4.1), (4.2), and (4.4), we obtain
2k−2 k−1 k−1
!
X X X
c∗ f¯i−(k−1)+j =
j ωr cr f¯i−r+l .
i l (4.5)
j=0 r=0 l=0

Rearranging, we obtain
 
2k−2 2k−2 min(k−1,j)
k−(j+1)+l k−(j+1)+l  ¯
X X X
c∗j f¯i−(k−1)+j =  ωi cl fi−(k−1)+j .
j=0 j=0 l=max(0,j−k+1)

7
Therefore, we have 2k − 1 equations
min(k−1,j)
k−(j+1)+l k−(j+1)+l
X
ωi cl = c∗j for j = 0, . . . , 2k − 2 (4.6)
l=max(0,j−k+1)

at each i (and ξ) for the weights ωir . For unstructured grids the systems (4.6) are over-determined, and
therefore we must use some kind of optimisation algorithm in order to find the weights ωir . For structured
grids the systems (4.6) are no longer over-determined, and the weights ωir can be found explicity (and are
independent of i).

The weights ωir defined by (4.5) and determined by (4.6) are called optimal weights since they can be used
to reconstruct a function to order 2k − 1 in regions where the function is smooth. We will henceforth denote
the optimal weights by $ir .

We now consider the practical problem of choosing the weights ωir . If we choose the weights ωir sufficiently
close to the optimal weights $ir in regions where the function is smooth, then we can achieve 2k − 1 order
accuracy. In order to determine how close to the optimal weights $ir the weights ωir must be choosen we
consider the reconstruction
k−1
X k−1
X k−1
X
ωir f r = $ir f r + ωir − $ir f r .

f (ξ) ≈ (4.7)
r=0 r=0 r=0

If we choose
ωir = $ir + O(∆xk−1 ) (4.8)
2k−1
then each term in the last summation of (4.8) becomes O(∆x ) and therefore 2k − 1 order accuracy is
preserved by the reconstruction.

If we define
αir
ωir = (4.9)
αi0 + · · · + αik−1
where
$ir
αir = for r = 0, . . . , k − 1; (4.10)
( + σir )p
and  is a positive real number used to avoid dividing by zero (usually  = 10−6 ), p is some power (usually
2), and σir is a measure of the smoothness of the function v in the stencil Sir,k ; with the smoothnesses σir
chosen appropriately, then (4.8) is satisfied.

Typically, the smoothness measurement presented by Jiang and Shu is used. They define the smoothness
according to
k−1
X Z xj+1/2  l 2
d r
σir = (∆xj )2l−1 p (x) dx (4.11)
xj−1/2 dxl i
l=1

which is the sum of the L2 norms of the derivatives of the approximating polynomial.

8
4.1 One-sided (up/down wind) reconstructions

In some situations we may need to impose that some cells be excluded from the reconstruction process. For
example, at the front of a dam-break flow with a positive front velocity there is a wet-dry interface and the
dry cells to the right of the front should be avoided.

A left-biased WENO reconstruction is one in which the weights

ωir = 0 for r<s

where s > 0 is some parameter that controls how many cells are excluded from the reconstruction (4.2).
Intuitively, s is also the number of cells to exlude from the right.

A right-biased WENO reconstruction is one in which the weights

ωir = 0 for r > k − |s| − 1

where s < 0 is some parameter that controls how many cells are excluded from the reconstruction (4.2).
Intuitively, |s| is also the number of cell to exclude from the left.

That is, if s > 0 the WENO reconstruction will be left-biased and reconstructions with r < s will be ignored;
if s < 0 the WENO reconstruction will be right-biased and reconstructions with r > k − |s| − 1 will be
ignored. Once again, we need to determine optimal weights for both left- and right-biased reconstructions.

For left-biased reconstructions (s > 0), we reconstruct f (ξ) to order 2k − s − 1 using the stencil Sik−1, 2k−s−1
to obtain the optimal reconstruction coefficients c∗j (similar to (4.4)). Therefore, similar to (4.6), we have
2k − s − 1 equations
min(k−1,j)
k−(j+1)+l k−(j+1)+l
X
ωi cl = c∗j for j = 0, . . . , 2k − s − 2. (4.12)
l=max(0,j−k+s+1)

For right-biased reconstructions (s < 0), we reconstruct f (ξ) to order 2k − |s| − 1 using the stencil
k−|s|−1, 2k−|s|−1
Si to obtain the optimal reconstruction coefficients c∗j (similar to (4.4)). Therefore, simi-
lar to (4.6), we have 2k − |s| − 1 equations
min(k−1,j)
k−(j+1)+l k+s−(j+1)+l
X
ωi cl = c∗j for j = 0, . . . , 2k − |s| − 2. (4.13)
l=max(0,j−k+|s|+1)

9
A Error of Lagrange interpolating polynomials

Let f (x) ∈ C n ([a, b]), and p(x) be the interpolating polynomial of degree n − 1 such that

p(xi ) = f (xi ) for i = 1, . . . , n (A.1)

where
a = x1 < x2 < · · · < xn−1 < xn = b. (A.2)
Then
p(x) = f (x) + O(∆xn ) for x ∈ [a, b] (A.3)
where
∆x = max xi − xi−1 . (A.4)
i=2,...,n

Proof. Let x ∈ [a, b]. If x = xi for some i = 1, . . . , n then f (x) − p(x) = 0 since p(x) is the interpolating
polynomial. Otherwise, let
f (x) − p(x)
Φ(x) = Qn (A.5)
i=1 (x − xi )
and
n
Y
g(x, ξ) = f (ξ) − p(ξ) − Φ(x) (ξ − xi ). (A.6)
i=1

Then g(x, ξ) is n times differentiable with respect to ξ, g(x, xi ) = 0 for i = 1, . . . , n, and g(x, x) = 0.
Applying Rolle’s theorem successively across all interpolation points xi and x we obtain

∂n


g(x, ξ) ∗ =0
(A.7)
∂ξ n ξ=ξ

for some ξ ∗ ∈ (a, b). Futhermore


∂n
g(x, ξ) = f n (ξ) − n! Φ(x) (A.8)
∂ξ n
so that, combininig (A.7) and (A.8), we obtain

f n (ξ ∗ )
Φ(x) = (A.9)
n!
and therefore
n
f n (ξ ∗ ) Y
f (x) − p(x) = (x − xi ). (A.10)
n! i=1
Finally, we conclude that
p(x) = f (x) + O(∆xn ). (A.11)
That is, if p(x) interpolates f (x) at n points, then it is accurate to O(∆xn ) where ∆x is the maximum space
between the interpolating points.

10

Вам также может понравиться