Simulation of the Finite Difference Time Domain in Two Dimension
Total Page:16
File Type:pdf, Size:1020Kb
World Academy of Science, Engineering and Technology International Journal of Computer and Information Engineering Vol:6, No:3, 2012 Simulation of the Finite Difference Time Domain in Two Dimension Akram G., Jasmy Y. ∂H ∂(EE + ) Abstract—The finite-difference time-domain (FDTD) method is µy + σ * = zx zy xH y (2) one of the most widely used computational methods in ∂t ∂ x electromagnetic. This paper describes the design of two-dimensional (2D) FDTD simulation software for transverse magnetic (TM) ∂ ∂E H y polarization using Berenger's split-field perfectly matched layer εzx + σ E = (3) (PML) formulation. The software is developed using Matlab ∂tx zx ∂ x programming language. Numerical examples validate the software. ∂ Keywords—Finite difference time domain (FDTD) method, Ezy ∂H ε+ σ E = − x (4) perfectly matched layer (PML), split-filed formulation, transverse ∂ty zy ∂ y magnetic (TM) polarization. I. INTRODUCTION In order to solve these equations numerically, they are discretized according to finite differencing techniques. The HE finite-difference time-domain (FDTD) method is a central difference approximation is used in this case. For flexible and powerful solution tool for solving Maxwell’s T example, in equations (1) and (3), central differencing results equations [1-5]. Further, the efficient and accurate solution of in the following equations electromagnetic wave interaction problems in unbounded regions is one of the greatest challenges of the FDTD method. + −σ* () + δ µ Hn 1 () i+1 2, j = ey i1 2, j t Hn () i +1 2, j For such problems, an absorbing boundary condition (ABC) x x (5) −σ* () + δ µ must be introduced at the outer grid boundary to simulate the (1− e y i1 2, j t ) n+1 2()+ + + n + 1 2 () + + Ezx i1 2, j 1 2 E zy i1 2, j 1 2 extension of the grid to infinity. − σ* ()i+1 2, j δ x −En+1 2() i +1 2, j − 1 2 − E n + 1 2 () i + 1 2, j − 1 2 Recently, among a few important studies on ABC was J.P. y zx zy Berenger’s Perfectly Matched Layer (PML) method [6]. In the + −σ* () + + δ ε − n 1 2 ()+ + =x i1 2, j 1 2 t n 1 2 () + + PML, he created an artificial medium with magnetic Ezx i1 2, j 1 2 e Ezx i1 2, j 1 2 conductivity (σ*) that will make the boundary condition to −σ* () + + δ ε (6) ()1− e x i1 2, j 1 2 t work as wave absorber region. This paper describes the design −Hn() i, j + 1 2 − H n () i + 1, j + 1 2 σ* ()+ + δ y y of a two-dimensional (2D) FDTD simulation software for x i1 2, j 1 2 x transverse magnetic (TM) polarized incident wave using Berenger's split-field perfectly matched layer (PML) Based on the above formulation, a 2-D FDTD code has formulation. The software is developed using Matlab been written in Matlab programming language to simulate the programming language. fields of a plane wave source in lossy media. The formulation and the FDTD code are validated by checking the numerical II. TWO-DIMENSIONAL TM POLARIZATION results for homogeneous media against the analytical solution. The Maxwell’s curl equations as modified by Berenger are The code for 2D FDTD is shown in Appendix. expressed in their time-dependent form as, In order to test and validate the FDTD code, an electromagnetic wave source interacting with dielectric International Science Index, Computer and Information Engineering Vol:6, No:3, 2012 waset.org/Publication/5827 ε σ ∂ + cylinder ( r = 4.0, = 0.12) of radius 6 cm is simulated in this ∂H (EEzx zy ) 2 µx + σ * H = − (1) section, shown in Fig. 1. A 1 mW/cm plane wave is used as ∂ty x ∂ y source, and the frequency is setup to 2.5 GHz. The reason for using dielectric cylinder is there exist an analytical solution to this problem [7]. A +y-directed plane wave source : G. Akram is with the Faculty of Health Science & Biomedical Eng., , ezy(:,jebc+2) = ezy(:,jebc+2) + 61.4*sin(omega*n*dt) Universiti Teknologi Malaysia (UTM), 81310 Skudai, Johor, Malaysia (phone: 607-55-35785; fax: 607-55-66272; e-mail: akram@ fke.utm.my). is used to generate the incident wave at j = jebc + 2 and n Y. Jasmy is with the Faculty of Health Science & Biomedical Eng., = 1. Where jebc is thickness of the PML region, n is time step Universiti Teknologi Malaysia (UTM), 81310 Skudai, Johor, Malaysia. International Scholarly and Scientific Research & Innovation 6(3) 2012 360 scholar.waset.org/1307-6892/5827 World Academy of Science, Engineering and Technology International Journal of Computer and Information Engineering Vol:6, No:3, 2012 in FDTD code and dt is 5.0 psec. Fig. 2 shows a comparison of FDTD calculated results with analytic solution along the center axis o the cylinder. The simulation was made with a code attached in Appendix. Fig. 1 Schematic representation of the FDTD computational domain Fig. 3 Test and benchmark computational domains 50 Then, the local error of the computed field in Ω , due to analytical solution T FDTD + PML ( 16 ) reflections from the PML, is obtained by subtracting the field 45 FDTD + PML ( 8 ) at any point within ΩT at a given time step from the field at the corresponding point in ΩB. Here, Ez is used to define the error 40 n n n |E| e= E − E (8) locali, j z,, Ti,, j z B i j 35 where Ez,T and Ez,B are, respectively, the FDTD computed E- 30 fields within the test and benchmark domains. Further, the global error was defined as 25 5 10 15 20 25 30 35 40 45 n n n 2 Grid Position, I e= E − E (9) global∑∑ z,, Ti,, j z B i j Fig. 2 Waveform comparison of the FDTD results (with different i j PML thicknesses) and the analytical solution for a plane wave source In Fig. 4 and 5, different numbers of PML are used outside III. PROCEDURE FOR PAPER SUBMISSION the FDTD simulation region to test the efficiency of the PML In this section, various numerical simulations are performed ABC for the lossy media. The accuracy of the PML ABC is to illustrate the effectiveness of PML code [8]. Fig. 3 shows compared with that of standard second-order Mur ABC [9]. the two FDTD computational domains used in the The numbers of PML used are 16, 8 and 4, respectively. As is experiments: a test domain, ΩT, and the much larger evident from the result, 16 PML are good enough to absorb benchmark domain ΩB. By calculating the difference between most of the incident waves at the boundaries. the FDTD solutions in the two domains at each grid-point at each time-step, a measure of the spurious reflection caused by IV. CONCLUSION the test ABC is obtained. Initially, a 2-D test domain 100×50 The FDTD method is widely used because it is simple to cells long was examined. A square cell was used, with δ implement numerically. It provides a flexible means for = 0.015 m, and the time step was chosen based on the stability directly solving Maxwell’s time-dependent curl equations by criterion δt= δ / 2 c , where c is the speed of light in vacuum. using finite differences to discretize them. This paper In all the cases examined here, the excitation was a pulse International Science Index, Computer and Information Engineering Vol:6, No:3, 2012 waset.org/Publication/5827 describes the design of two-dimensional (2D) FDTD exhibiting a very smooth transition to zero, as used in [8], and simulation software for transverse magnetic (TM) polarized defined as follows, incident wave using Berenger's split-field perfectly matched 1 10− 15cos(π n / 20) + layer (PML) formulation. The software is developed using n n ≤ 40 = ()()π− π (7) Matlab programming language. The numerical results agree Ez, T 32 6cos 2n / 20 cos 3 n / 20 50,25 very well with the analytical results for homogeneous media. 0 n > 40 International Scholarly and Scientific Research & Innovation 6(3) 2012 361 scholar.waset.org/1307-6892/5827 World Academy of Science, Engineering and Technology International Journal of Computer and Information Engineering Vol:6, No:3, 2012 0 10 iefbc = ie + 2*iebc; jefbc = je + 2*jebc; ibfbc = iefbc + 1; -10 10 jbfbc = jefbc + 1; %********************************************** % Material parameters -20 10 %********************************************** media = 2; Mur ABC eps = [1.0 4.0]; -30 PML ABC (16 cell) 10 sig = [0.0 0.12]; Global Error Global PML ABC (8 cell) PML ABC (4 cell) mur = [1.0 1.0]; sim = [0.0 0.0]; -40 10 %********************************************** % Field arrays %********************************************** -50 10 ez = zeros(ibfbc,jbfbc); %fields in main grid 0 100 200 300 400 500 ezx = zeros(ibfbc,jbfbc); Time Step ezy = zeros(ibfbc,jbfbc); Fig. 4 Global error within a 100×50 cell two-dimensional TM test hx = zeros(iefbc,jefbc); hy = zeros(iefbc,jefbc); grid -5 %********************************************** x 10 2 % Updating coefficients %********************************************** 1.5 for i = 1:media eaf = dt*sig(i)/(2.0*epsz*eps(i)); ca(i) = (1.0-eaf)/(1.0+eaf); 1 cb(i) = dt/epsz/eps(i)/dx/(1.0+eaf); haf = dt*sim(i)/(2.0*muz*mur(i)); 0.5 da(i) = (1.0-haf)/(1.0+haf); db(i) = dt/muz/mur(i)/dx/(1.0+haf); 0 end %********************************************** -0.5 PML ABC ( 16 cell ) % Geometry specification (main grid) PML ABC ( 8 cell ) %********************************************** Normalized Reflection Along J =1 J Along Reflection Normalized -1 % Initialize entire main grid to free space caezx(1:ibfbc,1:jbfbc) = ca(1); -1.5 cbezx(1:ibfbc,1:jbfbc) = cb(1); 0 20 40 60 80 100 caezy(1:ibfbc,1:jbfbc) = ca(1); Grid Position, I cbezy(1:ibfbc,1:jbfbc) = cb(1); Fig.