54
Why do we need higher order operators? Taylor Operators One-sided operators High-order Taylor Extrapolation Runge-Kutta Method Truncated Fourier Operators - Derivative and Interpolation Accuracy of high-order schemes derivatives Numerical Methods in Geophysics: High-Order Operators Numerical Methods in Geophysics High-order operators

Numerical Methods in Geophysics: High-Order Operators

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Numerical Methods in Geophysics: High-Order Operators

Why do we need higher order operators?

Taylor Operators

One-sided operators

High-order Taylor Extrapolation

Runge-Kutta Method

Truncated Fourier Operators - Derivative and Interpolation

Accuracy of high-order schemes derivatives

Numerical Methods in Geophysics:High-Order Operators

Numerical Methods in Geophysics High-order operators

Page 2: Numerical Methods in Geophysics: High-Order Operators

Why do we need higher-order operators?

For realistic problems the first and second order methodsare not accurate enough. So far we only used information from the nearest neighbouring grid points. Could we improve the accuracy of the derivative operators by using more information (on both sides)?

Length of operator Derivative

n g n g n g n g n g

Derivative

Numerical Methods in Geophysics High-order operators

Page 3: Numerical Methods in Geophysics: High-Order Operators

Taylor Operators

... like so often we look at Taylor series ...Remember how we derived the second-order scheme

a f a f a f d x+ ≈ + '

b f b f b f d x− ≈ − '

⇒ + ≈ + + −+ −a f b f a b f a b f d x( ) ( ) '

the solution to this equation for a and b leads to a system of equation which can be cast in matrix form

Interpolation Derivative

01

=−=+

baba

dxbaba

/10

=−=+

Numerical Methods in Geophysics High-order operators

Page 4: Numerical Methods in Geophysics: High-Order Operators

Taylor Operators

... in matrix form ...

Numerical Methods in Geophysics High-order operators

⎟⎟⎠

⎞⎜⎜⎝

⎛=⎟⎟

⎞⎜⎜⎝

⎛⎟⎟⎠

⎞⎜⎜⎝

⎛− 0

111

11ba

Interpolation Derivative

... so that the solution for the weights is ...

⎟⎟⎠

⎞⎜⎜⎝

⎛=⎟⎟

⎞⎜⎜⎝

⎛⎟⎟⎠

⎞⎜⎜⎝

⎛− dxb

a/10

1111

⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎟⎠

⎞⎜⎜⎝

⎛−

=⎟⎟⎠

⎞⎜⎜⎝

⎛−

01

1111 1

ba

⎟⎟⎠

⎞⎜⎜⎝

⎛⎟⎟⎠

⎞⎜⎜⎝

⎛−

=⎟⎟⎠

⎞⎜⎜⎝

⎛−

dxba

/10

1111 1

Page 5: Numerical Methods in Geophysics: High-Order Operators

Taylor Operators

... and the result ...

Interpolation Derivative

Can we generalise this idea to longer operators?

⎟⎟⎠

⎞⎜⎜⎝

⎛=⎟⎟

⎞⎜⎜⎝

⎛2/12/1

ba

⎟⎟⎠

⎞⎜⎜⎝

⎛−

=⎟⎟⎠

⎞⎜⎜⎝

⎛1

12

1dxb

a

Let us start by extending the Taylor expansion beyond f(x±dx):

Numerical Methods in Geophysics High-order operators

Page 6: Numerical Methods in Geophysics: High-Order Operators

Taylor Operators

'''!3

)2(''!2)2(')2()2(

32

fdxfdxfdxfdxxf −+−≈−*a |

*b |

*c |

*d |

'''!3)(''

!2)(')()(

32

fdxfdxfdxfdxxf −+−≈−

'''!3)(''

!2)(')()(

32

fdxfdxfdxfdxxf +++≈+

'''!3

)2(''!2)2(')2()2(

32

fdxfdxfdxfdxxf +++≈+

... again we are looking for the coefficients a,b,c,d with whichthe function values at x±(2)dx have to be multiplied in order

to obtain the interpolated value or the first (or second) derivative!

... Let us add up all these equations like in the previous case ...

Numerical Methods in Geophysics High-order operators

Page 7: Numerical Methods in Geophysics: High-Order Operators

Taylor Operators

≈+++ +++−−− dfcfbfaf

++++ )( dcbaf

+++−− )22(' dcbadxf

++++ )222

2(''2 dcbafdx

)68

61

61

68('''3 dcbafdx ++−−

... we can now ask for the coefficients a,b,c,d, so that theleft-hand-side yields either f,f’,f’’,f’’’ ...

Numerical Methods in Geophysics High-order operators

Page 8: Numerical Methods in Geophysics: High-Order Operators

Taylor Operators

... if you want the interpolated value ...

1=+++ dcba

022 =++−− dcba

0222

2 =+++ dcba

068

61

61

68

=++−− dcba

... you need to solve the matrix system ...

Numerical Methods in Geophysics High-order operators

Page 9: Numerical Methods in Geophysics: High-Order Operators

Taylor Operators

... Interpolation ...

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

=

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

−−

−−

0001

6/86/16/16/822/12/1221121111

dcba

... with the result after inverting the matrix on the lhs ...

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

=

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

6/13/23/26/1

dcba

Numerical Methods in Geophysics High-order operators

Page 10: Numerical Methods in Geophysics: High-Order Operators

Taylor Operators

... first derivative ...

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

=

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

−−

−−

00/10

6/86/16/16/822/12/1221121111

dx

dcba

... with the result ...

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

−=

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

6/13/43/4

6/1

21dx

dcba

Numerical Methods in Geophysics High-order operators

Page 11: Numerical Methods in Geophysics: High-Order Operators

Taylor Operators

... third derivative ...

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

=

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

−−

−−

3/1000

6/86/16/16/822/12/1221121111

dxdcba

... with the result ...

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

=

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

2/11

12/1

13dx

dcba

... why did it not work for the 2nd derivative ?

Numerical Methods in Geophysics High-order operators

Page 12: Numerical Methods in Geophysics: High-Order Operators

Taylor Operators

''''!4)2('''

!3)2(''

!2)2(')2()2(

432

fdxfdxfdxfdxfdxxf +−+−≈−*a |

*b |

*c |

*d |

*e |

''''!4)('''

!3)(''

!2)(')()(

432

fdxfdxfdxfdxfdxxf +−+−≈−

fxf =)(

''''!4)('''

!3)(''

!2)(')()(

432

fdxfdxfdxfdxfdxxf ++++≈+

''''!4)2('''

!3)2(''

!2)2(')2()2(

432

fdxfdxfdxfdxfdxxf ++++≈+

... note that we had to add the 4th derivatives which will give us the required constraints on the coefficients a,b,c,d,e

Numerical Methods in Geophysics High-order operators

Page 13: Numerical Methods in Geophysics: High-Order Operators

Taylor Operators

≈++++ +++−−− efdfcfbfaf

+++++ )( edcbaf

++++−− )202(' edbadxf

+++++ )22

02

2(''2 edbafdx

++++−− )68

610

61

68('''3 edbafdx

)32

2410

241

32(''''4 edbafdx ++++

... so finally we end up with the system ...

Numerical Methods in Geophysics High-order operators

Page 14: Numerical Methods in Geophysics: High-Order Operators

Taylor Operators

... if you want the second derivative ...

0=++++ edcba

0202 =+++−− edba

122

02

2 =++++ edba

068

610

61

68

=+++−− edba

032

2410

241

32

=++++ edba

... you need to solve the matrix system ...

... could we find interpolation weights like this ?

Numerical Methods in Geophysics High-order operators

Page 15: Numerical Methods in Geophysics: High-Order Operators

Taylor Operators

... second derivative ...

⎟⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜⎜

=

⎟⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜⎜

⎟⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜⎜

−−

−−

00

/100

3/224/1024/13/26/86/106/16/8

22/102/122101211111

2dx

edcba

... with the result ...

⎟⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜⎜

=

⎟⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜⎜

12/13/42/5

3/412/1

12dx

edcba

Numerical Methods in Geophysics High-order operators

Page 16: Numerical Methods in Geophysics: High-Order Operators

Taylor Operators

... Fornberg1 (1996) gives a closed-form expression for the first derivative weights ...

⎪⎩

⎪⎨⎧

−+−

=

+

0)!2/()!2/(

)!2/()1( 21

1, jpjpj

pw

j

jpif j= 1, 2,..., p/2

if j= 0

... where p(even) is the order of accuracy, j is the x-position of the weight.

1Fornberg, B., A practical guide to pseudospectral methods, Cambridge University Press.

Numerical Methods in Geophysics High-order operators

Page 17: Numerical Methods in Geophysics: High-Order Operators

One-sided operators

Before we look at how the operators look like as they grow longerwe investigate whether we can approximate a derivative near a physical boundary ....

derivative

domain boundary

Let us follow the same route as before and use Taylor series.Let’s start with a first order scheme.

Numerical Methods in Geophysics High-order operators

Page 18: Numerical Methods in Geophysics: High-Order Operators

One-sided operators

... so we have to look for information on one side only

a f a f a f d x+ ≈ + '

)2(' dxbfbfbf +≈++

dxfbafbabfaf ')2()( +++≈+⇒ +++

the solution to this equation for a and b leads to a system of equations which can be cast in matrix form

Derivative

dxbaba

/120

=+=+

⎟⎟⎠

⎞⎜⎜⎝

⎛=⎟⎟

⎞⎜⎜⎝

⎛⎟⎟⎠

⎞⎜⎜⎝

⎛10

2111

ba

... and the solution is ...

Numerical Methods in Geophysics High-order operators

Page 19: Numerical Methods in Geophysics: High-Order Operators

One-sided operators

⎟⎟⎠

⎞⎜⎜⎝

⎛ −=⎟⎟

⎞⎜⎜⎝

⎛111

dxba

This is our well known definition of the centered derivative, butit will be defined not right at the boundary but dx/2 away from it!

Derivative

Let us extend this to the right and find higher-order operators

Numerical Methods in Geophysics High-order operators

Page 20: Numerical Methods in Geophysics: High-Order Operators

One-sided operators

*a |

*b |

*c |

*d | '''!3)3(''

!2)3(')3(

'''!3)2(''

!2)2(')2(

'''!3)(''

!2)(')(

32

32

32

fdxfdxfdxff

fdxfdxfdxff

fdxfdxfdxff

ff

+++≈

+++≈

+++≈

=

+++

++

+

... again we multiply by our coefficients and add everything up ...

Numerical Methods in Geophysics High-order operators

Page 21: Numerical Methods in Geophysics: High-Order Operators

One-sided operators

≈+++ ++++++ dfcfbfaf

++++ )( dcbaf

++++ )320(' dcbdxf

++++ )292

210(''2 dcbfdx

)6

2734

610('''3 dcbfdx +++

... to obtain the derivatives we have to solve the system ...

Numerical Methods in Geophysics High-order operators

Page 22: Numerical Methods in Geophysics: High-Order Operators

One-sided operators

... if you want the first derivative ...

0=+++ dcba

1320 =+++ dcb

0292

210 =+++ dcb

06

2734

610 =+++ dcb

... you need to solve the matrix system ...

Numerical Methods in Geophysics High-order operators

Page 23: Numerical Methods in Geophysics: High-Order Operators

One-sided operators

... Interpolation ...

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

=

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

00/10

6/273/46/102/922/10

32101111

dx

dcba

... with the result after inverting the matrix on the lhs ...

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

=

⎟⎟⎟⎟⎟

⎜⎜⎜⎜⎜

3/12/3

36/11

1dx

dcba

Numerical Methods in Geophysics High-order operators

Page 24: Numerical Methods in Geophysics: High-Order Operators

Taylor Operators

-5 0 5-1.5

-1

-0.5

0

0.5

1

1.5Order of accuracy: 2

-5 0 5-1.5

-1

-0.5

0

0.5

1

1.5Order of accuracy: 4

-5 0 5-1.5

-1

-0.5

0

0.5

1

1.5Order of accuracy: 8

-5 0 5-1.5

-1

-0.5

0

0.5

1

1.5Order of accuracy: 16

2-point 4-point

8-point 16-point

Numerical Methods in Geophysics High-order operators

Page 25: Numerical Methods in Geophysics: High-Order Operators

0 2 4 6

-1

0

1

2

0 2 4

-2

0

2

4

0 2 4 6

-5

0

5

0 2 4

-10

0

10

Taylor Operators - one sided

3-point5-point

7-point 8-point

Note the exploding coefficients with increasing operator length

Numerical Methods in Geophysics High-order operators

Page 26: Numerical Methods in Geophysics: High-Order Operators

Taylor Operators - Summary

Finite-difference operators with high-order accuracy can be derived using Taylor series. For two-sided operators the coefficients rapidly decrease. For one-sided operators the coefficients get larger with increasing operator length.

Now that we improved the accuracy of the space derivatives, how can we improve the accuracy of the time extrapolation?

Let’s look at the Taylor scheme ...

Numerical Methods in Geophysics High-order operators

Page 27: Numerical Methods in Geophysics: High-Order Operators

High-order Taylor extrapolation

Let us look at the acoustic wave equation

Scpcp zx2222 )( +∂+∂=

.. we now know how to accurately calculate the r.h.s. of this equation...our standard FD scheme for the time extrapolation yields

pdtdttptpdttp 2)()(2)( +−−=+

... extending this to higher orders leads to the scheme ...

nN

n

n

pn

dtdttptpdttp 2

1

2

)!2(2)()(2)( ∑

=

+−−=+

... this has interesting consequences as we only need the even orders of the time derivative, which we can easily calculate ...

Numerical Methods in Geophysics High-order operators

Page 28: Numerical Methods in Geophysics: High-Order Operators

High-order Taylor extrapolation

... since ...

Scpcp zxt22222 )( +∂+∂=∂

... we have also ...

Scpcp ttzxt2222224 )( ∂+∂∂+∂=∂

... or ...

Scpcp ttzxt4242226 )( ∂+∂∂+∂=∂

... so we can loop through our algorithm as long as we want (N times) to achieve higher-order accuracy in the time-extrapolation scheme ...

nN

n

n

pn

dtdttptpdttp 2

1

2

)!2(2)()(2)( ∑

=

+−−=+

.. however we have to be careful how the spatial and temporal operators behave and whether the accuracy of the solution to the pde actually improves!

Numerical Methods in Geophysics High-order operators

Page 29: Numerical Methods in Geophysics: High-Order Operators

High-order extrapolation

... often we have to extrapolate a first order system ...

),( tTfTt =∂

... or ...

τρ xt x

u ∂=∂)(

1

... and we initially used a simple scheme like ...

),(dt1 jjjj tTfTT +≈+

... this scheme is also known as the Euler scheme and is of little practical use ...

Numerical Methods in Geophysics High-order operators

Page 30: Numerical Methods in Geophysics: High-Order Operators

High-order extrapolation

... how about predicting a value and then averaging ....

),(dt1*

jjjj tTfTT +≈+

this is our first guess (equivalent to the Euler scheme) and now we use this value to improve our solution ...

[ ]),(),(21

1*

11 +++ ++= jjjjjj tTftTfdtTT

Numerical Methods in Geophysics High-order operators

Page 31: Numerical Methods in Geophysics: High-Order Operators

High-order extrapolation

... leading to a general algorithm like ...

)(21

),(),(

211

112

1

1

kkyy

kyxdxfkyxdxfk

dxxx

nn

nn

nn

nn

++=

+==

+=

+

+

+

For n=0,1,2,3,...N-1

End

predictor

corrector

called predictor-corrector or modified Euler or .... scheme ...... how does this apply to our cooling problem ?

Numerical Methods in Geophysics High-order operators

Page 32: Numerical Methods in Geophysics: High-Order Operators

High-order extrapolation

)(21

),(),(

211

112

1

1

kkyy

kyxdxfkyxdxfk

dxxx

nn

nn

nn

nn

++=

+==

+=

+

+

+

For n=0,1,2,3,...N-1

End

τ/TdtdT

−=nnn TdtTT

τ−=+1

... this was the simplest scheme ...with the modified Euler scheme we get

)(21

)(

211

12

1

1

kkTT

kTdtk

Tdtk

dttt

nn

n

n

nn

++=

+−=

−=

+=

+

+

τ

τ

For n=0,1,2,3,...N-1

End

Numerical Methods in Geophysics High-order operators

Page 33: Numerical Methods in Geophysics: High-Order Operators

High-order extrapolation

... the next more accurate scheme is the fourth order Runge-Kutta method, an extension of the predictor-corrector scheme ...

)22(61

),()2/,()2/,(

),(

43211

314

22/13

12/12

1

1

kkkkyy

kyxdxfkkyxdxfkkyxdxfk

yxdxfkdxxx

nn

nn

nn

nn

nn

nn

++++=

+=+=+=

=+=

+

+

+

+

+

For n=0,1,2,3,...N-1

End

Numerical Methods in Geophysics High-order operators

Page 34: Numerical Methods in Geophysics: High-Order Operators

High-order extrapolation

... Matlab sample code ...

for i=1:nt,

t(i)=i*dt;T(i+1)=T(i)-dt/tau*T(i); % EulerTa(i+1)=exp(-dt*i/tau); % Analytical solutionTi(i+1)=T(i)*(1+dt/tau)^(-1); % implicitTm(i+1)=(1-dt/(2*tau))/(1+dt/(2*tau))*Tm(i); % mixed implicit-explicit

k1=-dt/tau*Te(i);k2=-dt/tau*(Te(i)+k1);Te(i+1)=Te(i)+1/2*(k1+k2); % predictor-corrector

k1=-dt/tau*Tr(i);k2=-dt/tau*(Tr(i)+k1/2);k3=-dt/tau*(Tr(i)+k2/2); k4=-dt/tau*(Tr(i)+k3);Tr(i+1)=Tr(i)+1/6*(k1+2*k2+2*k3+k4); % Runge-Kutta

end

... with the results ...

Numerical Methods in Geophysics High-order operators

Page 35: Numerical Methods in Geophysics: High-Order Operators

High-order extrapolation

1 2 3 4 5 6 7 8 9-0.5

0

0.5

1

Time(s )

Tem

pera

ture

dt=1; tau=0.7

Comparison of low order implicit, mixed implicit-explicit (Crank-Nicholson), modified Euler (predictor-corrector), Runge-Kutta (fourth order)

for Newtonian Cooling

blue - Euler

red - Crank-Nicholson

black - analytic solution

magenta - Runge-Kutta

green - implicit

Runge-Kutta is the winner!

Numerical Methods in Geophysics High-order operators

Page 36: Numerical Methods in Geophysics: High-Order Operators

High-order extrapolation

1 1.5 2 2.50.1

0.11

0.12

0.13

0.14

0.15

0.16

0.17

0.18

0.19

0.2

Time(s )

Tem

pera

ture

dt=0.5; tau=0.7

Numerical Methods in Geophysics High-order operators

Comparison of low order implicit, mixed implicit-explicit (Crank-Nicholson), modified Euler (predictor-corrector), Runge-Kutta (fourth order)

for Newtonian Cooling

blue - Euler

red - Crank-Nicholson

black - analytic solution

magenta - Runge-Kutta

green - implicit

Page 37: Numerical Methods in Geophysics: High-Order Operators

Fourier Coefficients

We will now approach the problem of finding high-order space operators from a completely different viewpoint: Fourier Integrals.

Let us recall

∫∞

∞−

∞−

=

=

dxexfkF

dkekFxf

ikx

ikx

)()(

)(21)(π

... where f(x) is an arbitrary function and F(k) is its Fourier spectrum. Note that there are several different definitions, which distinguish themselves through normalisation constants and the sign convention in the exponent.

Numerical Methods in Geophysics High-order operators

Page 38: Numerical Methods in Geophysics: High-Order Operators

Fourier Coefficients

... how can we express the derivative of a function using these expressions?

∫∞

∞−

∞−

−=

⎟⎟⎠

⎞⎜⎜⎝

⎛∂=∂

dkekikF

dkekFxf

ikx

ikxxx

)(

)()(

... because F(k) clearly does not depend on x. Let us define ...

ikkP −=)(

... note that we use capital letters to denote fields in the wavenumber domain ...

Numerical Methods in Geophysics High-order operators

Page 39: Numerical Methods in Geophysics: High-Order Operators

Fourier Coefficients

... so that ...

∫∞

∞−

−=∂ dkekFkPxf ikxx )()()(

... now a bell rings ... and we remember the Convolution Theorem which says “a multiplication in the wavenumber domain is a convolution in the space domain” which can be expressed as

∫∞

∞−

−=∂ dxxfxxpxfx )'()'()(

... note the small letters as we are now in the space domain!

In the discrete and band-limited world this integral turns into a convolution sum.This is the most general way of describing a differential operator. It comprises all

the cases from two-point, local operators up to the exact spectral operator.

Numerical Methods in Geophysics High-order operators

Page 40: Numerical Methods in Geophysics: High-Order Operators

Fourier Coefficients

.. we now want to express the operator p(x) in the space domain ...we first have to get rid of the infinities as we are in a discrete domain where

we have a maximum frqeuency (wavenumber), the Nyquist frequency.This band-limitation can be expressed using Heaviside functions.

⎩⎨⎧

=01

)(xHif x>0

if x<0

in our example the limitation in k can be expressed as

( ))()()( NyNy kkHkkHikkP −++=

we now have to transform this back into the space domain

∫∞

∞−

−= dkekPxp ikx)()(

Numerical Methods in Geophysics High-order operators

Page 41: Numerical Methods in Geophysics: High-Order Operators

Fourier Coefficients

... to obtain ...

[ ])cos()sin(1)( 2 xkxkxkx

xp NyNyNy −=π

... in a staggered scheme we need to discretise space like ...

⎩⎨⎧

=+=+

dxkdxnx

Ny

n

/)2/1(2/1

π

... leading to ...

2))2/1(()1()(

dxnxp

n

n +−

Numerical Methods in Geophysics High-order operators

Page 42: Numerical Methods in Geophysics: High-Order Operators

Fourier Coefficients

2))2/1(()1()(

dxnxp

n

n +−

... these are our differential weights ...

-20 -15 -10 -5 0 5 10 15 20-0.05

-0.04

-0.03

-0.02

-0.01

0

0.01

0.02

0.03

0.04

0.05

Numerical Methods in Geophysics High-order operators

Page 43: Numerical Methods in Geophysics: High-Order Operators

to shorten the operator we taper with a Gaussian function

-20 -15 -10 -5 0 5 10 15 20-0.05

-0.04

-0.03

-0.02

-0.01

0

0.01

0.02

0.03

0.04

0.05

-20 -15 -10 -5 0 5 10 15 20

-0.04

-0.03

-0.02

-0.01

0

0.01

0.02

0.03

0.04

Numerical Methods in Geophysics High-order operators

Page 44: Numerical Methods in Geophysics: High-Order Operators

Fourier Coefficients - Interpolation

... the same approach can be applied to the problem of interpolation ...

∞−

∞−

−−

∞−

+−

=

=

=+

dkekIkF

dkeekF

dkekFdxxf

ikx

ikxikdx

dxxik

)()(

)(

)()2/(

2/

)2/(

2/)( ikdxekI −=

i.e. I(k) is now our interpolation operator expressed in the wavenumber domain. Again we are looking for the equivalent representation

in the space domain, which we get by inverse Fourier Transform

Numerical Methods in Geophysics High-order operators

Page 45: Numerical Methods in Geophysics: High-Order Operators

Fourier Coefficients - Interpolation

... in the band-limited world our operator is ...

( ))()()( 2/NyNy

ikdx kkHkkHekI −++= −

... which in the space domain yields ...

⎩⎨⎧

=+=+

dxkdxnx

Ny

n

/)2/1(2/1

π)2/())2/(sin(

)(dxx

dxxkxi Ny

+

+=

πdiscretising with

we obtain

)2/1()1()(+

−=

ndxxi

n

n π

Numerical Methods in Geophysics High-order operators

Page 46: Numerical Methods in Geophysics: High-Order Operators

Fourier Coefficients - Interpolation

- 4 0 - 3 0 - 2 0 - 1 0 0 1 0 2 0- 0 . 8

- 0 . 6

- 0 . 4

- 0 . 2

0

0 . 2

0 . 4

0 . 6

0 . 8

1

1 . 2

Numerical Methods in Geophysics High-order operators

Page 47: Numerical Methods in Geophysics: High-Order Operators

Fourier Coefficients - Interpolation

-30 -20 -10 0 10 20 30-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

the final 8-point operator

Numerical Methods in Geophysics High-order operators

Page 48: Numerical Methods in Geophysics: High-Order Operators

High-order operators - Accuracy

... as mentioned earlier the derivative operator in the wavenumber domain is

∫∞

∞−

∞−

−=

⎟⎟⎠

⎞⎜⎜⎝

⎛∂=∂

dkekikF

dkekFxf

ikx

ikxxx

)(

)()(

ikkP −=)(

-20 -15 -10 -5 0 5 10 15 20-0.05

-0.04

-0.03

-0.02

-0.01

0

0.01

0.02

0.03

0.04

0.05

... which in the space domain led to the convolutional operator p(x) looking likeexact shortened

-20 -15 -10 -5 0 5 10 15 20

-0.04

-0.03

-0.02

-0.01

0

0.01

0.02

0.03

0.04

)(xp )(~ xp

Numerical Methods in Geophysics High-order operators

Page 49: Numerical Methods in Geophysics: High-Order Operators

High-order operators - Accuracy

... this suggests that we can now Fourier transform our shortened operator and compare it with the exact one in the k-domain ...

Numerical Methods in Geophysics High-order operators

kikpFFT ~))(~( −=

-20 -15 -10 -5 0 5 10 15 20

-0.04

-0.03

-0.02

-0.01

0

0.01

0.02

0.03

0.04

... which also means that we now have a numerical wavenumber as a function of the exact wavenumber we propagate in our system.

0 20 40 60 80 1000

0.5

1

1.5

2

2.5

3

3.5

% Nyquis t

Im (

P(k)

)

Exact derivative operator

Page 50: Numerical Methods in Geophysics: High-Order Operators

High-order operators - Accuracy

... we can now compare some of our high-order Taylor operators with the exact operator in the wavenumber domain ...

1 1.5 2-1

-0.5

0

0.5

12 points

0 50 1000

1

2

3

4 k-domain

0 50 100-1.5

-1

-0.5

0 Max re l.e rr < 4/5 Nyquis t : 0.243039

% Nyquis t 0 50 100

-0.4

-0.3

-0.2

-0.1

0Cum e rror < 4/5 Nyquis t : 9.0835

% Nyquis t

2 Points

Numerical Methods in Geophysics High-order operators

Page 51: Numerical Methods in Geophysics: High-Order Operators

High-order operators - Accuracy

... we can now compare some of our high-order Taylor operators with the exact operator in the wavenumber domain ...

1 2 3 4-2

-1

0

1

22 points

0 50 1000

1

2

3

4 k-domain

0 50 100-1

-0.5

0 Max re l.e rr < 4/5 Nyquis t : 0.13023

% Nyquis t 0 50 100

-0.3

-0.2

-0.1

0Cum e rror < 4/5 Nyquis t : 3.60571

% Nyquis t

4 Points

Numerical Methods in Geophysics High-order operators

Page 52: Numerical Methods in Geophysics: High-Order Operators

High-order operators - Accuracy

... we can now compare some of our high-order Taylor operators with the exact operator in the wavenumber domain ...

0 5 10-2

-1

0

1

22 points

0 50 1000

1

2

3

4 k-domain

0 50 100-0.6

-0.4

-0.2

0 Max re l.e rr < 4/5 Nyquis t : 0.0606789

% Nyquis t 0 50 100

-0.2

-0.15

-0.1

-0.05

0Cum e rror < 4/5 Nyquis t : 1.5652

% Nyquis t

8 Points

Numerical Methods in Geophysics High-order operators

Page 53: Numerical Methods in Geophysics: High-Order Operators

High-order operators - Accuracy

... we can now compare some of our high-order Taylor operators with the exact operator in the wavenumber domain ...

0 10 20-2

-1

0

1

22 points

0 50 1000

1

2

3

4 k-domain

0 50 100-0.6

-0.4

-0.2

0 Max re l.e rr < 4/5 Nyquis t : 0.0247515

% Nyquis t 0 50 100

-0.15

-0.1

-0.05

0Cum e rror < 4/5 Nyquis t : 0.95043

% Nyquis t

16 Points

Numerical Methods in Geophysics High-order operators

Page 54: Numerical Methods in Geophysics: High-Order Operators

Fourier Coefficients

Summary

Finite-difference operators can be regarded as (truncated) spectral (global) operators in a general way. In pseudo-spectral methods, the space derivativesare calculated in the wavenumber domain.

The length of the operator determines its accuracy.

increasing length of operator2 nx

FD Spectralimproving accuracy

Numerical Methods in Geophysics High-order operators