Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

Numerical Techniques in Electromagnetics

THE FINITE-DIFFERENCE TIME-DOMAIN (FDTD) METHOD PART III

Nikolova 2004

11. Yees discrete algorithm Maxwells equations are discretized using central FDs. We set the magnetic loss equal to zero. Then,

m = 0, J im = 0
n n n n E zi , j +1,k E zi , j ,k E yi , j ,k +1 E yi , j ,k t n n H xi+j0.5 = H xij0.5 , ,k , ,k y z n n n n E xi , j ,k +1 E xi , j ,k E zi +1, j ,k E zi , j ,k t n + 0.5 n 0.5 H yi , j ,k = H yi , j ,k z x

n H zi+j0.5 , ,k

n n n n E yi +1, j ,k E yi , j ,k E xi , j +1,k E xi , j ,k t n = H zij0.5 , ,k x y


2

Nikolova 2004

11. Yees discrete algorithm cont.


n n n n H zi+j0.5 H zi+j0.5 k H yi+0.5 H yi+0.51 , ,k , 1, , j ,k , j ,k n +1 E n E i n + 0.5 J exi , j ,k E xi , j ,k = k E E xi , j ,k + k H y z n n n n 0.5 H xi+j0.5 H xi+j0.51 H zi+j0.5 H zi+1, j ,k , ,k , ,k , ,k n +1 E n E i n + 0.5 E yi , j ,k = k E E yi , j ,k + k H J eyi , j ,k z x n n n n H yi+0.5 H yi+0.5,k H xi+j0.5 H xi+j0.5 k , j ,k 1, j , ,k , 1, n +1 E n E i n + 0.5 E zi , j ,k = k E E zi , j ,k + k H J ezi , j ,k x y e t t 1 E 2 E e 0 kE = kH = t e t 1+ e 1+ 2 2
Nikolova 2004 3

11. Yees discrete algorithm cont. The above coefficients are obtained by averaging the Efield, which appears in the loss term. For example, E x H z H y i + e Ex = J ex t y z
n n E xi+j1,k E xi , j ,k , n n E xi+j1,k + E xi , j ,k ,

2 t n n n n H zi+j0.5 H zi+j0.5k H yi+j0.5 H yi+j0.51 , ,k , 1, , ,k , ,k i J exi , j ,k y z

+e

The discretization steps in time and in space, as well as the numerical constant = c t / h are determined as for the wave equation.
Nikolova 2004 4

11. Yees discrete algorithm cont. Ey Yees cell


( i +1, j ,k +1) ( i +1, j ,k )

Ez

( i +1, j ,k ) ( i +1, j ,k ) ( i , j ,k +1)

Hx Ey

( i +1, j +1,k )

Ez

Ex

Hy
( i , j ,k )

( i , j ,k +1)

Hz

( i , j +1,k )

Hy

( i , j +1,k +1)

Ex

Hz
( i , j ,k ) ( i , j ,k +1)

Ex
( i , j ,k )

Ey

( i , j +1,k )

Ex

Hx
( i , j ,k )

Ez
( i , j ,k )
Nikolova 2004

( i , j +1,k )

Ez

x( i )

z( k )

Ey
( i , j ,k )

y( j )

11. Yees discrete algorithm cont. 2-D problems and their discretization The 2-D TMz mode The 2-D TEz mode H y H x E y E x H z E z i + mHz = + e Ez = J ez t x y t x y H E E H i x + e E x = z J ex x +mHx = z t y t y H y E y E z H z i +mH y = + eEy = J ey t x t x Ez H x Ez Ey
Ex
x( i )

Hz Ey

Ex
x( i )

Hy
Ez
y( j )

Hy
H x Ez
6

y( j ) Nikolova 2004

12. Absorbing (radiation) boundary conditions ABCs constitute a special type of BCs, which simulate reflection-free propagation out of the computational domain. ABCs are necessary in open (radiation/scattering) problems, as well as in guided-wave problems where matched port terminations are needed. The simplest ABCs are associated with various approximations of a one-way plane wave propagation. One-way wave equation (Murs ABC) Liao extrapolation Perfectly Matched Layers basics Others: Higdon operator, Bayliss-Turkel annihilating operators, etc.
Nikolova 2004 7

12. ABCs cont. A.The one-way wave equation (B.Engquist and A.Majda, Absorbing
boundary conditions for the numerical simulation of waves, Mathematics of Computation, vol. 31, 1977, pp. 629-651)

This is an equation which permits wave propagation in only one direction. Consider the 3-D scalar wave equation
2 f 2 f 2 f 1 2 f + 2 + 2 2 2 =0 2 x y z c t

Lf = 0

The partial derivative operator is defined as

2 2 2 1 2 L = 2 + 2 + 2 2 2 = 2 + 2 + 2 c 2 t2 x y z x y z c t
We wish to simulate one-way propagation along x at x=0.
Nikolova 2004 8

12. ABCs cont. The partial differential operator L can be factored, i.e., represented as sequentially applied two operators: Lf = L+ L f = 0

L = x c t 1 S

L+ = x + c 1 t 1 S 2

y z S = 1 + 1 c t c t
2

The partial differential operators L+ and L- are pseudodifferential operators. They cannot be applied directly to a function. Formally, the equation L f = 0 represents a wave traveling along x, while the equation L+ f = 0 represents a wave traveling along +x.
Nikolova 2004 9

12. ABCs cont. This becomes obvious in the case of a plane wave propagating along +/- x. z = 0, y = 0 S = 0 L = x c 1 t , L+ = x + c 1 t

f 1 f L f = =0 x c t f 1 f L+ f = + =0 x c t

Solution: f ( x + ct ) Solution: f ( x ct )

The radical appearing in L+ and L- can be expanded using Taylor series

(1 S )

2 1/ 2

1 2 = 1 S + O( S 4 ) 2
10

Nikolova 2004

12. ABCs cont. If S2 is very small, then (1 S 2 )1/ 2 1 The above is a first-order approximation of S. This means that the partial derivatives with respect to y and z are very small when compared with the partial derivative with respect to time scaled by the velocity of propagation c. 2 2 y z 2 S = 1 + 1 c t c t This happens when the wave is incident upon the x=const. plane almost normally. The L- operator then becomes

L1 = x c 1 t
L f = x f c 1 t f = 0
Nikolova 2004 11

12. ABCs cont. When the wave, however, impinges upon the x=0 boundary wall at larger angles, the 1st order approximation is very inaccurate. At grazing angles, S is large! For better accuracy, the second-order approximation can be used 2 2 1 y z 2 (1 S 2 )1/ 2 1 S 2 S = 1 + 1 2 c t c t 1 2 1 - operator now becomes L = x c t 1 S The L 2 1 y 2 1 z 2 L = x c 1 t 1 1 1 2 c t 2 c t

t 1 c 2 L = x + y + 2 z c 2 t

)
12

Nikolova 2004

Multiplying by t

12. ABCs cont.

1 2 c 2 L f = f tt f + yy f + 2 f = 0 zz c 2 1 2 c L+ f = 2 f + tt f 2 f + 2 f = 0 xt yy zz c 2

2 xt

at x = 0 at x = xmax at y = 0 at y = ymax

1 2 c 2 L f = f tt f + xx f + 2 f = 0 zz c 2 1 2 c L+ f = 2 f + tt f 2 f + 2 f = 0 yt xx zz c 2

2 yt

etc.

Nikolova 2004

13

12. ABCs cont. Murs ABC of 2nd order (G. Mur, Absorbing boundary conditions for the finitedifference approximation of the time-domain electromagnetic field equations, IEEE Trans. Electromagnetic Compatibility, vol. 23, 1981, pp. 377-382.

Mur implemented the above approximate expressions into finite-difference equations. Mur expands the partial derivatives in the L+ and L- operators using central finite differences of the field component about an auxiliary grid point displaced half a step along the direction of absorption and along time. Consider propagation along x, at the x=0 boundary. We assume that the scalar function f is evaluated at integer spatial grid positions (i,j,k) and time positions n.

2 xt
Nikolova 2004

n
1/ 2, j ,k

n n n n f1, j+,1 f 0, +,1 f1, j,1 f 0, ,1 1 k jk k jk = 2 t x x

14

12. ABCs cont. Now, the 2nd order time derivative has to be evaluated step from the boundary as well. Mur averages the time derivatives at x=0 and x=1.
n n n f 0, +,1k 2 f 0, j ,k + f 0, ,1k f1,nj+,1 2 f1,nj ,k + f1,nj,1 1 j j k k t2 f = + 2 2 2 t t

The 2nd order y- and z- derivatives also have to be evaluated step from the boundary. Mur averages those as well.
n n n n n n 1 f 0, j 1,k 2 f 0, j ,k + f 0, j +1,k f1, j 1,k 2 f1, j ,k + f1, j +1,k 2 f = + y 2 2 2 y y n n n f 0, j ,k 1 2 f 0, j ,k + f 0, j ,k +1 f1,nj ,k 1 2 f1,nj ,k + f1,nj ,k +1 1 2 f = + z 2 2 2 z z

Nikolova 2004

15

12. ABCs cont. Substitute all the FD approximations above in


1 2 c L f = 2 f tt f + 2 f + 2 f = 0 xt yy zz c 2

The result is n n n n n n f 0, +,1 = f 0, ,1 + k1 f1, j+,1 + f 0, ,1 + k2 f 0, j ,k + f1, j ,k + jk jk k jk

( ) n n n n n n + k3 z ( f 0, j ,k 1 2 f 0, j ,k + f 0, j ,k +1 + f1, j ,k 1 2 f1, j ,k + f1, j ,k +1 )


c t x k1 = c t+ x 2 x (c t )2 x k2 = k3 y = c t+ x 2 y 2 (c t + x ) k3 z
Nikolova 2004

n n n n n n + k3 y f 0, j 1,k 2 f 0, j ,k + f 0, j +1,k + f1, j 1,k 2 f1, j ,k + f1, j +1,k +

(c t )2 x = 2 z 2 (c t + x )
16

12. ABCs cont. Murs ABC of 1st order To obtain Murs approximation of
L f = x f c 1 t f = 0

simply remove the 2nd order y- and z-derivatives from the formula above: n n n n n n f 0, +,1 = f 0, ,1 + k1 f1, j+,1 + f 0, ,1 + k2 f 0, j ,k + f1, j ,k jk jk k jk

c t x 2 x k1 = k2 = c t+ x c t+ x In Yees algorithm, the E-field components tangential to the boundary are evaluated at this boundary. For example, at an x=0 boundary wall, the Ey and Ez field components define the boundary values of the EM field problem. Murs ABC is applied to them.
Nikolova 2004 17

12. ABCs cont. B. Liaos extrapolation (Z.P. Liao, H.L. Wong, B.P. Yang, and Y.F. Yuan, A
transmitting boundary for transient wave analyses, Scientia Sinica (series A), vol. XXVII, 1984, pp. 1063-1076.)

The ABC known as Liaos ABC is easily explained as an extrapolation of the wave in space-time using Newtons backward-difference polynomial. It is an order less reflective than Murs 2nd order ABC and does not depend strongly on the angle of incidence. We now consider a boundary wall at xmax. We assume that the field values are known for points located along a straight line perpendicular to the boundary. The objective is to find an approximation of the field at the boundary at the next time step f ( xmax , t + t ) .
Nikolova 2004 18

12. ABCs cont. The field values used for the approximation are obtained by a simultaneous shift in space-time:

m = 1 f1 = f ( xmax c t , t ) m = 2 f 2 = f ( xmax 2 c t , t t ) m = 3 f3 = f ( xmax 3 c t , t 2 t ) m = N f N = f ( xmax N c t , t ( N 1) t )


Notice that such representation corresponds to a wave propagating in the +x direction: f ( x ct ) We aim at finding f 0 = f ( xmax , t + t )

Nikolova 2004

19

12. ABCs cont. We now define backward finite-difference approximation of pth order at the point 1 = ( xmax c t , t ) .

D1 f (1 ) 1 f1 = f1 f 2 D 2 f (1 ) 2 f1 = 1 f1 1 f 2 , D 3 f (1 ) 3 f1 = 2 f1 2 f 2 , D N f (1 ) N f1 = N 1 f1 N 1 f 2
We denote the discrete functions, which go back in space and time as (see previous slide) f m = f ( m ) = f ( xmax m c t , t (m 1) t )
Nikolova 2004 20

1 f 2 = f 2 f 3 2 f 2 = 1 f 2 1 f 3 1 f 3 = f 3 f 4

12. ABCs cont. The N-th backward difference can be written in terms of the function values fm as
N f1 =
N +1 m =1 N ( 1)m1 Cm1 f m ,

where the Newton binomial coefficients are


N Cm1

N N! = = ( N m + 1)!( m 1)! m 1

However, it is usually more efficient (and easy) to program the recursive calculations shown in the previous slide.
Nikolova 2004 21

12. ABCs cont. We can expressed (interpolate) the function in terms of the backward finite differences at f1 as

f m f1 + f1 +
1

( + 1)

2! 3! ( + 1) ( + N 2) N 1 + f1 , 1 m N , = 1 m ( N 1)!

f1 +
2

( + 1)( + 2)

3 f1 +

We now use the above formula to extrapolate the function values, and we set m = 0 . Then, = 1.
f 0 = f (t + t , xmax ) f1 + 1 f1 + 2 f1 + 3 f1 + N 1 f1

This is Liaos ABC.


Nikolova 2004 22

12. ABCs cont. Liao et al. showed that for a sinusoidal plane wave of unit amplitude and wavelength , the maximum error is given by | N f |max = 2 N sin N ( c t / ) Assuming that
h = 2c t and h = / 32

the error is estimated at 0.1%. Liaos ABC is robust and depends little on the angle if incidence. With orders higher than N=3, however, it sometimes causes instabilities.

Nikolova 2004

23

12. ABCs cont. f 0 = f (t + t , xmax ) f1 + 1 f1 + 2 f1 + 3 f1 + Liaos ABC is simple to implement.


! ABC in MAIN ix2=nt-((nt-1)/2)*2 ix3=nt-((nt-1)/3)*3 ix4=nt-((nt-1)/4)*4

N 1 f1

F0=>AX(:,:,nk);F1=>AX(:,:,nk-1) ! front, ABC F2=>A2_F(:,:,ix2);F3=>A3_F(:,:,ix3);F4=>A4_F(:,:,ix4) call LIAO(ni,nj) ******************************************************************************************** subroutine LIAO D1=F1-F2;D2=F2-F3;D3=F3-F4 DD1=D1-D2;DD2=D2-D3 DDD1=DD1-DD2 F0=F1+D1+DD1+DDD1 return Nikolova 2004 end subroutine LIAO

! before end of cycle ! history A2_F(:,:,ix2)=AX(:,:,3) A3_F(:,:,ix3)=AX(:,:,4) A4_F(:,:,ix4)=AX(:,:,5)

! define variables real(8),dimension(ni,nj,2),target:: A2_F,A2_B real(8),dimension(ni,nj,3),target:: A3_F,A3_B real(8),dimension(ni,nj,4),target:: A4_F,A4_B 24 real(8),dimension(:,:),pointer:: F0,F1,F2,F3,F4

You might also like