Numerical Schemes for Advection Reaction Equation
description
Transcript of Numerical Schemes for Advection Reaction Equation
1
Numerical Schemes for Advection Reaction Equation
Ramaz Botchorishvili
Faculty of Exact and Natural Sciences
Tbilisi State University
GGSWBS,Tbilisi, July 07-11, 2014
2
Outline Equations Operator splitting Baricentric interpolation and derivative Simple high order schemes Divided differences Stable high order scheme Multischeme Discretization for ODEs
3
Equation
)()(),(),0( 00 BVLuxuxu
),()(
tufx
vu
t
u
v(t,x) - velocityf (u,t) โ reaction smooth functions
4
Operator splitting
),(),(
),,(
),(),(
,0)(
2/12/1
2/11
12/11
1
2/1
2/1
2/12/1
xtuxtu
ttttuft
u
xtuxtu
tttx
vu
t
u
nn
nn
nnn
n
nn
nn
nn
nn
5
Operator splitting
),(),(
),,(
),(),(
,0)(
2/12/1
2/11
12/11
1
2/1
2/1
2/12/1
xtuxtu
ttttuft
u
xtuxtu
tttx
vu
t
u
nn
nn
nnn
n
nn
nn
nn
nn
LA -> ODE ->LA -> ODE-> โฆ - first order accurate
6
Operator splitting
),(),(
),,(
),(),(
,0)(
2/12/1
2/11
12/11
1
2/1
2/1
2/12/1
xtuxtu
ttttuft
u
xtuxtu
tttx
vu
t
u
nn
nn
nnn
n
nn
nn
nn
nn
LA -> ODE ->LA -> ODE-> โฆ - first order accurate
LA -> ODE ->ODE->LA -> LA->ODE-> โฆ - second order accurate
7
Interpolation
bxxxa n 10
nyyy ,,, 10
)(,),(0 xx n
n
iii xax
0
)()(
niyx ii ,,1,0,)(
8
Lagrange interpolation
n
iniin xlyxL
0, )()(
nixx
xx
xxxxxxxx
xxxxxxxxxl
n
ijj
ji
n
ijj
j
niiiiii
niini ,0,
)(
)(
)())(()(
)())(()()(
0
0
110
110,
n
jkjkj
n
jkjnikn nkyyxlyxL
00, 0,)()(
9
Lagrange interpolation
n
iniin xlyxL
0, )()(
nixx
xx
xxxxxxxx
xxxxxxxxxl
n
ijj
ji
n
ijj
j
niiiiii
niini ,0,
)(
)(
)())(()(
)())(()()(
0
0
110
110,
n
jkjkj
n
jkjnikn nkyyxlyxL
00, 0,)()(
Pros & cons
10
Barycentric interpolation
n
i i
iinn xxyxxL
0
)()(
n
jjn xxx
0
)()(
n
ijj
ji
ii
in
n
ijj
ji
n
ijj
j
niiiiii
niini
xxni
xxx
xx
xx
xxxxxxxx
xxxxxxxxxl
0
0
0
110
110,
)(
1,,0,)(
)(
)(
)())(()(
)())(()()(
11
Barycentric interpolation
n
i i
iinn xxyxxL
0
)()(
n
jjn xxx
0
)()(
n
ijj
ji
i
xx0
)(
1
12
Barycentric interpolation
Advantages
Efficient in terms of
arithmetic operations
Low cost for
introducing or
excluding new nodal
points = variable
accuracy
n
i i
iinn xxyxxL
0
)()(
n
jjn xxx
0
)()(
n
ijj
ji
i
xx0
)(
1
13
Baricentric derivative
14
Baricentric derivative
Advantages:
Easy for
implementing
Arithmetic
operations
High order accuracy
15
High order scheme for LA
n
nii in
nnniii
nnn xx
uvuvxL
2
,02
)()(1)(
n
ijj
ji
i
xx2
0
)(
1
x
vu
)(
Approximation for
N=1, 2nd orderN=2, 4th orderN=4 , 8th orderโฆ
16
High order scheme for LA
0)()(1 2
,0
1
n
nii in
kn
knn
ki
kii
n
kn
kn
xx
uvuvuu
n
ijj
ji
i
xx2
0
)(
1
First order accurate in time, 2n order accurate in space
17
High order scheme for LA
0)()(1 2
,0
1
n
nii in
kn
knn
ki
kii
n
kn
kn
xx
uvuvuu
n
ijj
ji
i
xx2
0
)(
1
First order accurate in time, 2n order accurate in space
Possible Problems conservation & stability
18
Firs order upwind
0])()[(])()[( 1111
1
h
uvuvuvuvuu ki
ki
ki
ki
ki
ki
ki
ki
ki
ki
19
Firs order upwind
0])()[(])()[( 1111
1
h
uvuvuvuvuu ki
ki
ki
ki
ki
ki
ki
ki
ki
ki
Numerical flux functions
20
Firs order upwind
0])()[(])()[( 1111
1
h
uvuvuvuvuu ki
ki
ki
ki
ki
ki
ki
ki
ki
ki
Numerical flux functions
Properties1. Consistency2. Conditional stability (CFL)3. First order in space and in time4. conservative
21
Firs order upwind
0])()[(])()[( 1111
1
h
uvuvuvuvuu ki
ki
ki
ki
ki
ki
ki
ki
ki
ki
Numerical flux functions
Properties1. Consistency2. Conditional stability (CFL)3. First order in space and in time4. conservative
ki
ki
ki vvv )()(
1|))(||)(|max ki
ki vv
h
i
ki
i
ki uu 1
22
High order conservative discretisation
0])()[(])()[( 1111
1
h
uvuvuvuvuu ki
ki
ki
ki
ki
ki
ki
ki
ki
ki
02/12/11
h
FFuu iiki
ki
23
High order conservative discretisation
0])()[(])()[( 1111
1
h
uvuvuvuvuu ki
ki
ki
ki
ki
ki
ki
ki
ki
ki
02/12/11
h
FFuu iiki
ki
Harten, Enquist, Osher, Chakravarthy:
given function in values in nodal points, how to interpolate at cell interfaces in order to get higher then 2 accuracy
24
Special interpolation/reconstruction procedure
g(x)= ๐แบ๐ฆแป๐๐ฆ๐ฅโโ
g(๐ฅ๐+1 2ฮค )=ฯ ๐แบ๐ฆแป๐๐ฆ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค๐๐=โโ =ฯ ๐าง๐โ๐ฅ๐๐๐=โโ
๐าง๐ = 1โ๐ฅ๐เถฑ ๐แบ๐ฆแป๐๐ฆ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค
P(x)-interpolation polinomial using g(๐ฅ๐+1 2ฮค )
p(x)=Pโ(x)-derivative
25
Special interpolation/reconstruction procedure
g(x)= ๐แบ๐ฆแป๐๐ฆ๐ฅโโ
g(๐ฅ๐+1 2ฮค )=ฯ ๐แบ๐ฆแป๐๐ฆ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค๐๐=โโ =ฯ ๐าง๐โ๐ฅ๐๐๐=โโ
๐าง๐ = 1โ๐ฅ๐เถฑ ๐แบ๐ฆแป๐๐ฆ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค
P(x)-interpolation polinomial using g(๐ฅ๐+1 2ฮค )
p(x)=Pโ(x)-derivative
26
Special interpolation/reconstruction procedure
g(x)= ๐แบ๐ฆแป๐๐ฆ๐ฅโโ
g(๐ฅ๐+1 2ฮค )=ฯ ๐แบ๐ฆแป๐๐ฆ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค๐๐=โโ =ฯ ๐าง๐โ๐ฅ๐๐๐=โโ
๐าง๐ = 1โ๐ฅ๐เถฑ ๐แบ๐ฆแป๐๐ฆ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค
P(x)-interpolation polinomial using g(๐ฅ๐+1 2ฮค )
p(x)=Pโ(x)-derivative
27
Special interpolation/reconstruction procedure
g(x)= ๐แบ๐ฆแป๐๐ฆ๐ฅโโ
g(๐ฅ๐+1 2ฮค )=ฯ ๐แบ๐ฆแป๐๐ฆ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค๐๐=โโ =ฯ ๐าง๐โ๐ฅ๐๐๐=โโ
๐าง๐ = 1โ๐ฅ๐เถฑ ๐แบ๐ฆแป๐๐ฆ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค
P(x)-interpolation polinomial using g(๐ฅ๐+1 2ฮค )
p(x)=Pโ(x)-derivative
28
Special interpolation/reconstruction procedure
1โ๐ฅ๐ ๐แบ๐ฅแป๐๐ฅ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค = 1โ๐ฅ๐ (g(๐ฅ๐+1 2ฮค )- g(๐ฅ๐โ1 2ฮค ))= 1โ๐ฅ๐ ๐แบ๐ฆแป๐๐ฆ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค =๐าง๐
Pโ(x)=g(x)+o(โ๐ฅ๐) p(x)=f(x)+ o(โ๐ฅ๐)
P(x)=ฯ ๐(๐ฅ๐โ๐+๐โ1 2เต๏ฟฝ๐๐=0 )๐๐(๐ฅ)
P(x)- ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)=ฯ แ๐แ๐ฅ๐โ๐โ๐โ1 2เต๏ฟฝแโ ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)๐๐=0 ๐๐(๐ฅ)
๐(๐ฅ๐โ๐+๐โ1 2เต๏ฟฝ) โ ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)=ฯ ๐าง๐โ๐+๐๐โ1๐=0 โ๐ฅ๐โ๐+๐
29
Special interpolation/reconstruction procedure
1โ๐ฅ๐ ๐แบ๐ฅแป๐๐ฅ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค = 1โ๐ฅ๐ (g(๐ฅ๐+1 2ฮค )- g(๐ฅ๐โ1 2ฮค ))= 1โ๐ฅ๐ ๐แบ๐ฆแป๐๐ฆ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค =๐าง๐
Pโ(x)=g(x)+o(โ๐ฅ๐) p(x)=f(x)+ o(โ๐ฅ๐)
P(x)=ฯ ๐(๐ฅ๐โ๐+๐โ1 2เต๏ฟฝ๐๐=0 )๐๐(๐ฅ)
P(x)- ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)=ฯ แ๐แ๐ฅ๐โ๐โ๐โ1 2เต๏ฟฝแโ ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)๐๐=0 ๐๐(๐ฅ)
๐(๐ฅ๐โ๐+๐โ1 2เต๏ฟฝ) โ ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)=ฯ ๐าง๐โ๐+๐๐โ1๐=0 โ๐ฅ๐โ๐+๐
30
Special interpolation/reconstruction procedure
1โ๐ฅ๐ ๐แบ๐ฅแป๐๐ฅ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค = 1โ๐ฅ๐ (g(๐ฅ๐+1 2ฮค )- g(๐ฅ๐โ1 2ฮค ))= 1โ๐ฅ๐ ๐แบ๐ฆแป๐๐ฆ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค =๐าง๐
Pโ(x)=g(x)+o(โ๐ฅ๐) p(x)=f(x)+ o(โ๐ฅ๐)
P(x)=ฯ ๐(๐ฅ๐โ๐+๐โ1 2เต๏ฟฝ๐๐=0 )๐๐(๐ฅ)
P(x)- ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)=ฯ แ๐แ๐ฅ๐โ๐โ๐โ1 2เต๏ฟฝแโ ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)๐๐=0 ๐๐(๐ฅ)
๐(๐ฅ๐โ๐+๐โ1 2เต๏ฟฝ) โ ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)=ฯ ๐าง๐โ๐+๐๐โ1๐=0 โ๐ฅ๐โ๐+๐
31
Special interpolation/reconstruction procedure
1โ๐ฅ๐ ๐แบ๐ฅแป๐๐ฅ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค = 1โ๐ฅ๐ (g(๐ฅ๐+1 2ฮค )- g(๐ฅ๐โ1 2ฮค ))= 1โ๐ฅ๐ ๐แบ๐ฆแป๐๐ฆ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค =๐าง๐
Pโ(x)=g(x)+o(โ๐ฅ๐) p(x)=f(x)+ o(โ๐ฅ๐)
P(x)=ฯ ๐(๐ฅ๐โ๐+๐โ1 2เต๏ฟฝ๐๐=0 )๐๐(๐ฅ)
P(x)- ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)=ฯ แ๐แ๐ฅ๐โ๐โ๐โ1 2เต๏ฟฝแโ ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)๐๐=0 ๐๐(๐ฅ)
๐(๐ฅ๐โ๐+๐โ1 2เต๏ฟฝ) โ ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)=ฯ ๐าง๐โ๐+๐๐โ1๐=0 โ๐ฅ๐โ๐+๐
32
Special interpolation/reconstruction procedure
1โ๐ฅ๐ ๐แบ๐ฅแป๐๐ฅ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค = 1โ๐ฅ๐ (g(๐ฅ๐+1 2ฮค )- g(๐ฅ๐โ1 2ฮค ))= 1โ๐ฅ๐ ๐แบ๐ฆแป๐๐ฆ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค =๐าง๐
Pโ(x)=g(x)+o(โ๐ฅ๐) p(x)=f(x)+ o(โ๐ฅ๐)
P(x)=ฯ ๐(๐ฅ๐โ๐+๐โ1 2เต๏ฟฝ๐๐=0 )๐๐(๐ฅ)
P(x)- ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)=ฯ แ๐แ๐ฅ๐โ๐โ๐โ1 2เต๏ฟฝแโ ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)๐๐=0 ๐๐(๐ฅ)
๐(๐ฅ๐โ๐+๐โ1 2เต๏ฟฝ) โ ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)=ฯ ๐าง๐โ๐+๐๐โ1๐=0 โ๐ฅ๐โ๐+๐
33
Special interpolation/reconstruction procedure
แP(x) โ ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)แโฒ=p(x)
๐๐+1 2ฮค = ๐แ๐ฅ๐+1 2เต๏ฟฝแ= ๐แ๐ฅ๐+1 2เต๏ฟฝแ= เตฌ๐แบ๐ฅแปโ ๐แ๐ฅ๐โ๐โ1 2เต๏ฟฝแเตฐแ๐ฅ=๐ฅ๐+1 2เต๏ฟฝโฒ
Baricentric derivative?
1โ๐ฅ๐ ๐๐๐๐ฅ ๐๐ฅ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค = 1โ๐ฅ๐ (๐๐+1 2ฮค โ ๐๐โ1 2ฮค )
34
Special interpolation/reconstruction procedure
แP(x) โ ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)แโฒ=p(x)
๐๐+1 2ฮค = ๐แ๐ฅ๐+1 2เต๏ฟฝแ= ๐แ๐ฅ๐+1 2เต๏ฟฝแ= เตฌ๐แบ๐ฅแปโ ๐แ๐ฅ๐โ๐โ1 2เต๏ฟฝแเตฐแ๐ฅ=๐ฅ๐+1 2เต๏ฟฝโฒ
Baricentric derivative?
1โ๐ฅ๐ ๐๐๐๐ฅ ๐๐ฅ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค = 1โ๐ฅ๐ (๐๐+1 2ฮค โ ๐๐โ1 2ฮค )
35
Special interpolation/reconstruction procedure
แP(x) โ ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)แโฒ=p(x)
๐๐+1 2ฮค = ๐แ๐ฅ๐+1 2เต๏ฟฝแ= ๐แ๐ฅ๐+1 2เต๏ฟฝแ= เตฌ๐แบ๐ฅแปโ ๐แ๐ฅ๐โ๐โ1 2เต๏ฟฝแเตฐแ๐ฅ=๐ฅ๐+1 2เต๏ฟฝโฒ
Baricentric derivative?
1โ๐ฅ๐ ๐๐๐๐ฅ ๐๐ฅ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค = 1โ๐ฅ๐ (๐๐+1 2ฮค โ ๐๐โ1 2ฮค )
36
Special interpolation/reconstruction procedure
แP(x) โ ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)แโฒ=p(x)
๐๐+1 2ฮค = ๐แ๐ฅ๐+1 2เต๏ฟฝแ= ๐แ๐ฅ๐+1 2เต๏ฟฝแ= เตฌ๐แบ๐ฅแปโ ๐แ๐ฅ๐โ๐โ1 2เต๏ฟฝแเตฐแ๐ฅ=๐ฅ๐+1 2เต๏ฟฝโฒ
Baricentric derivative?
1โ๐ฅ๐ ๐๐๐๐ฅ ๐๐ฅ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค = 1โ๐ฅ๐ (๐๐+1 2ฮค โ ๐๐โ1 2ฮค )
37
Special interpolation/reconstruction procedure
แP(x) โ ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)แโฒ=p(x)
๐๐+1 2ฮค = ๐แ๐ฅ๐+1 2เต๏ฟฝแ= ๐แ๐ฅ๐+1 2เต๏ฟฝแ= เตฌ๐แบ๐ฅแปโ ๐แ๐ฅ๐โ๐โ1 2เต๏ฟฝแเตฐแ๐ฅ=๐ฅ๐+1 2เต๏ฟฝโฒ
Baricentric derivative?
1โ๐ฅ๐ ๐๐๐๐ฅ ๐๐ฅ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค = 1โ๐ฅ๐ (๐๐+1 2ฮค โ ๐๐โ1 2ฮค )
02/12/11
h
FFuu iiki
ki
High order accurate approximation
38
Special interpolation/reconstruction procedure
แP(x) โ ๐(๐ฅ๐โ๐โ1 2เต๏ฟฝ)แโฒ=p(x)
๐๐+1 2ฮค = ๐แ๐ฅ๐+1 2เต๏ฟฝแ= ๐แ๐ฅ๐+1 2เต๏ฟฝแ= เตฌ๐แบ๐ฅแปโ ๐แ๐ฅ๐โ๐โ1 2เต๏ฟฝแเตฐแ๐ฅ=๐ฅ๐+1 2เต๏ฟฝโฒ
Baricentric derivative?
1โ๐ฅ๐ ๐๐๐๐ฅ ๐๐ฅ๐ฅ๐+1 2ฮค๐ฅ๐โ1 2ฮค = 1โ๐ฅ๐ (๐๐+1 2ฮค โ ๐๐โ1 2ฮค )
02/12/11
h
FFuu iiki
ki
High order accurate approximation
39
Components of high order scheme
Discretization of the divergence operator โข baricentric interpolation โข baricentric derivativeโข ENO type reconstruction procedure (Harten, Enquist, Osher, Chakravarthy): โข Given fluxes in nodal pointsโข Interpolate fluxes at cell interfaces in such a way
that central finite difference formula provides high order (higher then 2) approximation
โข Use adaptive stencils to avoid oscillations
40
Adaptation of interpolation
Use adaptive stencils to avoid oscillationsโขinterpolate with high order polynomial in all cell interfaces inside of the stencil of the polynomialโขIf local maximum principle is satisfied then value at this cell interface is foundโขIf local maximum principle is not satisfied then change stencil and repeat interpolation procedure for such cell interfacesโขIf after above procedure local maximum principle is not respected then reduce order of polynomial and repeat procedure for those interfaces only
41
Convergence in one space dimension Algorithm ensures
Uniform bound of approximate solutions Uniform bound of total variation
ConclusionsApproximate solution converge a.e. to solution of the original problem
42
Extension to higher spatial dimension Cartesian meshes:
strightforward Hexagonal meshes:
Directional derivates => div needs three directional derivatives in 2D
Implementation with baricentric derivatives without adaptation procedure See poster ( Tako & Natalia)
Implementation with adaptation โ not yet
43
Better ODE solvers
Different then polinomial basis fanctions, e.g approach B.Paternoster, R.DโAmbrosio
44
Thank you