• Keine Ergebnisse gefunden

Pseudospectral Methods

N/A
N/A
Protected

Academic year: 2021

Aktie "Pseudospectral Methods"

Copied!
20
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Pseudospectral Methods

 What is a pseudo-spectral Method?

 Fourier Derivatives

 The Acoustic Wave Equation with the Fourier Method

 Comparison with the Finite-Difference Method

 Dispersion and Stability of Fourier Solutions

The goal of this lecture is to shed light at one end of the axis of FD (or convolutional) type differential operators. When one uses all information of a space-dependent field to estimate the derivative at a point one obtains spectral accuracy.

(2)

What is pseudospectral?

Spectral solutions to time-dependent PDEs are formulated in the frequency-wavenumber domain and solutions are obtained in terms of spectra (e.g. seismograms). This technique is particularly interesting for geometries where partial solutions in the -k domain can be obtained

analytically (e.g. for layered models).

In the pseudo-spectral approach - in a finite-difference like manner - the PDEs are solved pointwise in physical space (x-t). However, the space derivatives are calculated using orthogonal functions (e.g. Fourier Integrals, Chebyshev polynomials). They are either evaluated using matrix- matrix multiplications, fast Fourier transform (FFT), or convolutions.

(3)

Fourier Derivatives

 

 

 

dk e

k ikF

dk e

k F x

f

ikx ikx x

x

) (

) ( )

(

.. let us recall the definition of the derivative using Fourier integrals ...

... we could either ...

1) perform this calculation in the space domain by convolution 2) actually transform the function f(x) in the k-domain and back

(4)

The acoustic wave equation

let us take the acoustic wave equation with variable density

 

 

 

p p

c

t x

x

1

1

2

2

the left hand side will be expressed with our standard centered finite-difference approach

  

 

 

dt p t p t dt p

t dt p

c

x

x

) 1 (

) ( 2 )

1 (

2 2

... leading to the extrapolation scheme ...

(5)

The Fourier Method: acoustic wave propagation

where the space derivatives will be calculated using the Fourier Method.

The highlighted term will be calculated as follows:

) (

) ( 1 2

)

( t dt c

2

dt

2

p p t p t dt

p

x x

   

 

 

  

n j x n

n n

j

P ik P P

P  FFT  ˆ

ˆ

 FFT

1

 

multiply by 1/

 

 

 

 

 

 

 

 

 

x x jn

n x

n x

n j

x

P P ik P P

FFT 1 1 ˆ

1 ˆ

1 FFT

1

... then extrapolate ...

(6)

… and in 3D …

) (

) ( 2

1 1

1 )

(

2 2

dt t

p t

p

p p

p dt

c dt

t p

z z

y y

x x

 

 

 

 

 

 

 

 

 

 

 

 

n j x n

n n

j

P ik P P

P  FFT  ˆ

ˆ

 FFT

1

 

 

 

 

 

 

 

 

 

 

x x jn

n x

n x

n j

x

P P ik P P

FFT 1 1 ˆ

1 ˆ

1 FFT

1

.. where the following algorithm applies to each space dimension ...

(7)

… FD in Matlab …

let us compare the core of the algorithm - the calculation of the derivative

(Matlab code)

function df=fder1d(f,dx,nop)

% fDER1D(f,dx,nop) finite difference

% second derivative nx=max(size(f));

n2=(nop-1)/2;

if nop==3; d=[1 -2 1]/dx^2; end

if nop==5; d=[-1/12 4/3 -5/2 4/3 -1/12]/dx^2; end df=[1:nx]*0;

for i=1:nop;

df=df+d(i).*cshift1d(f,-n2+(i-1));

end

(8)

… and as PS …

... and the first derivative using FFTs ...

function df=sder1d(f,dx)

% SDER1D(f,dx) spectral derivative of vector nx=max(size(f));

% initialize k kmax=pi/dx;

dk=kmax/(nx/2);

for i=1:nx/2, k(i)=(i)*dk; k(nx/2+i)=-kmax+(i)*dk; end k=sqrt(-1)*k;

% FFT and IFFT

ff=fft(f); ff=k.*ff; df=real(ifft(ff));

.. simple and elegant ...

(9)

Dispersion and Stability

) (kjdx n dt i

n

j

e

p

) (

2

2 n i kjdx ndt

j

x

p   k e

) (

2 2

2

sin 2

4

i kjdx ndt

n j

t

dt e

p dt

sin 2

2 dt

k cdt

(10)

Dispersion and Stability

What are the consequences?

a) when dt << 1, sin-1 (kcdt/2) kcdt/2 and w/k=c -> practically no dispersion

b) the argument of asin must be smaller than one.

sin 2

2 dt

k cdt

2 ) (

2 sin

1

kcdt dt

636 .

0 /

2 /

2 1

max

dx

cdt

cdt

k

(11)

Results @ 10Hz

Example of acoustic 1D wave simulation.

0 200 400 600

-0.5 0 0.5

1 Source time function

0 10 20 30

0 0.5

1 Gauss in space

0.8 0.9 1 1.1 1.2 1.3 1.4 1.5

-0.5 0 0.5 1

Time (sec)

3 point - 2 order; T = 6.6 s, Error = 50.8352%

(12)

Results @ 10Hz

Example of acoustic 1D wave simulation.

0 200 400 600

-0.5 0 0.5

1 Source time function

0 10 20 30

0 0.5

1 Gauss in space

0.8 0.9 1 1.1 1.2 1.3 1.4 1.5

-0.5 0 0.5 1

Time (sec)

5 point - 2 order; T = 7.8 s, Error = 3.9286%

(13)

Results @ 10Hz

Example of acoustic 1D wave simulation.

0 200 400 600

-0.5 0 0.5 1

Source time function

0 10 20 30

0 0.5 1

Gauss in space

0.8 0.9 1 1.1 1.2 1.3 1.4 1.5

-1 -0.5 0 0.5 1

Time (sec)

Fourier - 2 order; T = 35 s, Error = 2.72504%

(14)

Results @ 20Hz

Example of acoustic 1D wave simulation.

0 200 400 600

-0.5 0 0.5 1

Source time function

0 10 20 30

0 0.5 1

Gauss in space

0.8 0.9 1 1.1 1.2 1.3 1.4 1.5

-1 -0.5 0 0.5 1

Time (sec)

3 point - 2 order; T = 7.8 s, Error = 156.038%

(15)

Results @ 20Hz

Example of acoustic 1D wave simulation.

0 200 400 600

-0.5 0 0.5

1 Source time function

0 10 20 30

0 0.5

1 Gauss in space

0.8 0.9 1 1.1 1.2 1.3 1.4 1.5

-0.5 0 0.5 1

Time (sec)

5 point - 2 order; T = 7.8 s, Error = 45.2487%

(16)

Results @ 20Hz

Example of acoustic 1D wave simulation.

0 200 400 600

-0.5 0 0.5 1

Source time function

0 10 20 30

0 0.5 1

Gauss in space

0.8 0.9 1 1.1 1.2 1.3 1.4 1.5

-1 -0.5 0 0.5 1

Time (sec)

Fourier - 2 order; T = 34 s, Error = 18.0134%

(17)

Computational Speed

Difference (%) between numerical and analytical solution as a function of propagating frequency

Simulation time 5.4s

7.8s 33.0s

(18)

Numerics and Green‘s Functions

The concept of Green’s Functions (impulse responses) plays an important role in the solution of partial differential equations. It is also useful for numerical solutions. Let us recall the acoustic wave equation

p c

t

p  

2 2

with  being the Laplace operator. We now introduce a delta source in space and time

p c

t x

t

p   

2

 ( )  ( )

2

the formal solution to this equation is

x

c x

t t c

x

p ( / )

4 ) 1

,

(

2

 

(19)

500 1000 1500 0

1 2 3 4 5 6 7 8 9 10

500 1000 1500

0 1 2 3 4 5 6 7 8 9 10

500 1000 1500

0 1 2 3 4 5 6 7 8 9 10

Numerical Green‘s functions

3 point operator 5 point operator Fourier Method

Frequency increases Impulse response (analytical) concolved with source Impulse response (numerical convolved with source

(20)

Pseudospectral Methods - Summary

The Fourier Method can be considered as the limit of the finite-difference method as the length of the operator tends to the number of points along a particular dimension.

The space derivatives are calculated in the wavenumber domain by

multiplication of the spectrum with ik. The inverse Fourier transform results in an exact space derivative up to the Nyquist frequency.

The use of Fourier transform imposes some constraints on the

smoothness of the functions to be differentiated. Discontinuities lead to Gibb’s phenomenon.

As the Fourier transform requires periodicity this technique is particular useful where the physical problems are periodical (e.g. angular derivatives in cylindrical problems).

Pseudospectral methods play a minor role in seismology today but the principal of spectral accuracy plays an important role in spectral

Referenzen

ÄHNLICHE DOKUMENTE

Crowd Sourcing gives the task to a number of consumers in cyberspace, setting up an idea contest or something similar. Co-creation would enable consumers to describe the next

Using the same matrix representation of the array of the Bernstein co- efficients as in [22] (in the case of the tensorial Bernstein basis), we present in this paper two methods for

Domestically, the bans had less or little impact, although the fact that returns do not appear to show a decline may be seen as evidence that the bans stemmed further

We show that rectilinear graph drawing, the core problem of bend- minimum orthogonal graph drawing, and uniform edge-length drawing, the core problem of force-directed placement, are

Matrices used for the tests are first imported from the Matrix Market coordinate format (See Figure 4) as a full representation and then converted to other storage formats

In this paper, we applied the variational iteration method using He’s polynomials (MVIM) for finding the solutions of Burgers’ and coupled Burgers’ equa- tions.. The use of

Efficient numerical methods for solving nonlinear wave equations and studying the propagation and stability properties of their solitary waves (solitons) are applied to a

If desired, better results can be obtained by using the full bandwidth (W ∗ = W ) and thus avoiding energy truncation, albeit at the cost of significantly increasing the