weno schemes & implementation in python -...
TRANSCRIPT
![Page 1: WENO Schemes & Implementation in Python - SciPyconference.scipy.org/static/wiki/townsend_weno.pdf · PYTHON IMPLEMENTATION OF WENO INTERPOLATION & ... Implementing WENO ... derivatives](https://reader034.vdocument.in/reader034/viewer/2022050704/5abb4c2a7f8b9a441d8ca6f9/html5/thumbnails/1.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022050704/5abb4c2a7f8b9a441d8ca6f9/html5/thumbnails/2.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022050704/5abb4c2a7f8b9a441d8ca6f9/html5/thumbnails/3.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022050704/5abb4c2a7f8b9a441d8ca6f9/html5/thumbnails/4.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022050704/5abb4c2a7f8b9a441d8ca6f9/html5/thumbnails/5.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022050704/5abb4c2a7f8b9a441d8ca6f9/html5/thumbnails/6.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022050704/5abb4c2a7f8b9a441d8ca6f9/html5/thumbnails/7.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022050704/5abb4c2a7f8b9a441d8ca6f9/html5/thumbnails/8.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022050704/5abb4c2a7f8b9a441d8ca6f9/html5/thumbnails/9.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022050704/5abb4c2a7f8b9a441d8ca6f9/html5/thumbnails/10.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022050704/5abb4c2a7f8b9a441d8ca6f9/html5/thumbnails/11.jpg)
At Present & Looking Forward
Currently:Implementing boundary condition approaches Comparing two approaches for reconstructionDocumentation
Later:Submit module to SciPy
![Page 13: WENO Schemes & Implementation in Python - SciPyconference.scipy.org/static/wiki/townsend_weno.pdf · PYTHON IMPLEMENTATION OF WENO INTERPOLATION & ... Implementing WENO ... derivatives](https://reader034.vdocument.in/reader034/viewer/2022050704/5abb4c2a7f8b9a441d8ca6f9/html5/thumbnails/13.jpg)
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](https://reader034.vdocument.in/reader034/viewer/2022050704/5abb4c2a7f8b9a441d8ca6f9/html5/thumbnails/14.jpg)
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