10
WENO-based first and second centered derivatives This document derives the coefficients necessary to implement WENO-based derivatives following ideas from the following papers: 1. Jiang and Peng, “Weighted ENO schemes for Hamilton--Jacobit Equations” , SIAM J. Sci. Comput. 2000 2. Shu, “High order weighted essentially nonoscillatory schemes for convection dominated problems” , SIAM Review 2009 3. Martin, Taylor, Wu, and Weirs, “A bandwidth-optimized WENO scheme for the effective direct numerical simula- tion of compressible turbulence” , J. Comput. Phys 2006 Note that the order-of-accuracy of these schemes is optimized, not their bandwidth. Initialization Build a list of uniform gridpoints with spacing Dx and function values f i . Use that list to build the j th interpolating polynomial for j ˛ 81, ..., r<. In[1]:= StencilPoints@r_D := Table@8i Dx, u i <, 8i, - Hr - 1L, Hr - 1L<D SubstencilPoints@r_, j_D := Take@StencilPoints@rD, 8j, j + r - 1<D StencilPolynomial@r_, j_D := CollectAInterpolatingPolynomial@SubstencilPoints@r, jD,xD,u _ , SimplifyE Check these functions will return the three expected interpolant values at Dx/2 for the r = 3 case from Shu’ s 2009 SIAM Review paper equations (2.1), (2.2), and (2.3). In[4]:= StencilPoints@3D Table@StencilPolynomial@3, jD, 8j, 3<D .x Dx 2 Expand MatrixForm Out[4]= 88- 2 Dx, u -2 <, 8-Dx, u -1 <, 80, u 0 <, 8Dx, u 1 <, 82 Dx, u 2 << Out[5]//MatrixForm= 3u-2 8 - 5u-1 4 + 15u0 8 - u-1 8 + 3u0 4 + 3u1 8 3u0 8 + 3u1 4 - u2 8 Compute smoothness indicators following Shu 2009 equation (2.8). These smoothness indicators were originally proposed in Jiang and Shu JCP 1996 and will likely not match those used for flux reconstruction from earlier papers. In[6]:= StencilSmoothness@r_, j_D := TogetherBExpandBSumB Dx 2d-1 IntegrateBD@StencilPolynomial@r, jD, 8x, d<D 2 , :x, - Dx 2 , Dx 2 >F , 8d, r - 1<FFF Check smoothness indicators against the result from Shu 2009 equation (2.9).

WENO-based first and second centered derivatives

  • Upload
    rhysu

  • View
    285

  • Download
    6

Embed Size (px)

DESCRIPTION

This document derives the coefficients necessary to implement WENO-based derivatives following ideas from the following 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 Review 20093. 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.

Citation preview

Page 1: WENO-based first and second centered derivatives

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. 2000

2. Shu, “High order weighted essentially nonoscillatory schemes for convection dominated problems”, SIAM Review2009

3. Martin, Taylor, Wu, and Weirs, “A bandwidth-optimized WENO scheme for the effective direct numerical simula-tion of compressible turbulence”, J. Comput. Phys 2006

Note that the order-of-accuracy of these schemes is optimized, not their bandwidth.

InitializationBuild a list of uniform gridpoints with spacing Dx and function values fi. Use that list to build the jth interpolatingpolynomial for j Î 81, ..., r<.

In[1]:= StencilPoints@r_D := Table@8i Dx, ui<, 8i, -Hr - 1L, Hr - 1L<DSubstencilPoints@r_, j_D := Take@StencilPoints@rD, 8j, j + r - 1<DStencilPolynomial@r_, j_D :=

CollectAInterpolatingPolynomial@SubstencilPoints@r, jD, xD, u_, SimplifyE

Check these functions will return the three expected interpolant values at Dx/2 for the r = 3 case from Shu’s 2009SIAM Review paper equations (2.1), (2.2), and (2.3).

In[4]:= StencilPoints@3D

Table@StencilPolynomial@3, jD, 8j, 3<D ��. x ®

Dx

2�� Expand �� MatrixForm

Out[4]= 88-2 Dx, u-2<, 8-Dx, u-1<, 80, u0<, 8Dx, u1<, 82 Dx, u2<<

Out[5]//MatrixForm=3 u-2

8-

5 u-1

4+

15 u0

8

-u-1

8+

3 u0

4+

3 u1

8

3 u0

8+

3 u1

4-

u2

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_D := TogetherBExpandBSumB

Dx2 d-1 IntegrateBD@StencilPolynomial@r, jD, 8x, d<D2, :x, -

Dx

2,

Dx

2>F

, 8d, r - 1<FFF

Check smoothness indicators against the result from Shu 2009 equation (2.9).

Page 2: WENO-based first and second centered derivatives

In[7]:= StencilSmoothness@3, 1DStencilSmoothness@3, 2DStencilSmoothness@3, 3D

Out[7]=1

3I4 u

-22

- 19 u-2 u-1 + 25 u-12

+ 11 u-2 u0 - 31 u-1 u0 + 10 u02M

Out[8]=1

3I4 u

-12

- 13 u-1 u0 + 13 u02

+ 5 u-1 u1 - 13 u0 u1 + 4 u12M

Out[9]=1

3I10 u0

2- 31 u0 u1 + 25 u1

2+ 11 u0 u2 - 19 u1 u2 + 4 u2

2M

Using a Horner factorization of the smoothness indicators may provide a cleaner (and possibly more performant)representation when r > 3.

In[10]:= SmoothnessFactor@r_, A_D := Map@Together, HornerForm@A, Last@Transpose@StencilPoints@rDDDDD

The optimal, full-width stencil (in terms of order of accuracy) for a given derivative at x=0 is

In[11]:= Optimal@r_, d_D :=

D@InterpolatingPolynomial@StencilPoints@rD, xD, 8x, d<D ��. x ® 0 �� Together

The stencil-by-stencil contributions for a given derivative at x = 0 are

In[12]:= Contributions@r_, d_D :=

D@Table@StencilPolynomial@r, jD, 8j, r<D, 8x, d<D ��. x ® 0 �� Together

The linear weights must satisfy these constraints resulting from combining the stencil-by-stencil contributions to matchthe optimal result.

In[13]:= LinearWeights@r_, d_D := QuietAWithA9Γ = TableAΓj, 8j, r<E=,

Solve@8Γ.Contributions@r, dD � Optimal@r, dD,Total@ΓD � 1

<, Γ, RealsDEE �. Rule ® Equal

We will need to extract tables of coefficients of ui.

In[14]:= CoefficientTable@r_, A_D := Table@Coefficient@A, uiD, 8i, -Hr - 1L, Hr - 1L<D

We will want to perform linear solves on these tables of coefficients.

In[15]:= LinearSolveWeights@r_, d_D := LinearSolve@CoefficientTable@r, Contributions@r, dDD, CoefficientTable@r, Optimal@r, dDDD

Nonlinear weights should be computed in the usual WENO manner from these linear weights following Shu 2009equation (2.10).

3-point WENO derivative stencilIn[16]:= r = 2;

� First derivative

Display the optimal 3-point stencil coefficients for the derivative, the 2-point substencil coefficients, and the linearweights necessary to recover the maximum order of accuracy.

2 WENO Centered Derivatives.nb

Page 3: WENO-based first and second centered derivatives

In[17]:= d = 1;o@r, dD = Optimal@r, dDs@r, dD = Contributions@r, dDw@r, dD = LinearWeights@r, dD

Out[18]=-u-1 + u1

2 Dx

Out[19]= :-u-1 + u0

Dx,

-u0 + u1

Dx>

Out[20]= ::Γ1 �

1

2, Γ2 �

1

2>>

� Second derivative

The r=2 case only has a trivial second derivative.

� Smoothness indicators

In[21]:= Table@StencilSmoothness@r, jD, 8j, r<D �� Simplify �� MatrixForm

Out[21]//MatrixForm=

Hu-1 - u0L2

Hu0 - u1L2

5-point WENO derivative stencilsIn[22]:= r = 3;

� First derivative

In[23]:= d = 1;

Display the optimal 5-point stencil coefficients for the derivative, the 3-point substencil coefficients, and the linearweights necessary to recover the maximum order of accuracy.

In[24]:= o@r, dD = Optimal@r, dDs@r, dD = Contributions@r, dDw@r, dD = LinearWeights@r, dD

Out[24]=u-2 - 8 u-1 + 8 u1 - u2

12 Dx

Out[25]= :u-2 - 4 u-1 + 3 u0

2 Dx,

-u-1 + u1

2 Dx,

-3 u0 + 4 u1 - u2

2 Dx>

Out[26]= 88Γ1 � 1 - Γ2 - H5 u-2 - 16 u-1 + 18 u0 - 8 u1 + u2 - 6 u-2 Γ2 + 18 u-1 Γ2 - 18 u0 Γ2 + 6 u1 Γ2L �H6 u-2 - 24 u-1 + 36 u0 - 24 u1 + 6 u2L,

Γ3 � H5 u-2 - 16 u-1 + 18 u0 - 8 u1 + u2 - 6 u-2 Γ2 + 18 u-1 Γ2 - 18 u0 Γ2 + 6 u1 Γ2L �H6 u-2 - 24 u-1 + 36 u0 - 24 u1 + 6 u2L<<

Brute forcing the solve for the linear weights is less fruitful in the r = 3 case. Extract the various coefficients andperform a linear solve.

WENO Centered Derivatives.nb 3

Page 4: WENO-based first and second centered derivatives

In[27]:= CoefficientTable@r, o@r, dDD �� MatrixFormCoefficientTable@r, s@r, dDD �� Transpose �� MatrixForm

Out[27]//MatrixForm=1

12 Dx

-2

3 Dx

02

3 Dx

-1

12 Dx

Out[28]//MatrixForm=1

2 Dx-

2

Dx

3

2 Dx0 0

0 -1

2 Dx0

1

2 Dx0

0 0 -3

2 Dx

2

Dx-

1

2 Dx

In[29]:= w@r, dD = LinearSolveWeights@r, dDTotal@w@r, dDD

Out[29]= :1

6,

2

3,

1

6>

Out[30]= 1

� Second derivative

In[31]:= d = 2;

Display the optimal 5-point stencil coefficients for the derivative, the 3-point substencil coefficients, and the linearweights necessary to recover the maximum order of accuracy.

In[32]:= o@r, dD = Optimal@r, dDs@r, dD = Contributions@r, dD

Out[32]=-u-2 + 16 u-1 - 30 u0 + 16 u1 - u2

12 Dx2

Out[33]= :u-2 - 2 u-1 + u0

Dx2,

u-1 - 2 u0 + u1

Dx2,

u0 - 2 u1 + u2

Dx2>

In[34]:= w@r, dD = LinearSolveWeights@r, dDTotal@w@r, dDD

Out[34]= :-

1

12,

7

6, -

1

12>

Out[35]= 1

� Smoothness indicators

In[36]:= Table@StencilSmoothness@r, jD, 8j, r<D �� MatrixForm

Out[36]//MatrixForm=

1

3I4 u

-22

- 19 u-2 u-1 + 25 u-12

+ 11 u-2 u0 - 31 u-1 u0 + 10 u02M

1

3I4 u

-12

- 13 u-1 u0 + 13 u02

+ 5 u-1 u1 - 13 u0 u1 + 4 u12M

1

3I10 u0

2- 31 u0 u1 + 25 u1

2+ 11 u0 u2 - 19 u1 u2 + 4 u2

2M

These smoothness indicators may be factored as in Jiang and Shu JCP 1996 equations (3.2), (3.3), and (3.4).

4 WENO Centered Derivatives.nb

Page 5: WENO-based first and second centered derivatives

In[37]:= WithB:

IS0 =

13

12Hu-2 - 2 u-1 + u0L2

+

1

4Hu-2 - 4 u-1 + 3 u0L2,

IS1 =

13

12Hu-1 - 2 u0 + u1L2

+

1

4Hu-1 - u1L2,

IS2 =

13

12Hu0 - 2 u1 + u2L2

+

1

4H3 u0 - 4 u1 + u2L2

>,

FullSimplify@8IS0 � StencilSmoothness@3, 1D,IS1 � StencilSmoothness@3, 2D,IS2 � StencilSmoothness@3, 3D

<DF

Out[37]= 8True, True, True<

Placing the indicators into HornerForm may also reduce their computational complexity:

In[38]:= Table@SmoothnessFactor@r, StencilSmoothness@r, jDD, 8j, r<D �� MatrixForm

Out[38]//MatrixForm=

1

3u-1 H25 u-1 - 31 u0L +

10 u02

3+

1

3u-2 H4 u-2 - 19 u-1 + 11 u0L

13

3u0 Hu0 - u1L +

4 u12

3+

1

3u-1 H4 u-1 - 13 u0 + 5 u1L

1

3u1 H25 u1 - 19 u2L +

4 u22

3+

1

3u0 H10 u0 - 31 u1 + 11 u2L

7-point WENO derivative stencilsIn[39]:= r = 4;

� First derivative

In[40]:= d = 1;

Display the optimal 7-point stencil coefficients for the derivative, the 4-point substencil coefficients, and the linearweights necessary to recover the maximum order of accuracy.

In[41]:= o@r, dD = Optimal@r, dDs@r, dD = Contributions@r, dD;CoefficientTable@r, s@r, dDD �� Transpose �� MatrixForm

Out[41]=-u-3 + 9 u-2 - 45 u-1 + 45 u1 - 9 u2 + u3

60 DxOut[43]//MatrixForm=

-1

3 Dx

3

2 Dx-

3

Dx

11

6 Dx0 0 0

01

6 Dx-

1

Dx

1

2 Dx

1

3 Dx0 0

0 0 -1

3 Dx-

1

2 Dx

1

Dx-

1

6 Dx0

0 0 0 -11

6 Dx

3

Dx-

3

2 Dx

1

3 Dx

In[44]:= w@r, dD = LinearSolveWeights@r, dDTotal@w@r, dDD

Out[44]= :1

20,

9

20,

9

20,

1

20>

Out[45]= 1

WENO Centered Derivatives.nb 5

Page 6: WENO-based first and second centered derivatives

� Second derivative

No full-accuracy WENO-based second derivative exists for the r=4 case with these substencils. The second and thirdsubstencils are identical and so the resulting linear weight problem has no solution. Moreover, the repeated substencilusage makes it unlikely that a general point discontinuity can be circumnavigated by the scheme.

In[46]:= d = 2;

In[47]:= o@r, dD = Optimal@r, dDs@r, dD = Contributions@r, dD;CoefficientTable@r, s@r, dDD �� Transpose �� MatrixForm

Out[47]=1

180 Dx2H2 u-3 - 27 u-2 + 270 u-1 - 490 u0 + 270 u1 - 27 u2 + 2 u3L

Out[49]//MatrixForm=

-1

Dx2

4

Dx2-

5

Dx2

2

Dx20 0 0

0 01

Dx2-

2

Dx2

1

Dx20 0

0 01

Dx2-

2

Dx2

1

Dx20 0

0 0 02

Dx2-

5

Dx2

4

Dx2-

1

Dx2

In[50]:= w@r, dD = LinearSolveWeights@r, dDTotal@w@r, dDD

LinearSolve::nosol : Linear equation encountered that has no solution. �

Out[50]= LinearSolveB::-

1

Dx2, 0, 0, 0>, :

4

Dx2, 0, 0, 0>, :-

5

Dx2,

1

Dx2,

1

Dx2, 0>,

:2

Dx2, -

2

Dx2, -

2

Dx2,

2

Dx2>, :0,

1

Dx2,

1

Dx2, -

5

Dx2>, :0, 0, 0,

4

Dx2>, :0, 0, 0, -

1

Dx2>>,

:1

90 Dx2, -

3

20 Dx2,

3

2 Dx2, -

49

18 Dx2,

3

2 Dx2, -

3

20 Dx2,

1

90 Dx2>F

Out[51]= ::-

89

90 Dx2,

1

90 Dx2,

1

90 Dx2,

1

90 Dx2>,

:77

20 Dx2, -

3

20 Dx2, -

3

20 Dx2, -

3

20 Dx2>, :-

7

2 Dx2,

5

2 Dx2,

5

2 Dx2,

3

2 Dx2>,

:-

13

18 Dx2, -

85

18 Dx2, -

85

18 Dx2, -

13

18 Dx2>, :

3

2 Dx2,

5

2 Dx2,

5

2 Dx2, -

7

2 Dx2>,

:-

3

20 Dx2, -

3

20 Dx2, -

3

20 Dx2,

77

20 Dx2>, :

1

90 Dx2,

1

90 Dx2,

1

90 Dx2, -

89

90 Dx2>>

� Smoothness indicators

In[52]:= DoAPrintAISHj-1L == StencilSmoothness@r, jDE, 8j, r<E

6 WENO Centered Derivatives.nb

Page 7: WENO-based first and second centered derivatives

IS0 �

1

2880I6649 u

-32

- 47 214 u-3 u-2 + 85 641 u-22

+ 56 694 u-3 u-1 -

210 282 u-2 u-1 + 134 241 u-12

- 22 778 u-3 u0 + 86 214 u-2 u0 - 114 894 u-1 u0 + 25 729 u02M

IS1 �

1

2880I3169 u

-22

- 19 374 u-2 u-1 + 33 441 u-12

+ 19 014 u-2 u0 -

70 602 u-1 u0 + 41 001 u02

- 5978 u-2 u1 + 23 094 u-1 u1 - 30 414 u0 u1 + 6649 u12M

IS2 �

1

2880I6649 u

-12

- 30 414 u-1 u0 + 41 001 u02

+ 23 094 u-1 u1 -

70 602 u0 u1 + 33 441 u12

- 5978 u-1 u2 + 19 014 u0 u2 - 19 374 u1 u2 + 3169 u22M

IS3 �

1

2880I25 729 u0

2- 114 894 u0 u1 + 134 241 u1

2+ 86 214 u0 u2 -

210 282 u1 u2 + 85 641 u22

- 22 778 u0 u3 + 56 694 u1 u3 - 47 214 u2 u3 + 6649 u32M

In[53]:= DoAPrintAISHj-1L == SmoothnessFactor@r, StencilSmoothness@r, jDDE, 8j, r<E

IS0 �

1

960u-1 H44 747 u-1 - 38 298 u0L +

u-3 H6649 u-3 - 47 214 u-2 + 56 694 u-1 - 22 778 u0L

2880+

25 729 u02

2880+

1

960u-2 H28 547 u-2 - 70 094 u-1 + 28 738 u0L

IS1 �

1

960u0 H13 667 u0 - 10 138 u1L +

u-2 H3169 u-2 - 19 374 u-1 + 19 014 u0 - 5978 u1L

2880+

6649 u12

2880+

1

960u-1 H11 147 u-1 - 23 534 u0 + 7698 u1L

IS2 �

1

960u1 H11 147 u1 - 6458 u2L +

u-1 H6649 u-1 - 30 414 u0 + 23 094 u1 - 5978 u2L

2880+

3169 u22

2880+

1

960u0 H13 667 u0 - 23 534 u1 + 6338 u2L

IS3 �

u0 H25 729 u0 - 114 894 u1 + 86 214 u2 - 22 778 u3L

2880+

1

960u2 H28 547 u2 - 15 738 u3L +

6649 u32

2880+

1

960u1 H44 747 u1 - 70 094 u2 + 18 898 u3L

9-point WENO derivative stencilsIn[54]:= r = 5;

� First derivative

In[55]:= d = 1;

Display the optimal 9-point stencil coefficients for the derivative, the 5-point substencil coefficients, and the linearweights necessary to recover the maximum order of accuracy.

WENO Centered Derivatives.nb 7

Page 8: WENO-based first and second centered derivatives

In[56]:= o@r, dD = Optimal@r, dDs@r, dD = Contributions@r, dD;CoefficientTable@r, s@r, dDD �� Transpose �� MatrixForm

Out[56]=1

840 DxH3 u-4 - 32 u-3 + 168 u-2 - 672 u-1 + 672 u1 - 168 u2 + 32 u3 - 3 u4L

Out[58]//MatrixForm=1

4 Dx-

4

3 Dx

3

Dx-

4

Dx

25

12 Dx0 0 0 0

0 -1

12 Dx

1

2 Dx-

3

2 Dx

5

6 Dx

1

4 Dx0 0 0

0 01

12 Dx-

2

3 Dx0

2

3 Dx-

1

12 Dx0 0

0 0 0 -1

4 Dx-

5

6 Dx

3

2 Dx-

1

2 Dx

1

12 Dx0

0 0 0 0 -25

12 Dx

4

Dx-

3

Dx

4

3 Dx-

1

4 Dx

In[59]:= w@r, dD = LinearSolveWeights@r, dDTotal@w@r, dDD

Out[59]= :1

70,

8

35,

18

35,

8

35,

1

70>

Out[60]= 1

� Second derivative

In[61]:= d = 2;

Display the optimal 7-point stencil coefficients for the derivative, the 4-point substencil coefficients, and the linearweights necessary to recover the maximum order of accuracy.

In[62]:= o@r, dD = Optimal@r, dDs@r, dD = Contributions@r, dD;CoefficientTable@r, s@r, dDD �� Transpose �� MatrixForm

Out[62]=1

5040 Dx2H-9 u-4 + 128 u-3 - 1008 u-2 + 8064 u-1 - 14 350 u0 + 8064 u1 - 1008 u2 + 128 u3 - 9 u4L

Out[64]//MatrixForm=11

12 Dx2-

14

3 Dx2

19

2 Dx2-

26

3 Dx2

35

12 Dx20 0 0 0

0 -1

12 Dx2

1

3 Dx2

1

2 Dx2-

5

3 Dx2

11

12 Dx20 0 0

0 0 -1

12 Dx2

4

3 Dx2-

5

2 Dx2

4

3 Dx2-

1

12 Dx20 0

0 0 011

12 Dx2-

5

3 Dx2

1

2 Dx2

1

3 Dx2-

1

12 Dx20

0 0 0 035

12 Dx2-

26

3 Dx2

19

2 Dx2-

14

3 Dx2

11

12 Dx2

In[65]:= w@r, dD = LinearSolveWeights@r, dDTotal@w@r, dDD

Out[65]= :-

3

1540, -

226

1155,

293

210, -

226

1155, -

3

1540>

Out[66]= 1

� Smoothness indicators

In[67]:= DoAPrintAISHj-1L == StencilSmoothness@r, jDE, 8j, r<E

8 WENO Centered Derivatives.nb

Page 9: WENO-based first and second centered derivatives

IS0 �

1

60 480

I279 134 u-42

- 2 569 471 u-4 u-3 + 5 951 369 u-32

+ 4 503 117 u-4 u-2 - 21 022 356 u-3 u-2 + 18 768 339 u-22

-

3 568 693 u-4 u-1 + 16 810 942 u-3 u-1 - 30 442 116 u-2 u-1 + 12 627 689 u-12

+ 1 076 779 u-4 u0 -

5 121 853 u-3 u0 + 9 424 677 u-2 u0 - 8 055 511 u-1 u0 + 1 337 954 u02M

IS1 �

1

60 480I82 364 u

-32

- 725 461 u-3 u-2 + 1 650 569 u-22

+ 1 186 167 u-3 u-1 -

5 550 816 u-2 u-1 + 4 854 159 u-12

- 847 303 u-3 u0 + 4 054 702 u-2 u0 - 7 357 656 u-1 u0 +

2 932 409 u02

+ 221 869 u-3 u1 - 1 079 563 u-2 u1 + 2 013 987 u-1 u1 - 1 714 561 u0 u1 + 279 134 u12M

IS2 �

1

60 480I82 364 u

-22

- 601 771 u-2 u-1 + 1 228 889 u-12

+ 799 977 u-2 u0 -

3 495 756 u-1 u0 + 2 695 779 u02

- 461 113 u-2 u1 + 2 100 862 u-1 u1 - 3 495 756 u0 u1 +

1 228 889 u12

+ 98 179 u-2 u2 - 461 113 u-1 u2 + 799 977 u0 u2 - 601 771 u1 u2 + 82 364 u22M

IS3 �

1

60 480I279 134 u

-12

- 1 714 561 u-1 u0 + 2 932 409 u02

+ 2 013 987 u-1 u1 -

7 357 656 u0 u1 + 4 854 159 u12

- 1 079 563 u-1 u2 + 4 054 702 u0 u2 - 5 550 816 u1 u2 +

1 650 569 u22

+ 221 869 u-1 u3 - 847 303 u0 u3 + 1 186 167 u1 u3 - 725 461 u2 u3 + 82 364 u32M

IS4 �

1

60 480I1 337 954 u0

2- 8 055 511 u0 u1 + 12 627 689 u1

2+ 9 424 677 u0 u2 -

30 442 116 u1 u2 + 18 768 339 u22

- 5 121 853 u0 u3 + 16 810 942 u1 u3 - 21 022 356 u2 u3 +

5 951 369 u32

+ 1 076 779 u0 u4 - 3 568 693 u1 u4 + 4 503 117 u2 u4 - 2 569 471 u3 u4 + 279 134 u42M

In[68]:= DoAPrintAISHj-1L == SmoothnessFactor@r, StencilSmoothness@r, jDDE, 8j, r<E

WENO Centered Derivatives.nb 9

Page 10: WENO-based first and second centered derivatives

IS0 �

u-1 H12 627 689 u-1 - 8 055 511 u0L

60 480+

1

60 480

u-3 H5 951 369 u-3 - 21 022 356 u-2 + 16 810 942 u-1 - 5 121 853 u0L +

668 977 u02

30 240+

1

60 480u-4 H279 134 u-4 - 2 569 471 u-3 + 4 503 117 u-2 - 3 568 693 u-1 + 1 076 779 u0L +

u-2 H6 256 113 u-2 - 10 147 372 u-1 + 3 141 559 u0L

20 160

IS1 �

u0 H2 932 409 u0 - 1 714 561 u1L

60 480+

1

60 480

u-2 H1 650 569 u-2 - 5 550 816 u-1 + 4 054 702 u0 - 1 079 563 u1L +

139 567 u12

30 240+

1

60 480u-3 H82 364 u-3 - 725 461 u-2 + 1 186 167 u-1 - 847 303 u0 + 221 869 u1L +

u-1 H1 618 053 u-1 - 2 452 552 u0 + 671 329 u1L

20 160

IS2 �

u1 H1 228 889 u1 - 601 771 u2L

60 480+

1

60 480u-1 H1 228 889 u-1 - 3 495 756 u0 + 2 100 862 u1 - 461 113 u2L +

20 591 u22

15 120+

1

60 480u-2 H82 364 u-2 - 601 771 u-1 + 799 977 u0 - 461 113 u1 + 98 179 u2L +

u0 H898 593 u0 - 1 165 252 u1 + 266 659 u2L

20 160

IS3 �

1

60 480u0 H2 932 409 u0 - 7 357 656 u1 + 4 054 702 u2 - 847 303 u3L +

u2 H1 650 569 u2 - 725 461 u3L

60 480+

20 591 u32

15 120+

1

60 480u-1 H279 134 u-1 - 1 714 561 u0 + 2 013 987 u1 - 1 079 563 u2 + 221 869 u3L +

u1 H1 618 053 u1 - 1 850 272 u2 + 395 389 u3L

20 160

IS4 �

1

60 480u1 H12 627 689 u1 - 30 442 116 u2 + 16 810 942 u3 - 3 568 693 u4L +

u3 H5 951 369 u3 - 2 569 471 u4L

60 480+

139 567 u42

30 240+

1

60 480u0 H1 337 954 u0 - 8 055 511 u1 + 9 424 677 u2 - 5 121 853 u3 + 1 076 779 u4L +

u2 H6 256 113 u2 - 7 007 452 u3 + 1 501 039 u4L

20 160

10 WENO Centered Derivatives.nb