Basic FDTD

PELOSI MAURO Aalborg University

mp@es.aau.dk

Fall 2007

1

Summary ‡Maxwell¶s equations ‡The Yee algorithm ‡Numerical dispersion ‡ABC (Absorbing Boundary Conditions)

mp@es.aau.dk

Fall 2007

2

Maxwell's equations
Maxwell's equations in differential form and integral form. The FDTD is based on the differential form. 3D Maxwell¶s Equations Differential form Integral form
r r r xD ! “v H  J xt r r r xB ! “ v E  M xt r r r r r r x ´´ D ™ dA ! ÑH ™ dl  ´´ J ™ dA ´l xt A A r r r r x ´´ B ™ dS !  ÑE ™ dl  ´´ M ™ dA ´ xt A l A
Fall 2007 3

mp@es.aau.dk

FDTD of Maxwell's equations ‡ Assumptions: ‡ The Medium .

aau. Qr where Q ! Q r Q 0 .I r . I ! I r I 0 will be: ‡ Linear (Field-independent) ‡ Isotropic (Direction-independent) ‡ Non-dispersive (Frequency independent) mp@es.dk Fall 2007 4 .

B ! Q H ‡ Permitting Electric and Magnetic losses by using: r r J ! W E W in [ S / m] r r ! W H W * in [.FDTD of Maxwell's equations r r r r ‡ This allow us to use the relations: D ! I E .aau.dk Fall 2007 5 . / m] * ‡ This gives: r r W* r xH 1 !  “v E  H Q Q xt r r W r xE 1 ! “v H  E xt I I mp@es.

aau.dk Fall 2007 6 .Maxwell's equations in Cartesian coordinates r r ‡ Expanding E and H into the Cartesian components: ¸ xEx 1 ¨ xH z xH y ! ©   W Ex ¹ xt xz I ª xy º xE y 1 ¨ xH x xH z ¸ ! ©   W Ey ¹ xt xx I ª xz º ¸ xEz 1 ¨ xH y xH x ! ©   W Ez ¹ xt xy I ª xx º ¸ xH x 1 ¨ xEz xE y * ! ©  W Hx ¹ xt xz Q ª xy º xH y 1 ¨ xEx xEz ¸ * ! ©  W Hy ¹ xt xx Q ª xz º ¸ xH z 1 ¨ xE y xEx * ! ©  W Hz ¹ xt xy Q ª xx º ‡ Note. only first order derivatives are needed. mp@es.

Finite-difference approximation of the first derivatives ‡ Begin with the Taylor series expansion: Ö Ö f '' .

x f ''' .

x 2 3 ' Ö Ö Ö Ö Ö f .

x ! f .

x  f .

x ™ .

x  x  ™ .

x  x  ™ .

tn 6 xx xi .tn x 2 x 2u x 3 x 3u xu  x   2 3 2 xx xi .tn xu u ( xi  (x)  u ( xi  (x) 2 !  O[.tn Subtracting the two expansions gives (x 2 x 2u (x 3 x 3u xu  (x   2 3 2 xx xi ... 2! 3! u ( xi  (x ) tn ! u xi .tn 6 xx xi .tn xx xi .tn u ( xi  x) tn ! u xi .tn xx xi .x  x  .

(x ] 2(x xx mp@es.dk Fall 2007 7 .aau.

‡ Yee Algorithm centres its E and H fields in time.The Yee Algorithm ‡ Solving both E and H fields. ‡ FD expressions are central in nature and 2nd order accurate. mp@es. in time and space. ‡ Continuity of the tangential E and H fields across boundaries. singularities) ‡ Yee Cell centres its E and H fields in 3D. ‡ => Both E and H field boundaries can be used ‡ Solving both E and H fields => more robust ‡ =>Unique field features (e.aau.dk Fall 2007 8 . ‡ Implicit enforce the two Gauss laws.g.

aau.The Yee Cell ‡ Yee Cell centres its E and H fields in 3D.dk Fall 2007 9 . mp@es.

aau. ‡ Time stepping algorithm is nondissipative. ‡ => Time stepping is fully explicit.The Yee Time stepping ‡ Yee Algorithm centres its E and H fields in time.dk Fall 2007 10 . ‡ FD expressions for the time derivatives are central in nature and 2nd order accurate. mp@es.

mp@es.aau.The Yee Time stepping ‡ Yee Algorithm centres its E and H fields in time.dk Fall 2007 11 .

k xu X $ xx n uX i  1 .k 2 (x 2  O «. n u X (i(x. j .k 2 n  uX i  1 . n(t ) ! u X i . j (y. k (z.The Yee Notation ‡ To keep the overview especially when considering 3D expressions Yee used the following notation which will be used for the FDTD equations. j . j .

dk Fall 2007 12 .(x » ­ ½ mp@es.aau.

1/1/ 2. j 1/ 2. j 1/ 2. j 1/ 2.k 1/ 2  E X. k 1/ 2 E X i .k 1/ 2 i j i j (t ! 1 I i .Finite Difference of Maxwell¶s Equations in 3D xEx 1 ¨ xH z xH y ¸ ! ©   WE x ¹ xt I ª xy xz º n n 2 2 E X.k 1/ 2  H Zi .k © (y (z ª ¸ ¹ ¹ º mp@es. j 1.1/1/ 2.k 1/ 2 H Yni .k 1  H Yni .aau. j2. j 1/ 2. k 1/ 2 n n ¨ H Zi . j .k n 1 ©   W i .dk Fall 2007 13 .

k  i .1/12/ 2 .aau.k  1 ¨ ¸¨ 1 ¸ ™© H n  H n 1  H Yn 1  H Yn 1 ¹ © ¹ W 1 1 (t ª i .k © i . j  . j  . j  . j . j .k 1 / 2  E n . j .k  2 2 i . j  . j  .k  2 2 (t ™E n i .k  2 2 (t 1 1 i .k  2 2 ! 1 1 1 i . j  .k º ª (s º 2 2 2 i .k  2 2 2I 1 1 i . j .Finite Difference of Maxwell¶s Equations in 3D By using the approximation E The explicit expression is obtained W 1 ¡ 1 n 2 1 1 i .dk Fall 2007     2I ¨ Hn  H n 1 H Yn 1  H Yn 1 i . j . j  . j  . j  . j  .k ¡ E ! 1 1 1 i . j  . j 1 / 2 .k  2 2 W 1 1 i .k  2 2 ª 1 2I 1 1 I ¢ ¸ ¹ ¹ ¹ º 14 . j 1.k  2 2 2I 1 1 i .k  2 2 mp@es.1/12/ 2 .k  12 i .k 1 / 2 ! E n .k  2 2 1 1 i . j1. j  .k  2 2 1 1 i . j  . j  . j . j  .k  1 2 2 2 2  ™©  W 1 1 (t © (y (z i . j .k  2 2 (t (t ™ E n i .k1 / 2 i j i j 2 ¢ ¢ 1 1 i . j  .k  2 2 (t I £ (t ¤ ¤ 2I W E n 1 1 i .k  2 2 By using the same spatial sampling in X. k 1 i .k 1 i . Y and Z => W 1 £ 1 2 1 1 i . j .k  i .k  2 2 2I 1 1 i .k  2 2 n i .

j 1 2 mp@es. => Each mode can be investigated separate. j 1 2 Y 1 i  . j 2 n i . j 1 15 .dk Fall 2007 ¨ 1 2 n 1 2 ¦ n 1 Y 1 n 1 2 ¥ 1 1 i . j  2 2 n 1 § i . Next the resultant equations obtained from reduction from 3D to the 2D TM mode is shown. In the 2D TE mode only E exist. H E In the 2D TM mode only H exist. E H The two modes exist without interaction with each other When the media is Linear. j 1 2 i .aau. n 1 1 i  . Isotropic and Non-dispersive.Finite Difference of Maxwell¶s Equations in 2D In 2D two modes exist ± the TM and TE mode.

j  2 i . j 1 2 1 i . j 2 i. j 2Q 1 1 2 2 i. j  2 2 2Q 1 1 i . j 3 W 1 (t ª i 2. j 1 2 2Q (t (s Q 1 © 1 2 1 i . j 2 2 1 i . j  i . j i  . j 2 2 mp@es. j  1 2 W* 1 1 EY n 1 2 1 1 i . j 1 2 W* 1 H n 1 Y 1 i . j 2 * 1 2Q 1 2 2 1 1 i . j  2 2 * 1 i. j 1 2 16 . j  2 2   ! (t  1 n ¨ n 1 ¸ 2 ™ © E 1 1  E 12 ¹ i .Finite Difference of Maxwell¶s Equations in 2D W* 1 (t 1 © i  . j 1 W 1 1 (t ª i . j  2 (t (s Q 1 ™H n Y  ¨ ¸ ™ © H Yn 1  H Yn 1  H n 1  H n 1 ¹ i 1. j  2 2 º 2 i. j1 2 2Q 1 2 2Q 1 i  . j 1 2 1 i  . j1 W * 1 (t ª i  2 . j  1 2   H n 1 ! ™H n  1 1 n ¨ n 2 ¸ 2 ™© E 1 1  E 1 ¹ * i . j  2 2 (t 2Q W (t 1 i .aau.dk Fall 2007   ! 1 1 i . j 1 i . j 1 2 1 i  . j  i. j 1 i  . j  2Q i. j 2 2 º 2 2 i . j 2 2 º 2 i  . j  (t (s Q ™H n Y 1 1 i. j1 2 W* 1 (t 1 i  . j  1 2 (t 1 2 2Q W* i.

dk Fall 2007 17 .The Yee Cell seen in a more Macroscopic view ± Faraday's and Ampere¶s law r r r r x ´´ D ™ dS1 ! C´1 H ™ dl1 xt S1 mp@es.aau.

k 2 2 º ª Which is exactly the free space version of the Yee! mp@es.k  H X i12.k ™ dS1 $ © H X i12. j1.The Yee Cell seen in a more Macroscopic view ± Faraday's and Ampere¶s law r r r r x ´´ D ™ dS1 ! ÑH ™ dl1   ´1 xt S 1 r ¨ r x ´´ I 0 EZi12. j  . j 1 . j .k  EZ i  1 . j12.k 2 2 2 2 I 0 (x(y © © (t © ª ¸ ¨ ¹ (x  © H Yi .k xt S 1 ª 1 n ¨ n 1 2 2 © EZ i  1 .aau.k 2 2 ¹ º ¸ (x  ¨ H n n ¹ © Yi 1 . j  1 . j 1 .dk Fall 2007 18 . j .k º ª 2 2 ¸ ¹ (y   º ¸ (y ¹ º ¸ ¹ ¨ n n ¹ ! © HX  HX 1 i .k  HYi1.k  H Yi1 . j .k ¹ ª i . j  1 . j 1 .

dk Fall 2007 19 .aau.Stability 2D and 3D ‡ Using same procedure as for the 1D case we obtain: 1 1 (t e (t e 1 1 1 1 1 c  c   2 2 2 2 ((x) ((y ) ((x) ((y ) ((z ) 2 ‡ For the case with equal spatial sampling: (s (t e c 2 (s (t e c 3 mp@es.

aau.Numerical Dispersion 2D case ‡ Using same procedure as for the 1D case we obtain: 2 2 ~ 2 ~ « 1 ¨ [(t ¸» ! «¨ 1 ¸ sin ¨ k x (x ¸»  «¨ 1 ¸ sin ¨ k y (y ¸» ¹¼ sin © ¹¼ ¬© ¹ © ¹¼ ¬© ¹ © ¬ c(t ª 2 º½ ª (x º ª 2 º½ ­ª (y º © 2 ¹½ ­ ­ ª º 2 ~ ~ « (s ¨ [(t ¸» ! sin 2 ¨ (s ™ k ™ cos(E ) ¸  sin 2 ¨ (s ™ k ™ sin(E ) ¸ © ¹ © ¹ ¬ c(t sin © 2 ¹¼ 2 2 ª º½ ­ ª º ª º ~ ~ ~ ~ k x ! k ™ cos(E ). k y ! k ™ sin(E ) mp@es.dk Fall 2007 20 .

Numerical Dispersion 2D case ‡ Plot of the normalised phase velocity vs.dk Fall 2007 21 . mp@es. travelling wave angle.aau.

aau.‡ ‡ ‡ ‡ ‡ The Plot are for c t= s/2. ‡ A magic time step exist for all dimensions for one incident angle for the largest time step allowed.dk Fall 2007 22 . Lowest error at an incidence angle of 45Û Largest error at 0Û and 90Û (along axis). Error diminish as the square of the number of spatial sampling per wavelength. Phase velocity always less than or equal to c. Numerical Dispersion 2D mp@es.

aau.Magic time step for the 2D case ‡ A magic time step exists for all dimensions for one incident angle for the largest time step allowed. ~ ~ « (s ¨ [(t ¸» ! sin 2 ¨ (s ™ k ™ cos(E ) ¸  sin 2 ¨ (s ™ k ™ sin(E ) ¸ sin © © ¹ © ¹ ¬ c(t ª 2 ¹¼ 2 2 º½ ­ ª º ª º 2 ~ ~ ~ k x ! k y ! k / 2 if (t ! (s / c 2 mp@es.dk Fall 2007 23 .

Numerical Dispersion 3D case ‡ Using same procedure as for the 2D case we obtain: 2 % % % «¨ 1 ¸ ¨ k x (x ¸ » «¨ 1 ¸ ¨ k y (y ¸ » «¨ 1 ¸ ¨ k z (z ¸ » « 1 ¨ [( t ¸ » sin © ¼  ¬© ¹ sin ¼ ¹ ¼  ¬© ¹ sin © ¹ ¼ ! ¬© ¹ sin © ¬ c (t © 2 ¹ ¼ ¬ ª (z º © 2 ¹ ¼ ¹ ª 2 º ½ ¬ ª (x º ª 2 º ¼ ­ ª (y º ª ­ ª º½ ­ ½ ¬ º½ ­ 2 2 2 ‡ Ideal dispersion relation for a physical plane wave propagating in 3D in a homogeneous lossless medium: 2 2 2 ¨[ ¸ ! .

k x  .

k y  .

dk Fall 2007 24 .aau.k z © ¹ ªcº 2 mp@es.

dk Fall 2007 25 . 2 % % % «¨ 1 ¸ ¨ k x (x ¸ » «¨ 1 ¸ ¨ k y (y ¸ » «¨ 1 ¸ ¨ k z (z ¸ » « 1 ¨ [( t ¸ » sin © ¼  ¬© ¹ sin ¼ ¹ ¼  ¬© ¹ sin © ¹ ¼ ! ¬© ¹ sin © ¬ c (t © 2 ¹ ¼ ¬ ª (z º © 2 ¹ ¼ ¹ ª 2 º ½ ¬ ª (x º ª 2 º ¼ ­ ª (y º ª ­ ª º½ ­ ½ ¬ º½ ­ 2 2 2 % % % % k x ! k y ! k z ! k / 3 if (t ! (s / c 3 mp@es.Magic time step for the 3D case ‡ A magic time step exists for all dimensions for one incident angle for the largest time step allowed.aau.

dk Fall 2007 26 . ‡ No computer can store an infinite amount of data! ‡ A suitable boundary condition on the outer perimeter of the domain must be used to simulate its extension to infinity.ABC (Absorbing boundary conditions) ‡ Many geometries of interest are defined in ³open´ regions where the spatial domain of the computed field is unbounded in one or more coordinate directions. mp@es.aau.

‡ We must suppress spurious reflections of the outgoing numerical waves to an acceptable level.dk Fall 2007 27 .ABC (Absorbing boundary conditions) ‡ We need a boundary condition that permits all outward propagating numerical waves to exit as if the simulation were performed on a computational domain of infinite extent.aau. mp@es.

mp@es.PML (Perfectly Matched Layer) ABC ‡ We terminate the outer boundary of the space lattice in an absorbing material medium. ‡ This is analogous to the physical treatment of the walls of an anechoic chamber.dk Fall 2007 28 .aau.

‡ By choosing loss parameters consistent with a dispersionless medium. ‡ A novel split-field formulation of Maxwell¶s equations is derived.aau. polarization. mp@es. and frequency are matched at the boundary. a perfectly matched planar interface is derived.PML (Perfectly Matched Layer) ABC ‡ The innovation of Berenger¶s PML is that plane waves of arbitrary incidence.dk Fall 2007 29 .

What's that? What is its behavior? mp@es.dk Fall 2007 30 .Exercise 1 ‡ ‡ ‡ ‡ ‡ Open the matlab file fdtd2.mat Read the comments. What happens? Identify the hidden object in the spatial domain.aau. Run the program.

Exercise 2 ‡ ‡ ‡ ‡ You have a GSM monopole antenna irradiating in free space over an infinite ground plane: How long should the antenna be to resonate? How would you choose the space step in a 3D FDTD simulation? How would you choose the time step in a 3D FDTD simulation? mp@es.aau.dk Fall 2007 31 .

Sign up to vote on this title
UsefulNot useful