The Finite-Difference Time-Domain (FDTD) Method - Part Iii: Numerical Techniques in Electromagnetics
The Finite-Difference Time-Domain (FDTD) Method - Part Iii: Numerical Techniques in Electromagnetics
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
Nikolova 2004
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 ,
+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
Ez
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
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 )
(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
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
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
(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:
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 ,
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
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
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
! 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