A numerical tour of wave propagation

0 downloads 0 Views 4MB Size Report
May 1, 2014 - Newton's law ρ(x). ∂v(x,t; xs). ∂t. = ∇p(x,t; xs). (1). 1. Page 2. • Constitutive law. 1 κ(x) ... the elliptically-anisotropic wave equation reads. ∂2p(x,t; xs). ∂t2 ...... Charles Cerjan, Dan Kosloff, Ronnie Kosloff, and Moshe Reshef.
A numerical tour of wave propagation Pengliang Yang Email: [email protected] May 1, 2014 Abstract This tutorial is written for beginners as an introduction to basic wave propagation using finite difference method, from acoustic and elastic wave modeling, to reverse time migration and full waveform inversion. Most of the theoretical delineation summarized in this tutorial has been implemented in Madagascar with Matlab, C and CUDA programming, which will benefit readers’ further study.

Contents 1 Basic wave equation 1.1 Acoustic wave equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Elastic wave equation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1 2 2

2 Forward modeling 2.1 Taylor and Pade expansion . . . . . . . . . . . . . . . . . . . . . . . 2.2 Approximate the wave equation . . . . . . . . . . . . . . . . . . . . . 2.3 Absorbing boundary condition (ABC) . . . . . . . . . . . . . . . . . 2.3.1 Clayton-Enquist boundary condition . . . . . . . . . . . . . . 2.3.2 Sponge ABC . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 Perfectly Matched Layer (PML) . . . . . . . . . . . . . . . . . . . . 2.4.1 Split PML (SPML) for acoustics . . . . . . . . . . . . . . . . 2.4.2 Nonsplit Convolutional-PML (CPML) for acoustics . . . . . . 2.4.3 Nonsplit PML (NPML) for elastics . . . . . . . . . . . . . . . 2.5 Discretization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5.1 Higher-order approximation of staggered-grid finite difference 2.5.2 Discretization of SPML . . . . . . . . . . . . . . . . . . . . . 2.5.3 Discretization of NPML . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

. . . . . . . . . . . . .

5 5 6 6 6 6 8 8 9 10 10 11 13 14

3 Reverse time migration (RTM) 3.1 Brief overview . . . . . . . . . . . . . . . . . . 3.2 RTM implementation . . . . . . . . . . . . . 3.3 Imaging condition . . . . . . . . . . . . . . . 3.3.1 Angle gather extraction . . . . . . . . 3.4 Computation strategies and boundary saving 3.5 Numerical examples . . . . . . . . . . . . . . 4 Full 4.1 4.2 4.3 4.4

1

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

14 14 14 15 15 18 19

waveform inversion (FWI) The Newton, Gauss-Newton, and steepest-descent methods Conjugate gradient (CG) implementation . . . . . . . . . . Fr´echet derivative . . . . . . . . . . . . . . . . . . . . . . . . Gradient computation . . . . . . . . . . . . . . . . . . . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

22 22 23 24 25

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

Basic wave equation

˜ t; xs ), pressure p(x, t; xs ), particle velocity Define x = (x, y, z), time t, the s-th energy source function S(x, v(x, t), material density ρ(x), the bulk modulus κ(x). Now we have • Newton’s law ρ(x)

∂v(x, t; xs ) = ∇p(x, t; xs ). ∂t 1

(1)

• Constitutive law

1.1

1 ∂p(x, t; xs ) ˜ t; xs ). = ∇ · v(x, t; xs ) + S(x, κ(x) ∂t

(2)

Acoustic wave equation

Acoustics is a special case of gas dynamics (sound waves in gases and fluids) and linear elastodynamics. Note that elastodynamics is a more accurate representation of earth dynamics, but more industrial seismic processing based on acoustic model. Recent interest in quasiacoustic anisotropic approximations to elastic P-waves. ˜ t; xs ) is differentiable constitutive law w.r.t. t. Substituting Eq. (2) into the differentiation of Assume S(x, Eq. (1) gives   ˜ t; xs ) 1 ∂ S(x, 1 ∂ 2 p(x, t; xs ) = ∇ · ∇p(x, t; x ) + . (3) s 2 κ(x) ∂t ρ(x) ∂t q We introduce v(x) = κ(x) ρ(x) (compressional p-wave velocity):   ˜ t; xs ) 1 ∂ 2 p(x, t; xs ) 1 ∂ S(x, = ρ(x)∇ · ∇p(x, t; xs ) + ρ(x) (4) 2 2 v (x) ∂t ρ(x) ∂t Under constant density condition, we obtain the 2nd-order equation 1 v 2 (x) where ∇2 = ∇ · ∇ =

∂2 ∂x2

∂2 ∂z 2 ,

∂ 2 p(x, t; xs ) = ∇2 p(x, t; xs ) + fs (x, t; xs ) ∂t2 ˜

s) fs (x, t; xs ) = ρ(x) ∂ S(x,t;x . In 2D case, it is ∂t   ∂ 2 p(x, t; xs ) ∂ 2 p(x, t; xs ) ∂ 2 p(x, t; xs ) 2 = v (x) + + fs (x, t; xs ). ∂t2 ∂z 2 ∂x2

+

(5)

(6)

A snap of acoustic wavefield obtained at t=0.35s with 4-th order finite difference scheme and the sponge absorbing boundary condition is shown in Figure 1, where the source is put at the center of the model. For 3D, it becomes  2  ∂ p(x, t; xs ) ∂ 2 p(x, t; xs ) ∂ 2 p(x, t; xs ) ∂ 2 p(x, t; xs ) 2 = v (x) + + + fs (x, t; xs ) (7) ∂t2 ∂z 2 ∂x2 ∂y 2 Similarly, we put the source at the center of a 3D volume (size=100x100x100), performed the modeling for 300 steps in time and recorded the corresponding wavefield at kt=250, see Figure 2. The above spatial operator is spatially homogeneous. This isotropic formula is simple and easy to understand, and becomes the basis for many complicated generalizations in which the anisotropy may come in. In 2D case, the elliptically-anisotropic wave equation reads ∂ 2 p(x, t; xs ) ∂ 2 p(x, t; xs ) ∂ 2 p(x, t; xs ) 2 2 = v (x) + v (x) + fs (x, t; xs ) (8) 1 2 ∂t2 ∂z 2 ∂x2 Here, I borrow an example from Sergey Fomel’s lecture ‘seismic imaging’. We use the Hess VTI model shown in Figure 3 and Figure 4. We perform 1000 steps of modeling with time interval ∆t = 0.001s, and capture the wavefield at kt = 0.9s, as shown in Figure 5.

1.2

Elastic wave equation

In elastic wave equation, the modulus κ(x) corresponds to two Lame parameters: λ + 2µ = ρvp2 and u = ρvs2 , in which vp and vs denote the P- and S-wave velocity. The elastic wave equation can be written as  1 ∂τxx ∂τxz ∂vx   = ( + )   ∂t ρ ∂x ∂x     1 ∂τzx ∂τzz ∂vz   = ( + )    ∂t ρ ∂z ∂z   ∂τxx ∂vx ∂vz (9) = (λ + 2µ) +λ   ∂t ∂x ∂z    ∂τzz ∂vx ∂vz   =λ + (λ + 2µ)    ∂t ∂x ∂z    ∂τ ∂v ∂v  xz x z  =µ +µ ∂t ∂x ∂z where τij (sometimes σij ) is stress, vi is particle velocity, i, j = x, z. We display the 2 components of elastic wave propagation at kt = 270, nt = 300 modeled with ∆t = 0.001 in Figure 6, in which the grid size√is 200x200, the spatial interval is ∆x = ∆z = 5m, and the velocities are chosen to be V p = 2km/s, V s = V p/ 2. 2

Figure 1: A snap of acoustic wavefield obtained at t=0.35s with 4-th order finite difference scheme and the sponge absorbing boundary condition.

Figure 2: A wavefield snap recorded at kt=250, 300 steps modeled.

3

Figure 3: Hess VTI model: velocity component 1.

Figure 4: Hess VTI model: velocity component 2.

Figure 5: Wavefield at kt = 0.9s, 1000 steps of modeling with time interval ∆t = 0.001s performed.

4

Figure 6: Two components of elastic wave propagation√at kt = 270, nt = 300 modeled with ∆t = 0.001. Grid size=200x200,∆x = ∆z = 5m, V p = 2km/s, V s = V p/ 2

2

Forward modeling

2.1

Taylor and Pade expansion

The Taylor expansion of a function f (x + h) at x is written as 1 ∂ 2 f (x) 2 1 ∂ 3 f (x) 3 ∂f (x) h+ h + h + .... 2 ∂x 2! ∂x 3! ∂x3

f (x + h) = f (x) +

(10)

A popular example is (1 + x)α = 1 + αx +

α(α − 1) 2 α(α − 1) · · · (α − n + 1) n x + ... + x + .... 2! n!

(11)

Here we mainly consider the following expansion formula: 1 1 1 1 5 4 (1 − x) 2 = 1 − x − x2 − x3 − x − . . . , |x| < 1. 2 8 16 128

(12)

The Pade expansion of Eq. (12) should be: x/2

1

(1 − x) 2 = 1 −

1−

(13)

x/4 x/4 1− ...

we provide an informal derivation: 1

y = (1 − x) 2 ⇒ x = 1 − y 2 = (1 − y)(1 + y) ⇒ 1 − y = y =1− =1−

x x =1− 1+y 1 + (1 − x/2 1−

x/2 x 2− 1+y

=1−

x 1+y )

=1−

x/2 1−

x 1+y

x/2 1−

x/2 1+y

= ...

x/4 x/2 1− 1+y

The 1st-order Pade expansion is:

x 2

(14)

x/2 . 1 − x4

(15)

1

(1 − x) 2 = 1 − The 2nd-order Pade expansion is: 1

(1 − x) 2 = 1 − And the 3rd-order one is: 1

(1 − x) 2 = 1 −

5

x/2 1−

x/4 1− x 4

.

(16)

2.2

Approximate the wave equation

The innovative work was done by John Claerbout, well-known as 15◦ wave equation to separate the up-going and down-going waves [Claerbout, 1971]. Eliminating the source term, the Fourier transform of the scalar wave equation (Eq. (5)) can be specified as: ω2 = kx2 + kz2 . (17) v2 The down-going wave equation in Fourier domain is r r ω v2 k2 ω2 kz = − kx2 = 1 − 2x . (18) 2 v v ω Using the different order Pade expansions, we have:    v 2 kx2 ω   1− 1st − order :kz =   v 2ω 2    ! 2  2v 2 kx   ω 2  ω  2nd − order :kz = 1−   v 2 k2  v  4 − ω2x  ω   3rd − order :kz =    v        ω    4th − order :kz = v

1−

4 v 4 kx 8ω 4 v 2 k2 1 − 2ω2x 4 2 v 4 kx v 2 kx 2ω 2 − 4ω 4 3v 2 k2 v 4 k4 − 4ω2x + 16ωx4

2 v 2 kx 2ω 2

1− 1

(19)

!



!

The corresponding time domain equations are:  v ∂2p 1 ∂2p ∂2p   1st − order : + − = 0, (the well − known 15◦ wave equation)   ∂z∂t 2 ∂x2 v ∂t2     v2 ∂ 3 p 1 ∂ 3 p 3v ∂ 3 p ∂3p    2nd − order : 2 − − =0 + 2 ∂t ∂z 4 ∂x ∂z v ∂t3 4 ∂x2 ∂t  ∂4p v2 ∂ 4 p 1 ∂4p ∂4p v3 ∂ 4 p   3rd − order : − − + v − =0   ∂t3 ∂z 2 ∂x2 ∂t∂z v ∂t4 ∂x2 ∂t2 8 ∂x4    5 2 5 4 5 5  ∂ p v ∂ p 1 ∂ p 5v ∂ 5 p 5v 3 ∂ 5 p   4th − order : ∂ p − 3v − + + + =0 ∂t4 ∂z 4 ∂x2 ∂t2 ∂z 16 ∂x4 ∂z v ∂t5 4 ∂x2 ∂t3 16 ∂t∂x4

2.3 2.3.1

(20)

Absorbing boundary condition (ABC) Clayton-Enquist boundary condition

To simulate the wave propagation in the infinite space, the absorbing boundary condition (ABC), namely the proximal approximation (PA) boundary condition, was proposed in Engquist and Majda [1977]. The basic idea is to use the wave equation with opposite direction at the boundary. Take the bottom boundary as an example. Here, allowing for the incident wave is down-going, we use the up-going wave equation at the bottom boundary. Using a model including 3 layers (Figure 7), Figure 8 displays 10 shots data volume obtained the Clayton-Enquist boundary condition.1 2.3.2

Sponge ABC

The sponge ABC was proposed by Cerjan et al. [1985]. The principle is very simple: attenuating the refections exponentially in the extended artificial boundary (Figure 9) area by multiplying a factor less d(u) than 1. Commonly, we use the factor d(u) = exp(−[0.015 ∗ (nb − i)]2 ), u = x, z(i∆x or i∆z)

(21)

where nb is the thickness of the artificial boundary on each side of the model. Usually, we choose it to be nb = 20 ∼ 30. The sponge ABC can be easily applied to a wide range of wave propagation problems, including some governing wave equations for complicated medium. 1 The forward modeling part C/user/pyang/cuda fwi kernels.cu.

using

CUDA

programming

6

can

also

be

found

in

FWI

codes,

/RSFSR-

Figure 7: Velocity model: 3 layers

Figure 8: 10 shots data volume obtained using the Clayton-Enquist boundary condition.

7

d(x) 6= 0

d(x) 6= 0

B2

B3

d(z) 6= 0

d(z) 6= 0

A2

A3

A1

A4

B1

B4

Figure 9: A schematic diagram of extended artificial boundary area. A1 A2 A3 A4 is the original model zone, which is extended to be B1 B2 B3 B4 with artificial boundary. In the extended bounary area, the attenuation coeffcient d(u) 6= 0; In the model zone A1 A2 A3 A4 , d(u) = 0, u = x, z.

2.4

Perfectly Matched Layer (PML)

The PML ABC was proposed in electromagnetics computation [Berenger, 1994]. In seismic wave propagration community, two versions of PML boundary condition have been developed: the split PML (SPML) and nonsplit PML (NPML). 2.4.1

Split PML (SPML) for acoustics

It is possible for us to split the wave field into two components: x-component px and z-component pz . Then the acoustic wave equation becomes  p =px + pz      ∂p ∂vx x   =v 2   ∂t ∂x     ∂pz 2 ∂vz =v (22) ∂t ∂z    ∂vx ∂p   =    ∂t ∂x    ∂v ∂p  z  = ∂t ∂z To absorb the boundary reflection, by adding the decaying coefficients d(u) the SPML governing equation can be specified as [Collino and Tsogka, 2001]  p = px + pz      ∂vx ∂px   + d(x)px = v 2   ∂t ∂x     ∂pz 2 ∂vz + d(z)pz = v (23) ∂t ∂z    ∂vx ∂p   + d(x)vx =    ∂t ∂x      ∂vz + d(z)vz = ∂p ∂t ∂z where d(x) and d(z) are the ABC coefficients designed to attenuate the reflection in the boundary zone, see Figure 9. There exists many forms of ABC coefficients function. In the absorbing layers, we use the following 8

Figure 10: Wavefield snap of SPML with 8th order finite difference model for the damping parameter d(x) [Collino and Tsogka, 2001]: 3v u ln(R), u = x, z d(u) = d0 ( )2 , d0 = − L 2L

(24)

where L indicates the PML thinkness; x represents the distance between current position (in PML) and PML inner boundary. R is always chosen as 10−3 ∼ 10−6 . It is important to note that the same idea can be applied to elastic wave equation [Collino and Tsogka, 2001]. The split version of wave equation is very suitable for the construction of seismic Poynting vector. A straightforward application is the angle gather extration using Poynting vector, see Section 3.3. A numerical example of SPML using 8th order staggered finite difference scheme is given in Figure 10. 2.4.2

Nonsplit Convolutional-PML (CPML) for acoustics

Another approach to improve the behavior of the discrete PML at grazing incidence consists in modifying the complex coordinate transform used classically in the PML to introduce a frequency-dependent term that implements a Butterworth-type filter in the layer. This approach has been developed for Maxwell’s equations named convolutional PML (CPML) [Roden and Gedney, 2000] or complex frequency shifted-PML (CFS-PML). The key idea is that for waves whose incidence is close to normal, the presence of such a filter changes almost nothing because absorption is already almost perfect. But for waves with grazing incidence, which for geometrical reasons do not penetrate very deep in the PML, but travel there a longer way in the direction parallel to the layer, adding such a filter will strongly attenuate them and will prevent them from leaving the PML with significant energy . ∂p Define Ax = ∂x , Az = ∂p ∂z . Then the acoustic wave equation reads ∂2p = v2 ∂t2



∂Ax ∂Az + ∂x ∂z

 .

To combine the absorbing effects into the acoustic equation, we merely need to combine two convolution terms

9

into the above equations:  2 ∂ p   = v 2 (P x + P z)    ∂t2    ∂Ax    Px = + Ψx   ∂x   ∂Az (25) Pz = + Ψz  ∂z     ∂p   Ax = + Φx   ∂x       Az = ∂p + Φz ∂z where Ψx , Ψz are the convolution terms of Ax and Az; Φx , Φz are the convolution terms of P x and P z. These convolution terms can be computed via the following relation:  n Ψx = bx Ψn−1 + (bx − 1)∂xn−1/2 Ax  x     Ψn = bz Ψn−1 + (bz − 1)∂ n−1/2 Az z z z (26) n−1/2  Φnx = bx Φn−1 + (b − 1)∂ Px  x x x    n Φz = bz Φn−1 + (bz − 1)∂zn−1/2 P z z where bx = e−d(x)∆t and bz = e−d(z)∆t . More details about the derivation of C-PML, the interested readers are referred to Collino and Tsogka [2001] and Komatitsch and Martin [2007]. 2.4.3

Nonsplit PML (NPML) for elastics

The nonsplit PML for elastic implementation is  ∂v ∂τxx ∂τxz x  =( + ) − Ωxx − Ωxz ρ    ∂t ∂x ∂z    ∂τxz ∂τzz ∂vz   =( + ) − Ωzx − Ωzz ρ    ∂t ∂x ∂z   ∂vx ∂vz ∂τxx = (λ + 2µ) +λ − (λ + 2µ)Ψxx − λΨzz  ∂t ∂x ∂z     ∂τzz ∂vx ∂vz    ∂t = λ ∂x + (λ + 2µ) ∂z − λΨxx − (λ + 2µ)Ψzz       ∂τxz = µ ∂vx + µ ∂vz − µΨ − µΨ zx xz ∂t ∂x ∂z where the auxiliary variables are governed via the following relation  ∂Ω ∂τxx ∂Ωxz ∂τxz xx  + d(x)Ωxx = d(x) , + d(z)Ωxz = d(z)    ∂t ∂x ∂t ∂z    ∂Ω ∂τ ∂Ω ∂τ  xz zz zz zx   + d(x)Ωzx = d(x) , + d(z)Ωzz = d(z) ∂t ∂x ∂t ∂z ∂vx ∂Ψxz ∂vx ∂Ψxx    + d(x)Ψxx = d(x) , + d(z)Ψxz = d(z)   ∂t ∂x ∂t ∂z      ∂Ψzx + d(x)Ψ = d(x) ∂vz , ∂Ψzz + d(z)Ψ = d(z) ∂vz zx zz ∂t ∂x ∂t ∂z

2.5

(27)

(28)

Discretization

The Taylor series expansion of a function f (x) can be written as  1 ∂ 2 f (x) 2 ∂f (x)    f (x + h) = f (x) + h+ h + ∂x 2! ∂x2 2    f (x − h) = f (x) − ∂f (x) h + 1 ∂ f (x) h2 − ∂x 2! ∂x2 It leads to

1 ∂ 3 f (x) 3 h + ... 3! ∂x3 1 ∂ 3 f (x) 3 h + ... 3! ∂x3

 f (x + h) + f (x − h) 1 ∂ 2 f (x) 2 1 ∂ 4 f (x) 4    = f (x) + h + h + ... 2 2! ∂x2 4! ∂x4 3 5    f (x + h) − f (x − h) = ∂f (x) h + 1 ∂ f (x) h3 + 1 ∂ f (x) h5 + . . . 3 2 ∂x 3! ∂x 5! ∂x5 10

(29)

(30)

Let h = ∆x/2. This implies  ∂f (x) f (x + ∆x/2) − f (x − ∆x/2)   = + O(∆x2 ) ∂x ∆x   f (x) = f (x + ∆x/2) + f (x − ∆x/2) + O(∆x2 ) 2 2.5.1

(31)

Higher-order approximation of staggered-grid finite difference

To approximate the 1st-order derivatives as accurate as possible, we express it in the following ∂f f (x + ∆x/2) − f (x − ∆x/2) =a1 + ∂x ∆x f (x + 3∆x/2) − f (x − 3∆x/2) a2 + 3∆x f (x + 5∆x/2) − f (x − 5∆x/2) a3 + ··· 5∆x f (x + ∆x/2) − f (x − ∆x/2) =c1 + ∆x f (x + 3∆x/2) − f (x − 3∆x/2) c2 + ∆x f (x + 5∆x/2) − f (x − 5∆x/2) c3 + ··· ∆x

(32)

where ci = ai /(2i − 1). Substituting the f (x + h) and f (x − h) with (29) for h = ∆x/2, 3∆x/2, . . . results in   1 ∆x 2 ∂ 3 f ∂f ∂f =c1 ∆x + ( ) + · · · /∆x ∂x ∂x 3 2 ∂x3   1 3∆x 2 ∂ 3 f ∂f + c2 3∆x + ( ) + · · · /∆x ∂x 3 2 ∂x3   1 5∆x 2 ∂ 3 f ∂f + c3 5∆x + ( ) + · · · /∆x + . . . ∂x 3 2 ∂x3 ∂f =(c1 + 3c2 + 5c3 + 7c4 + · · · ) ∂x ∂3f ∆x2 (33) 3 3 (c1 + 3 c2 + 5 c3 + 73 c4 + · · · ) 3 + 2 3·2 ∂x ∂5f ∆x4 5 5 5 (c + 3 c + 5 c + 7 c + · · · ) + ··· + 1 2 3 4 3 · 24 ∂x5 ∂f =(a1 + a2 + a3 + a4 + · · · ) ∂x ∆x2 ∂3f 2 2 + (a1 + 3 a2 + 5 a3 + 72 a4 + · · · ) 3 2 3·2 ∂x 5 ∂ f ∆x4 4 4 4 (a + 3 a + 5 a + 7 a + · · · ) + ··· + 1 2 3 4 4 3·2 ∂x5 Thus, taking first N terms means               

a1 + a2 + a3 + · · · + aN = 1 2

2

a1 + 3 a2 + 5 a3 + · · · + (2N − 1)2 aN = 0 a1 + 34 a2 + 54 a3 + · · · + (2N − 1)4 aN = 0

(34)

··· a1 + 32N −2 a2 + 52N −2 a3 + · · · ) + (2N − 1)2N −2 aN = 0

In matrix form, 

1 12 .. .

    12N −2 |

1 32 32N −2

... ... .. .

1 (2N − 1)2 .. .

... {z

(2N − 1)2N −2



   a1 1   a2  0       ..  =  ..    .  . aN } | {z } a

V

11

0 |{z} b

(35)

The above matrix equation is Vandermonde-like system: Va = b, a = (a1 , a2 , . . . , aN )T . The Vandermonde matrix   1 1 ... 1  x1 x2 ... xN    V =  .. (36) ..  ..  . . .  N −1 x1N −1 x2N −1 . . . xN in which xi = (2i − 1)2 , has analytic solutions. Va = b can be solved using the specific algorithms, see Bjorck [1996]. And we obtain N

1 X ∂f = ci (f (x + i∆x/2) − f (x − i∆x/2) + O(∆x2N ) ∂x ∆x i=1

(37)

The MATLAB code for solving the 2N -order finite difference coefficients is provided in the following. 1 2 3 4 5 6

f u n c t i o n c=s t a g g e r e d f d c o e f f (NJ) % Computing 2∗N−o r d e r s t a g g e r e d −g r i d FD c o e f f i c i e n t s (NJ=2N) % Example : % format l o n g % NJ=10; % c=s t a g g e r e d f d c o e f f (NJ)

7 8 9 10 11 12 13 14

N=NJ / 2 ; x=z e r o s (N, 1 ) ; b=z e r o s (N, 1 ) ; b ( 1 ) =1; c=b ; f o r k=1:N x ( k ) =(2∗k−1) ˆ 2 ; end

15 16 17 18 19 20

f o r k=1:N−1 f o r i=N: −1: k+1 b ( i )=b ( i )−x ( k ) ∗b ( i −1) ; end end

21 22 23 24 25 26 27 28 29 30 31 32

f o r k=N−1: −1:1 f o r i=k+1:N b ( i )=b ( i ) / ( x ( i )−x ( i −k ) ) ; end f o r i=k : N−1 b ( i )=b ( i )−b ( i +1) ; end end f o r k=1:N c ( k )=b ( k ) / ( 2 ∗ k−1) ; end In general, the stability of staggered-grid difference requires that r 1 1 1 ∆t max(v) + ≤ PN . ∆x2 ∆z 2 i=1 |ci | Define C =

PN 1

i=1

|ci |

. Then, we have   N      N N   N    N

= 1, C = 1 = 2, C = 0.8571 = 3, C = 0.8054 = 4, C = 0.7774 = 5, C = 0.7595

12

(38)

In the 2nd-order case, numerical dispersion is limited when max(∆x, ∆z)