1.38k likes | 2.65k Views
Finite Difference Time Domain Method (FDTD). FDTD: The Basic Algorithm. Maxwell’s Equations in the TIME Domain:. Equate Vector Components: Six E and H-Field Equations. 2D - TE. 2D - TM. 2-D Equations: Assume that all fields are uniform in y direction (i.e. d/dy = 0).
E N D
FDTD: The Basic Algorithm • Maxwell’s Equations in the TIME Domain:
2D - TE 2D - TM 2-D Equations: Assume that all fields are uniform in y direction (i.e. d/dy = 0)
1-D Equations: Assume that all fields are uniform in y and x directions (i.e. d/dy =d/dx= 0) 1D - TE 1D - TM
Discretize Objects in Space using Cartesian Grid 3D Discretization 2D Discretization z x 1D Discretization
Define Locations of Field Components: FDTD Cell called Yee Cell • Finite-Difference • Space is divided into small cells One Cell: (dx)(dy)(dz) • E and H components are distributed in space around the Yee cell (note: field components are not collocated) FDTD: Yee, K. S.: Numerical solution of initial boundary value problems involving Maxwell's equations in isotropic media. IEEE Transactions on Antennas Propagation, Vol. AP-14, pp. 302-307, 1966.
Replace Continuous Derivatives with Differences • Derivatives in time and space are approximated as DIFFERENCES
Solution then evolves by time-marching difference equations • Time is Discretized • One Time Step: dt • E and H fields are distributed in time • This is called a “leap-frog” scheme.
Yee Algorithm Definitions of spatial meshing and time step Initialization Iteration n Calculation of En from Hn-1/2 and En-1 Calculation of Hn+1/2 from En and Hn-1/2 n=n+1 N=Nbiteration End
1-D FDTD Assuming that field values can only vary in the z-direction (i.e. all spatial derivatives in x and z direction are zero), Maxwell’s Equations reduce to: z Hy Ex e(z), m(z)
1-D FDTD – Staggered Grid in Space Interleaving of the Ex and Hy field components in space and time in the 1-D FDTD formulation Time plane
1-D FDTD Replace all continuous derivatives with central finite differences Note: finite differences are 2nd order in time and space
1-D FDTD Replace all continuous derivatives with finite differences Solve for
1-D FDTD Replace all continuous derivatives with finite differences and increment time by one half time step Solve for
1-D FDTD After some simple algebra:
1-D FDTD – Staggered Grid in Space Interleaving of the Ex and Hy field components in space and time in the 1-D FDTD formulation i=1 i=2 i=3 i=4 z=0 z=dz z=2*dz z=3*dz i=1 i=2 i=3 i=4 z=dz/2 z=3dz/2 z=5*dz/2 z=7*dz/2
1-D FDTD – Staggered Grid in Space Interleaving of the Ex and Hy field components in space and time in the 1-D FDTD formulation i=1 i=2 i=3 i=4 z=0 z=dz z=2*dz z=3*dz i=1 i=2 i=3 i=4 z=dz/2 z=3dz/2 z=5*dz/2 z=7*dz/2
1-D FDTD – Basic Core of Code for n=2:Nt % all time steps for i=2:Nx-1 % all interior nodes Loop through all of the E -grid end Loop through all time steps Note: H uses the new values of E. This is Equivalent to incrementing by ½ a time step for i=2:Nx-1 % all interior nodes Loop through all of the H -grid end end
SOME OPEN QUESTIONS?? • How do we determine what Dt and Dz should be? • How do we implement real sources? • How do we simulate open boundaries? • How accurate is the solution?
Numerical Stability • Like all iterative algorithms FDTD has the possibility of not converging on a solution. This usually results in the algorithm going unstable and producing ever increasing field values over time. When does this happen? 1-D 2-D 3-D
Numerical Dispersion • In real life plane waves traveling in a homogenous medium propagate at the speed of light in that medium independent of frequency or propagation direction. However, due to our approximation of continuous derivatives with finite differences if we launch a plane wave in FDTD it will actually propagate at a slightly different speed than that of light. Moreover, and more disturbing, the propagation velocity will depend on the frequency of the plane wave and its direction of propagation with respect to the FDTD grid. This effect is known as numerical dispersion. The effect has been well studied and mathematically quantified.
Numerical Dispersion Continuous Plane Wave 1-D FDTD Magic time step! 3-D FDTD At optimal time step
Implementation of Boundary Conditions 1D Boundary condition for a perfectly electrically conducting (PEC) material Absorbing/open boundary condition in 1-D Space-time-extrapolation of the first order For the magic time-step a plane wave needs one time steps to travel over one grid cell with the size ∆z Space-time-extrapolation of the first order
2D - TM 2D - TE 2-D Equations: Assume that all fields are uniform in y direction (i.e. d/dy = 0)
2D - TM dx E-GRID H-GRID dx Ex (i+1,j+1) Ex (i-1,j+1) (i,j+1) Ex Ex Hy Hy Ez Ez Ez Hy Hy Ez Ez Ez Ex Ex (i,j) (i,j) (i+1,j) (i-1,j) (i-1,j) Ex (i+1,j) (i-1,j) Ex Hy Hy Hy Hy dz Ez Ez dz Ez Ez Ez Ez Ex (i-1,j-1) (i,j-1) Ex (i-1,j-1) (i,j-1) (i+1,j-1) Ex Ex
2D – TM: Derive FDTD Equations (i,,j+1) (i+1,j+1) (i-1,j+1) Ex Ex Hy Hy Ez Ez Ez Ex Ex (i,j) (i+1,j) (i-1,j) Hy Hy dz Ez Ez Ez Ex Ex (i-1,j-1) (i,j-1) (i+1,j-1)
2D – TM: Derive FDTD Equations H-GRID dx Ex Ex Hy Hy Ez Ez Ez (i,j) (i-1,j) Ex (i+1,j) (i-1,j) Ex Hy Hy dz Ez Ez Ez (i-1,j-1) (i,j-1) Ex Ex Solve for
2-D FDTD – Basic Core of Code for n=2:Nt % all time steps for i=2:Nx-1 % all interior nodes Loop through all of the E -grid end for i=2:Nx-1 % all interior nodes Loop through all of the H -grid end end
Numerical Dispersion 2D case Using same procedure as for the 1D case we obtain:
Source Modeling 1. We can implement a “hard” source by forcing the fields to predefined values at specific nodes in the FDTD grid. For example:
Source Modeling: Soft SourcesScattered Field Formulation 1. We can implement a “soft” source by first reformulating Maxwell’s equations for only the scattered field. (1) (2) (3) (1)-(2): Use (3) in above and a little algebra:
2DScattered Field TM TE
1DScattered Field TM TE
1-D FDTD Scattered Fields (TE) EXAMPLE INCIDENT FIELD let In FDTD
1-D FDTD – Basic Core of 1D Scattered Field Code (non-magnetic) for n=2:Nt % all time steps for i=2:Nx-1 % all interior nodes If tau<0 Loop through all of the E -grid else end end for i=2:Nx-1 % all interior nodes Loop through all of the H -grid end end
Implementation of Boundary Conditions 2D Boundary condition for a perfectly electrically conducting (PEC) material Absorbing/open boundary condition in 1-D Many different methods • Interpolation/Extrapolation in time and space (Liaos) • One way way equation (Mur) • Artificial absorbing boundaries (PMLs)
One Way Wave Equation If we could implement the one way equations on a FDTD boundary we would have the perfect ABC (i.e. zero reflection. Unfortunately we can’t do that since we don’t know how to implement the square root operator. So we need to approximate. First order Taylor series expansion
Absorbing Boundary Conditions 2D: Mur 1st order One-way Wave Equations: They approximately represent waves traveling in only one direction. y=h y=0 x=0 x=w
Absorbing Boundary Conditions 2D: Mur One-way Wave Equations: They approximately represent waves traveling in only one direction. y=h y=0 x=0 x=w
Absorbing Boundary Conditions 2D: 1st Order Mur 2D 1st Order Mur Equation y=h y=0 x=0 x=w