15.02.2015 Views

On the numerical solution of the 2D wave equation

On the numerical solution of the 2D wave equation

On the numerical solution of the 2D wave equation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Proc. <strong>of</strong> <strong>the</strong> 11 th Int. Conference on Digital Audio Effects (DAFx-08), Espoo, Finland, September 1-4, 2008<br />

<strong>equation</strong> can be formulated as follows [12]<br />

[1 + a(δ 2 x + δ 2 y) + a 2 δ 2 xδ 2 y]δ 2 t p n l,m = λ 2 [(δ 2 x + δ 2 y)<br />

+ bδ 2 xδ 2 y]p n l,m,<br />

where λ = cT/X is <strong>the</strong> Courant number, and a and b are free <strong>numerical</strong><br />

parameters. This formulation is consistent with <strong>the</strong> <strong>wave</strong><br />

<strong>equation</strong> for any real (a, b) (this is easily veried using <strong>equation</strong>s<br />

(42), (43), and (44)), and <strong>the</strong> resulting scheme is implicit except for<br />

a = 0. While a more generalised family <strong>of</strong> compact schemes is<br />

possible [5], it is useful to restrict <strong>the</strong> analysis <strong>of</strong> possible implicit<br />

schemes to those that can be factorised into two one-dimensional<br />

implicit <strong>equation</strong>s. In that case, an alternating direction implicit<br />

(ADI) formulation exists, which allows a fast implementation using<br />

<strong>the</strong> Thomas algorithm for matrix inversion [1, 2]. In <strong>the</strong> light<br />

<strong>of</strong> that constraint, <strong>the</strong> formulation in (6) is particularly useful since<br />

it allows splitting into <strong>the</strong> following ADI form, which is more ef-<br />

cient than alternative splitting formulae [12]<br />

(1 + aδ 2 x)p n+1∗<br />

l,m<br />

(1 + aδ 2 y)δ 2 t p n l,m = p n+1∗<br />

l,m<br />

where p n l,m is <strong>the</strong> update variable and p n+1∗<br />

l,m<br />

value.<br />

(6)<br />

= λ2<br />

a [−1 + (a − b)δ2 y]p n l,m, (7)<br />

+ λ2<br />

a (1 + bδ2 y)p n l,m, (8)<br />

is an intermediate<br />

2.2. Single-Frequency Plane-Wave Solutions<br />

Many standard methods for analysis <strong>of</strong> FDTD schemes are based<br />

on examining single-frequency plane-<strong>wave</strong> <strong>solution</strong>s. Consider<br />

such a <strong>wave</strong> travelling at position x ′ along an axis that cuts <strong>the</strong><br />

Cartesian x-axis at an angle θ. In <strong>the</strong> continuous space-time domain,<br />

<strong>solution</strong>s <strong>of</strong> this kind can be written<br />

p(x ′ , t) = p 0 e st e −jkx′ , (9)<br />

where p 0 is a real-valued amplitude value, s = σ + jω denotes<br />

complex frequency, and k is <strong>the</strong> <strong>wave</strong>number. Using <strong>the</strong> coordinate<br />

rotation x ′ = x cos(θ) + y sin(θ), this becomes<br />

p(x, y, t) = p 0 e st e −jkxx e −jkyy , (10)<br />

where k x = k cos θ and k y = k sin θ. In <strong>the</strong> discrete space-time<br />

domain, <strong>the</strong> single-frequency plane-<strong>wave</strong> <strong>solution</strong> is:<br />

p n l,m = p 0 e snT e −jˆk x lX e −jˆk y mX , (11)<br />

where ˆk x and ˆk y denote <strong>the</strong> effective <strong>numerical</strong> <strong>wave</strong>numbers,<br />

which differ from <strong>the</strong> continuous-domain <strong>wave</strong>numbers and are<br />

related to a <strong>wave</strong>number ˆk associated with <strong>the</strong> propagation direction<br />

along <strong>the</strong> x ′ -axis by<br />

ˆk 2 = ˆk 2 x + ˆk 2 x. (12)<br />

For <strong>solution</strong>s <strong>of</strong> this form, <strong>the</strong> approximation in (3) can be written<br />

δ 2 t p n l,m = `z − 2 + z −1´ p n l,m,<br />

= −4 sin 2 (ωT/2) p n l,m, (13)<br />

where z = e sT , which represents <strong>the</strong> classic relationship between<br />

<strong>the</strong> s- and <strong>the</strong> z-domain found in DSP literature. Hence by <strong>the</strong><br />

z-transform shift <strong>the</strong>orem, we have<br />

p n+1<br />

l,m = z p n l,m, (14)<br />

which is easily veried by substituting both sides <strong>of</strong> Eq. (14) with<br />

<strong>the</strong> form <strong>of</strong> Eq. (11). Similarly, under <strong>the</strong> assumption <strong>of</strong> singlefrequency<br />

plane-<strong>wave</strong> <strong>solution</strong>s <strong>the</strong> spatial approximations in (4)<br />

and (5) can be written<br />

δxp 2 n l,m = −4 sin 2 (ˆk xX/2) p n l,m, (15)<br />

δyp 2 n l,m = −4 sin 2 (ˆk y X/2) p n l,m. (16)<br />

2.3. Von Neuman Stability Analysis<br />

Classic von Neumann stability analysis investigates an FDTD scheme<br />

for <strong>solution</strong>s <strong>of</strong> <strong>the</strong> form <strong>of</strong> Eq. (11), and seeks to establish a bound<br />

on λ such that no growing <strong>solution</strong>s exist [1, 2]. From (14) it is<br />

clear that any scheme is unstable for |z| > 1, hence <strong>the</strong> necessary<br />

stability condition can be expressed as |z| ≤ 1. By substituting<br />

(13), (15), and (16) into (6), <strong>the</strong> following <strong>equation</strong> in z can be<br />

obtained:<br />

z + 2B(s x , s y ) + z −1 = 0, (17)<br />

where following [5] we introduce <strong>the</strong> new variables<br />

s x = sin 2 (ˆk xX/2), (18)<br />

s y = sin 2 (ˆk y X/2), (19)<br />

and where<br />

B(s x, s y) = 2λ 2 F (s x, s y) − 1, (20)<br />

with<br />

F (s x , s y ) =<br />

s x + s y − 4bs xs y<br />

1 − 4a(s x + s y ) + 16a 2 s x s y<br />

. (21)<br />

In FDTD literature, Eq. (17) is known as <strong>the</strong> amplication <strong>equation</strong><br />

or <strong>the</strong> amplication polynomial. The moduli <strong>of</strong> its two <strong>solution</strong>s<br />

have to be smaller than or equal to unity for any combination<br />

(s x , s y ) and thus any combination (ˆk x , ˆk y ). Since s x and<br />

s y are periodic with π, it is sufcient to consider only real-valued<br />

<strong>wave</strong>numbers in <strong>the</strong> range −π/X ≤ ˆk x , ˆk y ≤ π/X. We note<br />

that ˆk x and ˆk y can also become complex-valued [13], but in that<br />

case only <strong>the</strong> real part has to be taken into account with regard to<br />

stability analysis. From (17), it can be shown that |z| ≤ 1 when<br />

B 2 (s x, s y) ≤ 1 (22)<br />

which yields <strong>the</strong> bound on λ:<br />

λ 2 ≤<br />

1<br />

F max (s x , s y )<br />

(23)<br />

For any (a, b) <strong>the</strong> function F (s x , s y ) reaches its maximum at one<br />

<strong>of</strong> its extrema, where s x, s y ∈ [0, 1], thus<br />

F max = max<br />

„ «<br />

1<br />

1 − 4a , 2 − 4b<br />

1 − 8a + 16a 2<br />

1 − 8a + 16a2<br />

2 − 4b<br />

(24)<br />

Therefore <strong>the</strong> necessary stability condition for <strong>the</strong> scheme in (6) is<br />

«<br />

λ 2 ≤ min<br />

„1 − 4a, . (25)<br />

Since λ 2 must be positive, it follows from (25) that we have <strong>the</strong><br />

auxiliary constraints:<br />

a ≤ 1 4 , b ≤ 1 2 . (26)<br />

DAFX-2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!