weno schemes & implementation in python -...

14
PYTHON IMPLEMENTATION OF WENO INTERPOLATION & RECONSTRUCTION Presented by: Adrian Townsend In collaboration with: Professor Randy LeVeque David Ketcheson University of Washington

Upload: dinhkhue

Post on 28-Mar-2018

369 views

Category:

Documents


10 download

TRANSCRIPT

Page 1: WENO Schemes & Implementation in Python - SciPyconference.scipy.org/static/wiki/townsend_weno.pdf · PYTHON IMPLEMENTATION OF WENO INTERPOLATION & ... Implementing WENO ... derivatives

PYTHON IMPLEMENTATION OF WENO INTERPOLATION & RECONSTRUCTION

Presented by: Adrian Townsend

In collaboration with:Professor Randy LeVequeDavid KetchesonUniversity of Washington

Page 2: WENO Schemes & Implementation in Python - SciPyconference.scipy.org/static/wiki/townsend_weno.pdf · PYTHON IMPLEMENTATION OF WENO INTERPOLATION & ... Implementing WENO ... derivatives

OutlineWENO:

IntroductionThe Big PictureExamples, Advantages & Costs

Implementation:Motivation for Python ApproachA New Class: Piecewise Rational ClassPresent & Future Work

2

Page 3: WENO Schemes & Implementation in Python - SciPyconference.scipy.org/static/wiki/townsend_weno.pdf · PYTHON IMPLEMENTATION OF WENO INTERPOLATION & ... Implementing WENO ... derivatives

Weighted Essentially NonOscillatorySchemesAn adaptive interpolation or reconstruction procedure.

Achieve arbitrarily high order of formal accuracy in smooth regionsMaintain stable, nonoscillatory and sharp discontinuity transitions

Popular with solving hyperbolic conservation laws

3

Page 4: WENO Schemes & Implementation in Python - SciPyconference.scipy.org/static/wiki/townsend_weno.pdf · PYTHON IMPLEMENTATION OF WENO INTERPOLATION & ... Implementing WENO ... derivatives

WENO – The Big PictureGiven (or computed): ui or ui (average of cell between xi and xi+1)

Desired: Function that can be evaluated for any xInterpolate or Reconstruct (from cell averages)

Find rational interpolant, p(x)Arbitrary order of accuracy, N =5

x

ui

S

S1S2

S3

xi+1xi

Page 5: WENO Schemes & Implementation in Python - SciPyconference.scipy.org/static/wiki/townsend_weno.pdf · PYTHON IMPLEMENTATION OF WENO INTERPOLATION & ... Implementing WENO ... derivatives

Advantages& Costs

Arbitrarily high order of accuracy

Adaptive (nonlinear weights)

Ideal for convection dominated problems with sharp discontinuities and complicated smoothsolution structures.

Computationally Expensive!

5

Page 6: WENO Schemes & Implementation in Python - SciPyconference.scipy.org/static/wiki/townsend_weno.pdf · PYTHON IMPLEMENTATION OF WENO INTERPOLATION & ... Implementing WENO ... derivatives

WENO versus scipy.interpolate.spline Interpolation

Page 7: WENO Schemes & Implementation in Python - SciPyconference.scipy.org/static/wiki/townsend_weno.pdf · PYTHON IMPLEMENTATION OF WENO INTERPOLATION & ... Implementing WENO ... derivatives

WENO Reconstruction from averages

Page 8: WENO Schemes & Implementation in Python - SciPyconference.scipy.org/static/wiki/townsend_weno.pdf · PYTHON IMPLEMENTATION OF WENO INTERPOLATION & ... Implementing WENO ... derivatives

Implementing WENOGiven order of accuracy, N = 2 n -1 , x i’s , ui’s

Find n polynomial interpolants, pk (x ), for u (xi ) of O(n) on each Sk

(pk degree n-1)

Find nonlinear weights

αk = αk (x i , N) is a polynomial

βk = βk (pk , x i , x i+1 ) is a smoothness factor that involves integrating derivatives of pk over the interval [ x i , x i+1 ]

A solution: return piecewise rational object

* Chi-Wang Shu, 20098

Page 9: WENO Schemes & Implementation in Python - SciPyconference.scipy.org/static/wiki/townsend_weno.pdf · PYTHON IMPLEMENTATION OF WENO INTERPOLATION & ... Implementing WENO ... derivatives

Python Implementation: PiecewiseRational.py

9

Page 10: WENO Schemes & Implementation in Python - SciPyconference.scipy.org/static/wiki/townsend_weno.pdf · PYTHON IMPLEMENTATION OF WENO INTERPOLATION & ... Implementing WENO ... derivatives

Python Implementation: PiecewiseRational.py

10

Page 11: WENO Schemes & Implementation in Python - SciPyconference.scipy.org/static/wiki/townsend_weno.pdf · PYTHON IMPLEMENTATION OF WENO INTERPOLATION & ... Implementing WENO ... derivatives

At Present & Looking Forward

Currently:Implementing boundary condition approaches Comparing two approaches for reconstructionDocumentation

Later:Submit module to SciPy

Page 12: WENO Schemes & Implementation in Python - SciPyconference.scipy.org/static/wiki/townsend_weno.pdf · PYTHON IMPLEMENTATION OF WENO INTERPOLATION & ... Implementing WENO ... derivatives

Thank You

Contact:Adrian Townsend [email protected]. Randy LeVeque [email protected]

12

Page 13: WENO Schemes & Implementation in Python - SciPyconference.scipy.org/static/wiki/townsend_weno.pdf · PYTHON IMPLEMENTATION OF WENO INTERPOLATION & ... Implementing WENO ... derivatives

References

Shu, Chi-Wang. "High Order Weighted Essentially Nonoscillatory Schemes for Convection Dominated Problems." (2009) SIAM Review Vol. 51, No. 1, pp 82-126.

Carlini, E., Ferretti, R., Russo, G. "A Weighted Essentially Nonoscillatory, Large Time-Step Scheme for Hamilton-Jacobi Equations." (2005) SIAM J. Sci. Comput. Vol. 27, Iss. 3, pp 1071-1091.

13

Page 14: WENO Schemes & Implementation in Python - SciPyconference.scipy.org/static/wiki/townsend_weno.pdf · PYTHON IMPLEMENTATION OF WENO INTERPOLATION & ... Implementing WENO ... derivatives

Stencil Growth

x

k = 2

Order 2k+1 = 5

k+1 = 3 Stencils

k = 1

Order 2k+1 = 3

k+1 = 2 Stencils

k = 3

Order 2k+1 = 7

k+1 = 4 Stencilsx

x

k = 4

Order 2k+1 = 9

k+1 = 5 Stencils

14