You are on page 1of 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
q
t
+

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
dt
q(t) +
1
b −a

f

q(b, t)

−f

q(a, t)

= 0
where
q(t) ≡
1
b −a

b
a
q(ξ, t) dξ
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
x
i−1/2
for i = 1, . . . , N + 1 (2.1)
so that
a = x
1/2
< x
3/2
< · · · < x
N−1/2
< x
N+1/2
= b. (2.2)
Subsequently, we denote the N cells by
C
i
= [x
i−1/2
, x
i+1/2
] for i = 1, . . . , N; (2.3)
the N cell centres by
x
i
=
x
i−1/2
+ x
i+1/2
2
for i = 1, . . . , N; (2.4)
the N cell sizes by
∆x
i
= x
i+1/2
−x
i−1/2
for i = 1, . . . , N; (2.5)
and the maximum cell size by
∆x = max
i=1,...,N
∆x
i
. (2.6)
We denote the contiguous stencil around the cell C
i
, containing k cells shifted to the left by r cells, by
S
r,k
i
= C
i−r
∪ · · · ∪ C
i−r+k−1
. (2.7)
Note that S
r,k
i
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
f
j
=
1
∆x
j

x
j+1/2
x
j−1/2
f(ξ) dξ (3.1)
we wish to ﬁnd 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 x
i−1/2
, the right cell boundary x
i+1/2
,
or at any point ξ within the cell C
i
. If the approximations are computed using k cell averages, they should be
k-order accruate. The remainder of this section will be devoted to ﬁnding these approximations and showing
that they are k-order accuarate. As it turns out, we will show that there are constants c
j
(hereafter called
reconstruction coeﬃcients) such that the reconstructed values are given by
f(ξ) ≈
k−1
¸
j=0
c
j
f
i−r+j
.
That is, given a stencil S
r,k
i
that spans the k cells C
i−r
, . . . , C
i−r+k−1
, the reconstructed value of the original
function at some point ξ in C
i
can be obtained using the cell averages f
j
over the cells C
j
in the stencil S
r,k
i
.
In general, the reconstruction coeﬃcients c
j
depend on the reconstruction point ξ, order k, left shift r, and
cell C
i
, but not on the function f.
In order to obtain the reconstruction coeﬃcients c
j
and prove accuracy, we will ﬁnd polynomials p
r
i
of degree
at most k − 1 such that each p
r
i
is a k-order accurate approximation to f inside C
i
. That is, given the cell
averages f
j
, we will ﬁnd polynomials p
r
i
such that
p
r
i
(x) = v(x) + O(∆x
k
) for x ∈ C
i
.
In order to ﬁnd these polynomials, we consider the function
V (x) =

x
a
f(ξ) dξ. (3.2)
Using the cell averages f
j
we can compute V at the cell boundaries x
i+1/2
through
V (x
i+1/2
) =

x
i+1/2
a
f(ξ) dξ
=
i
¸
j=1

x
j+1/2
x
j−1/2
f(ξ) dξ
=
i
¸
j=1
f
j
∆x
j
. (3.3)
Focusing on a particular cell C
i
and stencil S
r,k
i
, the unique polynomial P
r
i
of order k which interpolates V
at the k + 1 points
x
i−r−1/2
, . . . , x
i−r+k−1/2
is given by
P
r
i
(x) =
k
¸
l=0

V (x
i−r+l−1/2
)
k
¸
m=0,m=l
(x −x
i−r+m−1/2
)
(x
i−r+l−1/2
−x
i−r+m−1/2
)

. (3.4)
This is the interpolating polynomial of V in Lagrange form. It can be shown (see Appendix A) that
P
r
i
(x) = V (x) + O(∆x
k+1
) for x ∈ S
r,k
i
.
3
Therefore, the derivative p
r
i
of P
r
i
satisﬁes
p
r
i
(x) =
d
dx
P
r
i
(x) = f(x) + O(∆x
k
) for x ∈ S
r,k
i
and p
r
i
is of order k −1.
Furthermore, the cell averages of p
r
i
over the cells C
j
that comprise the stencil S
r,k
i
satisfy
1
∆x
j

x
j+1/2
x
j−1/2
p
r
i
(ξ) dξ =
1
∆x
j

x
j+1/2
x
j−1/2
P

i
(ξ) dξ
=
1
∆x
j

P
r
i
(x
j+1/2
) −P
r
i
(x
j−1/2
)

=
1
∆x
j

V (x
j+1/2
) −V (x
j−1/2
)

=
1
∆x
j

x
j+1/2
a
f(ξ) dξ −

x
j−1/2
a
f(ξ) dξ

=
1
∆x
j

x
j+1/2
x
j−1/2
f(ξ) dξ

= f
j
for j = i −r, . . . , i −r + k −1.
That is, the cell averages of the approximating polynomials p
r
i
match the cell averages the original function
in each of the cells C
j
which comprise the stencil S
r,k
i
.
So far we have constructed polynomials p
r
i
that approximate the original function f on the stencils S
r,k
i
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 ﬁnding the constants c
j
. Subtracting V (x
i−r−1/2
) from P
r
i
(x) and
using
k
¸
l=0
k
¸
m=0,m=l
(x −x
i−r+m−1/2
)
(x
i−r+l−1/2
−x
i−r+m−1/2
)
= 1 and V (x
i−r+l−1/2
) −V (x
i−r−1/2
) ≡ 0 for l = 0
we obtain
P
r
i
(x) −V (x
i−r−1/2
) =
k
¸
l=1

V (x
i−r+l−1/2
) −V (x
i−r−1/2
)

k
¸
m=0,m=l
(x −x
i−r+m−1/2
)
(x
i−r+l−1/2
−x
i−r+m−1/2
)

.
Taking the derivative of the above, we obtain
d
dx
P
r
i
(x) =
d
dx
¸
k
¸
l=1

V (x
i−r+l−1/2
) −V (x
i−r−1/2
)

k
¸
m=0,m=l
(x −x
i−r+m−1/2
)
(x
i−r+l−1/2
−x
i−r+m−1/2
)
¸
and hence
p
r
i
(x) =
k
¸
l=1

V (x
i−r+l−1/2
) −V (x
i−r−1/2
)

¸
k
m=0,m=l
¸
k
n=0,n=l,m
(x −x
i−r+n−1/2
)
¸
k
m=0,m=l
(x
i−r+l−1/2
−x
i−r+m−1/2
)

. (3.5)
Employing (3.3), we obtain
p
r
i
(x) =
k
¸
l=1

l−1
¸
j=0
f
i−r+j
∆x
i−r+j

¸
k
m=0,m=l
¸
k
n=0,n=l,m
(x −x
i−r+n−1/2
)
¸
k
m=0,m=l
(x
i−r+l−1/2
−x
i−r+m−1/2
)

. (3.6)
4
Rearranging, we obtain
p
r
i
(x
i+1/2
) =
k−1
¸
j=0
k
¸
l=j+1
¸
k
m=0,m=l
¸
k
n=0,n=l,m
(x −x
i−r+n−1/2
)
¸
k
m=0,m=l
(x
i−r+l−1/2
−x
i−r+m−1/2
)
∆x
i−r+j
v
i−r+j
.
Therefore, the reconstruction coeﬃcients c
j
used to reconstruct the function f at the point ξ are given by
c
j
=
k
¸
l=j+1
¸
k
m=0,m=l
¸
k
n=0,n=l,m
(ξ −x
i−r+n−1/2
)
¸
k
m=0,m=l
(x
i−r+l−1/2
−x
i−r+m−1/2
)
∆x
i−r+j
. (3.7)
Note that the the reconstruction coeﬃcients c
j
depend on ξ, i, r, and k.
3.1 Further derivatives
In order to approximate the ﬁrst derivative of the original function f we consider the ﬁrst derivative of p
r
i
(x).
We obtain
d
dx
p
r
i
(x) =
d
dx
¸
k
¸
l=1

V (x
i−r+l−1/2
) −V (x
i−r−1/2
)

¸
k
m=0,m=l
¸
k
n=0,n=l,m
(x −x
i−r+n−1/2
)
¸
k
m=0,m=l
(x
i−r+l−1/2
−x
i−r+m−1/2
)
¸
=
k
¸
l=1

V (x
i−r+l−1/2
) −V (x
i−r−1/2
)

¸
k
m=0,m=l
¸
k
n=0,n=l,m
¸
p=0,p=l,m,n
(x −x
i−r+p−1/2
)
¸
k
m=0,m=l
(x
i−r+l−1/2
−x
i−r+m−1/2
)

.
Employing (3.3), we obtain
d
dx
p
r
i
(x) =
k
¸
l=1

l−1
¸
j=0
v
i−r+j
∆x
i−r+j

¸
k
m=0,m=l
¸
k
n=0,n=l,m
¸
p=0,p=l,m,n
(x −x
i−r+p−1/2
)
¸
k
m=0,m=l
(x
i−r+l−1/2
−x
i−r+m−1/2
)

.
Rearranging, we obtain
d
dx
p
r
i
(x) =
k−1
¸
j=0
k
¸
l=j+1
¸
k
m=0,m=l
¸
k
n=0,n=l,m
¸
p=0,p=l,m,n
(x −x
i−r+p−1/2
)
¸
k
m=0,m=l
(x
i−r+l−1/2
−x
i−r+m−1/2
)
∆x
i−r+j
v
i−r+j
.
Therefore, the reconstruction coeﬃcients for the ﬁrst derivative are
c
j
=
k
¸
l=j+1
¸
k
m=0,m=l
¸
k
n=0,n=l,m
¸
p=0,p=l,m,n
(ξ −x
i−r+p−1/2
)
¸
k
m=0,m=l
(x
i−r+l−1/2
−x
i−r+m−1/2
)
∆x
i−r+j
3.2 Summary
In summary, given a stencil S
r,k
i
and the cell averages f
j
of a function f, we can reconstruct f at any point
ξ in the cell C
i
according to
f(ξ) ≈
k−1
¸
j=0
c
j
f
i−r+j
(3.8)
where
c
j
=
k
¸
l=j+1
¸
k
m=0,m=l
¸
k
n=0,n=l,m
(ξ −x
i−r+n−1/2
)
¸
k
m=0,m=l
(x
i−r+l−1/2
−x
i−r+m−1/2
)
∆x
i−r+j
. (3.9)
5
Furthermore, the approximation is accurate to order k so that
k−1
¸
j=0
c
j
f
i−r+j
= f(ξ) + O(∆x
k
)
where
∆x = max
j=i−r,...,i−r+k−1
∆x
j
.
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 ﬁnitely many
isolated points. At these points, f and its derivatives (at least up to the order of the scheme) are assumed
to have ﬁnite left and right limits.
For such piecewise smooth functions, the order of accuracy herein referred to is formal. That is, it is deﬁned
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
S
r,k
i
for r = 0, . . . , k −1
that can be used to reconstruct the value of f at some point ξ in the cell C
i
. These stencils span 2k − 1
cells. We denote the k diﬀerent reconstructions by
f(ξ) ≈ f
r
=
k−1
¸
j=0
c
r
j
¯ v
i−r+j
for r = 0, . . . , k −1 (4.1)
where we have added the superscript r to the function f and the reconstruction coeﬃcients c
j
to make their
dependance on the left shift r explicit.
A WENO reconstruction takes a convex combination of all f
r
deﬁned in (4.1) as a new approximation
according to
f(ξ) ≈
k−1
¸
r=0
ω
r
i
f
r
(4.2)
where we require
ω
r
i
≥ 0 and
k−1
¸
r=0
ω
r
i
= 1. (4.3)
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 S
k−1,2k−1
i
to obtain
f(ξ) =
2k−2
¸
j=0
c

j
¯
f
i−(k−1)+j
(4.4)
where we have added the superscript ∗ to the reconstruction coeﬃcients c
j
to highlight that they are optimal
(ie, higher order). Combining (4.1), (4.2), and (4.4), we obtain
2k−2
¸
j=0
c

j
¯
f
i−(k−1)+j
=
k−1
¸
r=0
ω
r
i

k−1
¸
l=0
c
r
l
¯
f
i−r+l

. (4.5)
Rearranging, we obtain
2k−2
¸
j=0
c

j
¯
f
i−(k−1)+j
=
2k−2
¸
j=0

¸
min(k−1,j)
¸
l=max(0,j−k+1)
ω
k−(j+1)+l
i
c
k−(j+1)+l
l
¸
¯
f
i−(k−1)+j
.
7
Therefore, we have 2k −1 equations
min(k−1,j)
¸
l=max(0,j−k+1)
ω
k−(j+1)+l
i
c
k−(j+1)+l
l
= c

j
for j = 0, . . . , 2k −2 (4.6)
at each i (and ξ) for the weights ω
r
i
. For unstructured grids the systems (4.6) are over-determined, and
therefore we must use some kind of optimisation algorithm in order to ﬁnd the weights ω
r
i
. For structured
grids the systems (4.6) are no longer over-determined, and the weights ω
r
i
can be found explicity (and are
independent of i).
The weights ω
r
i
deﬁned 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
r
i
.
We now consider the practical problem of choosing the weights ω
r
i
. If we choose the weights ω
r
i
suﬃciently
close to the optimal weights
r
i
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
r
i
the weights ω
r
i
must be choosen we
consider the reconstruction
f(ξ) ≈
k−1
¸
r=0
ω
r
i
f
r
=
k−1
¸
r=0

r
i
f
r
+
k−1
¸
r=0

ω
r
i

r
i

f
r
. (4.7)
If we choose
ω
r
i
=
r
i
+ O(∆x
k−1
) (4.8)
then each term in the last summation of (4.8) becomes O(∆x
2k−1
) and therefore 2k − 1 order accuracy is
preserved by the reconstruction.
If we deﬁne
ω
r
i
=
α
r
i
α
0
i
+· · · + α
k−1
i
(4.9)
where
α
r
i
=

r
i
( + σ
r
i
)
p
for r = 0, . . . , k −1; (4.10)
and is a positive real number used to avoid dividing by zero (usually = 10
−6
), p is some power (usually
2), and σ
r
i
is a measure of the smoothness of the function v in the stencil S
r,k
i
; with the smoothnesses σ
r
i
chosen appropriately, then (4.8) is satisﬁed.
Typically, the smoothness measurement presented by Jiang and Shu is used. They deﬁne the smoothness
according to
σ
r
i
=
k−1
¸
l=1

x
j+1/2
x
j−1/2
(∆x
j
)
2l−1

d
l
dx
l
p
r
i
(x)

2
dx (4.11)
which is the sum of the L
2
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 ﬂow 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
ω
r
i
= 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
ω
r
i
= 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 S
k−1, 2k−s−1
i
to obtain the optimal reconstruction coeﬃcients c

j
(similar to (4.4)). Therefore, similar to (4.6), we have
2k −s −1 equations
min(k−1,j)
¸
l=max(0,j−k+s+1)
ω
k−(j+1)+l
i
c
k−(j+1)+l
l
= c

j
for j = 0, . . . , 2k −s −2. (4.12)
For right-biased reconstructions (s < 0), we reconstruct f(ξ) to order 2k − |s| − 1 using the stencil
S
k−|s|−1, 2k−|s|−1
i
to obtain the optimal reconstruction coeﬃcients c

j
(similar to (4.4)). Therefore, simi-
lar to (4.6), we have 2k −|s| −1 equations
min(k−1,j)
¸
l=max(0,j−k+|s|+1)
ω
k−(j+1)+l
i
c
k+s−(j+1)+l
l
= c

j
for j = 0, . . . , 2k −|s| −2. (4.13)
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(x
i
) = f(x
i
) for i = 1, . . . , n (A.1)
where
a = x
1
< x
2
< · · · < x
n−1
< x
n
= b. (A.2)
Then
p(x) = f(x) + O(∆x
n
) for x ∈ [a, b] (A.3)
where
∆x = max
i=2,...,n
x
i
−x
i−1
. (A.4)
Proof. Let x ∈ [a, b]. If x = x
i
for some i = 1, . . . , n then f(x) − p(x) = 0 since p(x) is the interpolating
polynomial. Otherwise, let
Φ(x) =
f(x) −p(x)
¸
n
i=1
(x −x
i
)
(A.5)
and
g(x, ξ) = f(ξ) −p(ξ) −Φ(x)
n
¸
i=1
(ξ −x
i
). (A.6)
Then g(x, ξ) is n times diﬀerentiable with respect to ξ, g(x, x
i
) = 0 for i = 1, . . . , n, and g(x, x) = 0.
Applying Rolle’s theorem successively across all interpolation points x
i
and x we obtain

n
∂ξ
n
g(x, ξ)

ξ=ξ

= 0 (A.7)
for some ξ

∈ (a, b). Futhermore

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

)
n!
(A.9)
and therefore
f(x) −p(x) =
f
n

)
n!
n
¸
i=1
(x −x
i
). (A.10)
Finally, we conclude that
p(x) = f(x) + O(∆x
n
). (A.11)
That is, if p(x) interpolates f(x) at n points, then it is accurate to O(∆x
n
) where ∆x is the maximum space
between the interpolating points.
10

. . . N . (2. we denote the N cells by Ci = [xi−1/2 . (2... i = 1. .2 Grid We consider a grid over the interval [a.2) for i = 1.4) (2. (2. .6) We denote the contiguous stencil around the cell Ci . . . xi+1/2 ] the N cell centres by xi = the N cell sizes by ∆xi = xi+1/2 − xi−1/2 and the maximum cell size by ∆x = max ∆xi . .. N . . r. . b] with N cells.N for i = 1. N + 1 (2.7) 2 . Subsequently.k Note that Si spans k cells and contains k + 1 cell boundaries. .k Si = Ci−r ∪ · · · ∪ Ci−r+k−1 .3) xi−1/2 + xi+1/2 2 for for i = 1. .. . . containing k cells shifted to the left by r cells.5) (2. . by r. N . We denote the N + 1 cell boundaries by xi−1/2 so that a = x1/2 < x3/2 < · · · < xN −1/2 < xN +1/2 = b.1) (2. i=1. .

. the reconstructed value of the original r. given a stencil Si that spans the k cells Ci−r .k That is.1) we wish to ﬁnd approximations to the function f at various points within each cell. In order to obtain the reconstruction coeﬃcients cj and prove accuracy. . As it turns out. given the cell i averages f j .k function at some point ξ in Ci can be obtained using the cell averages f j over the cells Cj in the stencil Si . (xi−r+l−1/2 − xi−r+m−1/2 ) (3.2) Using the cell averages f j we can compute V at the cell boundaries xi+1/2 through xi+1/2 V (xi+1/2 ) = a i f (ξ) dξ xj+1/2 = j=1 i xj−1/2 f (ξ) dξ = j=1 f j ∆xj . The remainder of this section will be devoted to ﬁnding these approximations and showing that they are k-order accuarate. they should be k-order accruate. Ci−r+k−1 . . we will show that there are constants cj (hereafter called reconstruction coeﬃcients) such that the reconstructed values are given by k−1 f (ξ) ≈ j=0 cj f i−r+j . In general. .m=l (x − xi−r+m−1/2 ) . (3. xi−r+k−1/2 is given by k k Pir (x) = l=0 V (xi−r+l−1/2 ) m=0. we will ﬁnd polynomials pr of degree i at most k − 1 such that each pr is a k-order accurate approximation to f inside Ci . r. (3. . but not on the function f . It can be shown (see Appendix A) that Pir (x) = V (x) + O(∆xk+1 ) 3 for r.4) This is the interpolating polynomial of V in Lagrange form. we might be interested in approximating the function at the left cell boundary xi−1/2 . . we consider the function x for x ∈ Ci . In particular. . we will ﬁnd polynomials pr such that i pr (x) = v(x) + O(∆xk ) i In order to ﬁnd these polynomials. left shift r. order k.3) r. the unique polynomial Pir of order k which interpolates V at the k + 1 points xi−r−1/2 . . V (x) = a f (ξ) dξ. and cell Ci .k Focusing on a particular cell Ci and stencil Si . .k x ∈ Si . That is. the right cell boundary xi+1/2 . or at any point ξ within the cell Ci . If the approximations are computed using k cell averages. the reconstruction coeﬃcients cj depend on the reconstruction point ξ.3 One dimensional reconstruction for smooth functions Given the cell averages f j of a function f where fj = 1 ∆xj xj+1/2 f (ξ) dξ xj−1/2 (3.

m=l n=0. . we obtain d r d P (x) = dx i dx and hence k k k V (xi−r+l−1/2 ) − V (xi−r−1/2 ) l=1 m=0. .m=l (xi−r+l−1/2 − xi−r+m−1/2 ) . . we obtain k l−1 pr (x) i = l=1 j=0 f i−r+j ∆xi−r+j k k m=0.3). . = fj That is.5) Employing (3. the cell averages of pr over the cells Cj that comprise the stencil Si satisfy i d r P (x) = f (x) + O(∆xk ) dx i for r.m=l (xi−r+l−1/2 − xi−r+m−1/2 ) . (xi−r+l−1/2 − xi−r+m−1/2 ) Taking the derivative of the above.m=l n=0.n=l.m=l (x − xi−r+m−1/2 ) .k x ∈ Si 1 ∆xj xj+1/2 xj−1/2 pr (ξ) dξ = i = 1 ∆xj xj+1/2 Pi (ξ) dξ xj−1/2 1 Pir (xj+1/2 ) − Pir (xj−1/2 ) ∆xj 1 = V (xj+1/2 ) − V (xj−1/2 ) ∆xj xj+1/2 xj−1/2 1 f (ξ) dξ − f (ξ) dξ = ∆xj a a xj+1/2 1 = f (ξ) dξ ∆xj xj−1/2 for j = i − r. i r. the cell averages of the approximating polynomials pr match the cell averages the original function i r.m=l (x − xi−r+m−1/2 ) =1 (xi−r+l−1/2 − xi−r+m−1/2 ) and V (xi−r+l−1/2 ) − V (xi−r−1/2 ) ≡ 0 for l = 0 we obtain k k Pir (x) − V (xi−r−1/2 ) = l=1 V (xi−r+l−1/2 ) − V (xi−r−1/2 ) m=0.m=l (x − xi−r+m−1/2 ) (xi−r+l−1/2 − xi−r+m−1/2 ) pr (x) = i l=1 V (xi−r+l−1/2 ) − V (xi−r−1/2 ) k k m=0. .n=l. the derivative pr of Pir satisﬁes i pr (x) = i and pr is of order k − 1.6) 4 .Therefore. Subtracting V (xi−r−1/2 ) from Pir (x) and using k k l=0 m=0.m (x − xi−r+n−1/2 ) k m=0.m (x − xi−r+n−1/2 ) k m=0.k So far we have constructed polynomials pr that approximate the original function f on the stencils Si to i k-order using only the cell averages f j for j = i − r. i − r + k − 1. r.k in each of the cells Cj which comprise the stencil Si . Now we consider the practical problem of ﬁnding the constants cj . . . (3. i − r + k − 1. (3.k Furthermore. .

p=l.m=l n=0.m=l (xi−r+l−1/2 − xi−r+m−1/2 ) ∆xi−r+j v i−r+j .7) Note that the the reconstruction coeﬃcients cj depend on ξ.n=l.m=l n=0. Therefore. given a stencil Si and the cell averages f j of a function f . we obtain k−1 k pr (xi+1/2 ) i = j=0 l=j+1 k k m=0.m p=0.m=l (xi−r+l−1/2 − xi−r+m−1/2 ) .m=l (xi−r+l−1/2 − xi−r+m−1/2 ) ∆xi−r+j v i−r+j .m=l n=0. we obtain d r p (x) = dx i k l−1 v i−r+j ∆xi−r+j l=1 j=0 k k m=0.8) where k cj = l=j+1 k k m=0. (3.m=l (xi−r+l−1/2 − xi−r+m−1/2 ) ∆xi−r+j .p=l.p=l. Rearranging.m=l (xi−r+l−1/2 − xi−r+m−1/2 ) ∆xi−r+j 3.m=l n=0.n (x − xi−r+p−1/2 ) k m=0.2 Summary r.m=l n=0.n=l.Rearranging.m. the reconstruction coeﬃcients cj used to reconstruct the function f at the point ξ are given by k cj = l=j+1 k k m=0. i.n=l.m=l n=0.m p=0.9) 5 .m=l n=0.m (x − xi−r+n−1/2 ) k m=0.n=l. and k.1 Further derivatives In order to approximate the ﬁrst derivative of the original function f we consider the ﬁrst derivative of pr (x). i We obtain d r d pi (x) = dx dx k k V (xi−r+l−1/2 ) − V (xi−r−1/2 ) l=1 = l=1 V (xi−r+l−1/2 ) − V (xi−r−1/2 ) k k m=0. j=0 l=j+1 Therefore.m p=0.m.n=l.m (x − xi−r+n−1/2 ) k m=0.n (x − xi−r+p−1/2 ) k m=0. (3. 3.n (ξ − xi−r+p−1/2 ) k m=0.m (ξ − xi−r+n−1/2 ) k m=0. we obtain d r p (x) = dx i k−1 k k k m=0.n=l.m. Employing (3.m=l (xi−r+l−1/2 − xi−r+m−1/2 ) ∆xi−r+j . r.k In summary.m=l n=0.p=l.m=l (xi−r+l−1/2 − xi−r+m−1/2 ) k k m=0.n=l.m (ξ − xi−r+n−1/2 ) k m=0.n (x − xi−r+p−1/2 ) k m=0.m. we can reconstruct f at any point ξ in the cell Ci according to k−1 f (ξ) ≈ j=0 cj f i−r+j (3.3). the reconstruction coeﬃcients for the ﬁrst derivative are k cj = l=j+1 k k m=0.m p=0.m=l (xi−r+l−1/2 − xi−r+m−1/2 ) .n=l.

8) are −1. The permissable values of left shift parameter r in (3.i−r+k−1 max ∆xj .Furthermore. 6 . the approximation is accurate to order k so that k−1 cj f i−r+j = f (ξ) + O(∆xk ) j=0 where ∆x = j=i−r.. . ... . .. k − 1 so that the results of Appendix A hold.

.4) where we have added the superscript ∗ to the reconstruction coeﬃcients cj to highlight that they are optimal (ie.2) where we require k−1 r ωi ≥0 and r=0 r ωi = 1. A WENO reconstruction takes a convex combination of all f r deﬁned in (4.4). . we could reconstruct f (ξ) to order 2k − 1 using the stencil Si to obtain 2k−2 f (ξ) = j=0 ¯ c∗ fi−(k−1)+j j (4. A piecewise smooth function f is smooth except at ﬁnitely many isolated points. . These stencils span 2k − 1 cells.k Si for r = 0.j)  ωi k−(j+1)+l k−(j+1)+l  ¯ cl fi−(k−1)+j .1) do not contain discontik−1. . ¯ c∗ fi−(k−1)+j = j j=0 j=0 l=max(0. Consider the k stencils r. (4. (4.3) In smooth regions where all k stencils that can be used to reconstruct f (ξ) in (4. the order of accuracy herein referred to is formal. The basic idea of WENO is to use a convex combination of several stencils to form the reconstruction of f .2). higher order). In smooth regions. k − 1 (4. For such piecewise smooth functions.2k−1 nuities. . we obtain 2k−2 2k−2   min(k−1. At these points. and (4. and therefore we are interested in reconstructing piecewise smooth functions. its weight should be close to zero. if a stencil contains a discontinuity. and. . f and its derivatives (at least up to the order of the scheme) are assumed to have ﬁnite left and right limits. we obtain 2k−2 k−1 k−1 r ωi r=0 l=0 ¯ c∗ fi−(k−1)+j = j j=0 ¯ cr fi−r+l l .j−k+1) 7 .1) where we have added the superscript r to the function f and the reconstruction coeﬃcients cj to make their dependance on the left shift r explicit. We denote the k diﬀerent reconstructions by k−1 f (ξ) ≈ f r = j=0 cr vi−r+j j¯ for r = 0. k − 1 that can be used to reconstruct the value of f at some point ξ in the cell Ci . . That is.1).1) as a new approximation according to k−1 f (ξ) ≈ r=0 r ωi f r (4. it is deﬁned as the accuracy determined by the local error in the smooth regions of the function. using several stencils will also serve to increase the order of accuracy. Combining (4.5) Rearranging. (4. .4 One dimensional reconstruction for piece-wise smooth functions The solutions of hyperbolic conservation laws may contain discontinuities.

Typically. the smoothness measurement presented by Jiang and Shu is used.6) are over-determined. 2k − 2 (4.7) r ωi = r i + O(∆xk−1 ) 2k−1 (4. r The weights ωi deﬁned 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. (4. p is some power (usually r. 8 . .8) ) and therefore 2k − 1 order accuracy is then each term in the last summation of (4.11) σi = (∆xj )2l−1 dxl xj−1/2 l=1 which is the sum of the L2 norms of the derivatives of the approximating polynomial.k r r 2). For structured r grids the systems (4.j) ωi l=max(0. and r therefore we must use some kind of optimisation algorithm in order to ﬁnd the weights ωi . we have 2k − 1 equations min(k−1. (4. They deﬁne the smoothness according to 2 k−1 xj+1/2 dl r r pi (x) dx (4. . then we can achieve 2k − 1 order r r accuracy. If we deﬁne r ωi = r αi k−1 0 αi + · · · + αi (4. then (4. .j−k+1) k−(j+1)+l k−(j+1)+l cl = c∗ j for j = 0. If we choose the weights ωi suﬃciently r close to the optimal weights i in regions where the function is smooth. .5) and determined by (4. .6) r at each i (and ξ) for the weights ωi . We will henceforth denote r the optimal weights by i . r r We now consider the practical problem of choosing the weights ωi . . .Therefore. k − 1. For unstructured grids the systems (4.8) is satisﬁed. and σi is a measure of the smoothness of the function v in the stencil Si . with the smoothnesses σi chosen appropriately.8) becomes O(∆x preserved by the reconstruction.10) and is a positive real number used to avoid dividing by zero (usually = 10−6 ). and the weights ωi can be found explicity (and are independent of i).6) are no longer over-determined.9) where r αi = r i r ( + σi )p for r = 0. . In order to determine how close to the optimal weights i the weights ωi must be choosen we consider the reconstruction k−1 k−1 r ωi f r = r=0 r=0 r r if k−1 f (ξ) ≈ If we choose + r=0 r ωi − r i f r.

and right-biased reconstructions. Intuitively. 2k − s − 2. if s > 0 the WENO reconstruction will be left-biased and reconstructions with r < s will be ignored. .j) ωi l=max(0. we need to determine optimal weights for both left. we have 2k − s − 1 equations min(k−1. . |s| is also the number of cell to exclude from the left. . (4. . . A left-biased WENO reconstruction is one in which the weights r ωi = 0 for r<s where s > 0 is some parameter that controls how many cells are excluded from the reconstruction (4. similar to (4. 2k−s−1 For left-biased reconstructions (s > 0). .6). if s < 0 the WENO reconstruction will be right-biased and reconstructions with r > k − |s| − 1 will be ignored. s is also the number of cells to exlude from the right. 2k − |s| − 2. (4. That is.j) ωi l=max(0. Intuitively. Therefore. at the front of a dam-break ﬂow with a positive front velocity there is a wet-dry interface and the dry cells to the right of the front should be avoided. Therefore. .12) For right-biased reconstructions (s < 0). A right-biased WENO reconstruction is one in which the weights r ωi = 0 for r > k − |s| − 1 where s < 0 is some parameter that controls how many cells are excluded from the reconstruction (4. . we have 2k − |s| − 1 equations min(k−1.j−k+|s|+1) k−(j+1)+l k+s−(j+1)+l cl = c∗ j for j = 0. k−1.6).4. simij lar to (4.4)). Once again.2).j−k+s+1) k−(j+1)+l k−(j+1)+l cl = c∗ j for j = 0.2).1 One-sided (up/down wind) reconstructions In some situations we may need to impose that some cells be excluded from the reconstruction process. we reconstruct f (ξ) to order 2k − s − 1 using the stencil Si ∗ to obtain the optimal reconstruction coeﬃcients cj (similar to (4.4)). For example.13) 9 . 2k−|s|−1 Si to obtain the optimal reconstruction coeﬃcients c∗ (similar to (4. we reconstruct f (ξ) to order 2k − |s| − 1 using the stencil k−|s|−1.

b).9) f n (ξ ∗ ) (x − xi ). n. xi ) = 0 for i = 1. .7) and (A.. Applying Rolle’s theorem successively across all interpolation points xi and x we obtain ∂n g(x. ξ) ∂ξ n for some ξ ∗ ∈ (a. .11) That is. Then p(x) = f (x) + O(∆xn ) where ∆x = max xi − xi−1 . Let x ∈ [a. .10) Finally. then it is accurate to O(∆xn ) where ∆x is the maximum space between the interpolating points. we obtain Φ(x) = and therefore f n (ξ ∗ ) n! n =0 ξ=ξ ∗ (A. we conclude that (A. . Futhermore ∂n g(x. (A. i=2. b]).8).5) i=1 (x − xi ) and g(x.6) Then g(x.. and g(x. . . let f (x) − p(x) Φ(x) = n (A.. b]. combininig (A.8) (A. ξ) is n times diﬀerentiable with respect to ξ. g(x. if p(x) interpolates f (x) at n points.n for i = 1.A Error of Lagrange interpolating polynomials Let f (x) ∈ C n ([a.1) (A.4) for x ∈ [a. and p(x) be the interpolating polynomial of degree n − 1 such that p(xi ) = f (xi ) where a = x1 < x2 < · · · < xn−1 < xn = b. Otherwise. i=1 (A.7) (A. x) = 0. . If x = xi for some i = 1.3) (A. . . n then f (x) − p(x) = 0 since p(x) is the interpolating polynomial. . ξ) = f (ξ) − p(ξ) − Φ(x) n (ξ − xi ). f (x) − p(x) = n! i=1 p(x) = f (x) + O(∆xn ). 10 . ξ) = f n (ξ) − n! Φ(x) ∂ξ n so that. b] Proof.2) (A. . n (A. ..