WENO-based first and second centered derivatives
This document derives the coefficients necessary to implement WENO-based derivatives following ideas from thefollowing papers:1. Jiang and Peng, “Weighted ENO schemes for Hamilton--Jacobit Equations”, SIAM J. Sci. Comput. 20002. Shu, “High order weighted essentially nonoscillatory schemes for convection dominated problems”, SIAM Review20093. Martin, Taylor, Wu, and Weirs, “A bandwidth-optimized WENO scheme for the effective direct numerical simula-tion of compressible turbulence”, J. Comput. Phys 2006Note that the order-of-accuracy of these schemes is optimized, not their bandwidth.
Initialization
Build a list of uniform gridpoints with spacing
x and function values
f
i
. Use that list to build the
j
th
interpolatingpolynomial for
j
1,...,
r
.
In[1]:=
StencilPoints
r_
:
Table
i
x, u
i
,
i,
r
1
,
r
1
SubstencilPoints
r_, j_
:
Take
StencilPoints
r
,
j, j
r
1
StencilPolynomial
r_, j_
:
Collect
InterpolatingPolynomial
SubstencilPoints
r, j
, x
, u
_
, Simplify
Check these functions will return the three expected interpolant values at
x/2 for the r = 3 case from Shu’s 2009SIAM Review paper equations (2.1), (2.2), and (2.3).
In[4]:=
StencilPoints
3
Table
StencilPolynomial
3, j
,
j, 3
. x
x2
Expand
MatrixForm
Out[4]=
2
x, u
2
,
x, u
1
,
0, u
0
,
x, u
1
,
2
x, u
2
Out[5]//MatrixForm=
3 u
2
8
5 u
1
4
15 u
0
8
u
1
8
3 u
0
4
3 u
1
83 u
0
8
3 u
1
4
u
2
8
Compute smoothness indicators following Shu 2009 equation (2.8). These smoothness indicators were originallyproposed in Jiang and Shu JCP 1996 and will likely not match those used for flux reconstruction from earlier papers.
In[6]:=
StencilSmoothness
r_, j_
:
Together
Expand
Sum
x
2 d
1
Integrate
D
StencilPolynomial
r, j
,
x, d
2
,
x,
x2,
x2
,
d, r
1
Check smoothness indicators against the result from Shu 2009 equation (2.9).
Leave a Comment