Chapter 6 Maxwell’s Equations and the Yee Algorithm CHAPTER OBJECTIVES: • Fundamental Yee’s leap-frog algorithm; • Maxwell’s equations and its dimension reduction; • Techniques in improving computational cost. 6.0 INTRODUCTION In this chapter, we discuss the electromagnetic field analysis, the algorithm introduced by Kane Yee in 1966. Yee chose a geometric relation for his spatial sampling of the vector components of the electric and magnetic fields that represent the differential and integral forms of Maxwell’s equations. 6.1 MAXWELL’S EQUATIONS IN THREE DIMENSIONS Consider a region of space that has no electric or magnetic current sources, but may have materials that absorb electric or magnetic field energy. Then, the time-dependent Maxwell’s equations are given in differential and integral form by Faraday’s Law: v v v ∂B = −∇ × E − M ∂t v v v v v v ∂ B ⋅ d A = − E ⋅ d l − M ∫l ∫∫A ⋅ dA ∂t ∫∫ A (6.1a) (6.1b) Ampere’s Law: v v v ∂D = ∇×H − J ∂t v v v v v v ∂ D ⋅ d A = − H ⋅ d l − J ∫l ∫∫A ⋅dA ∂t ∫∫ A (6.2a) (6.2b) Gauss’ Law for Electric Field: v ∇⋅D = 0 v v ∫∫ D ⋅ dA = 0 A Gauss’ Law for the Magnetic Field: (6.3a) (6.3b) v ∇⋅B = 0 v v ∫∫ B ⋅ dA = 0 (6.4a) (6.4b) A where, v Ev : electric field (volts/meter) Dv : electric flux density (coulombs / meter2) H v : magnetic field (amperes/meter) Bv : magnetic flux density (webers / meter2) Ev: differential normal vector that characterized surface A (meter2) dl : differential length vector that characterizes contour l (meters) → J: electric current density (amperes/sq.meter) → M : equivalent magnetic current density (volts / meter2) A: arbitrary 3-dimensional surface l: closed contour that bounds surface A We also have relations v v v D = εE = ε 0ε r E v v v B = µH = µ0 µ r H → (6.5a) (6.5b) → It has to be noted that J and M can act as independent sources of E- and H- field energy. v v v J = J source + σE v v v M = M source + σ * H (6.6a) (6.6b) In linear, isotropic, non-dispersive, lossy materials, we get the following equations: v v 1 v v 1 ∂H = − ∇ × E − (M source + σ * H ) ∂t µ µ v v 1 v v ∂E 1 = ∇ × H − (J source + σE ) ∂t ε ε where σ : electric conductivity (siemens / meter) σ * : equivalent magnetic loss (ohms / meter) Or, (6.7) (6.8) ∂H x ∂E z 1 ∂E = y − − (M soursex + σ ∗ H x ) ∂t ∂y µ ∂z ∂H y ∂E x 1 ∂E = z − − (M soursey + σ ∗ H v ) ∂t µ ∂x ∂z ∂ E ∂H z 1 ∂E y = x − − (M soursez + σ ∗ H z ) ∂t ∂x µ ∂y ∂E x 1 ∂H z ∂H y = − − (J soursex + σ E x ) ∂t ∂z ε ∂y ∂E y 1 ∂H x ∂H z = − − (J soursey + σ E v ) ε ∂z ∂t ∂x ∂E z 1 ∂H y ∂H x = − − (J soursez + σ E z ) ∂t ∂y ε ∂x (6.9a) (6.9b) (6.9c) (6.10a) (6.10b) (6.10c) This system of six coupled partial differential equations forms the basis of the FDTD numerical algorithm for electromagnetic wave interactions with general threedimensional objects. 6.2 REDUCTION TO TWO DIMENSIONS Let us assume that the structure being modeled extends to infinity in the z-direction with no change in the shape or position of its transverse cross section. If the incident wave is also uniform in the z-direction, then all partial derivatives of the fields with respect to z must equal zero. Under these conditions, the full set of Maxwell’s curl equations reduces to: ∂H x 1 ∂E z = − − (M soursex + σ ∗ H x ) ∂t µ ∂y ∂H y 1 ∂E z = − (M soursey + σ ∗ H v ) ∂t µ ∂x ∂H z 1 ∂E x ∂E y = − − (M soursez + σ ∗ H z ) µ ∂y ∂t ∂x ∂E x 1 ∂H z = − (J soursex + σE x ) ∂t ε ∂y ∂E y 1 ∂H z − − (J soursey + σ Ev ) ε ∂x ∂t ∂E z 1 ∂H y ∂H x = − − (J soursez + σE z ) ∂t ∂y ε ∂x = (6.11a) (6.11b) (6.11c) (6.12a) (6.12b) (6.12c) TMZ MODE Grouping the above six equations according to field vector components, and designating the set of field components with transverse-magnetic mode with respect to z (TMZ) in two-dimensions, we get: ∂H x 1 ∂E z = − − (M soursex + σ ∗ H x ) ∂t µ ∂y ∂H y 1 ∂E = z − (M soursey + σ ∗ H v ) µ ∂x ∂t ∂E z 1 ∂H y ∂H x = − (J soursez + σE z ) − ∂t ∂y ε ∂x (6.13a) (6.13b) (6.13c) TEZ MODE Now, let us group the other three equations. This set of field components is designated as transverse-electric mode with respect to z (TEZ) in two-dimensions. ∂Ex 1 ∂H z = − (J soursex + σEx ) ∂t ε ∂y ∂Ey 1 ∂H z = − − (J soursey + σEv ) ∂t ε ∂x ∂H z 1 ∂Ex ∂E y = − − (M soursez + σ ∗H z ) ∂t µ ∂y ∂x (6.14a) (6.14b) (6.14c) We can observe that the TMz and TEz modes contain no common field vector components. These two modes constitute the two possible ways that two-dimensional electromagnetic wave interaction problems can be setup for the case of zero partial derivatives in the z-direction. We note that the TEz mode sets up the E-field lines in a plane perpendicular to the infinitely long axis (the z-axis) of the structure. On the other hand, the TMz mode sets up E-field lines only parallel to the z-axis. These lines cannot be perpendicular to the structure surface and therefore must be negligible at the surface if it is metallic. This diminishes or eliminates bound or guided near-surface propagating waves for metal surfaces. The presence or absence of surface-type waves can have important implications for scattering and radiation problems. 6.3 REDUCTION TO ONE DIMENSION X-DIRECTED, Z-POLARIZED TEM MODE Assume that neither the electromagnetic field nor the modeled geometry has any variation in the y-direction. Then, the two-dimensional TMz mode of Maxwell’s equations in rectangular coordinates reduces to: ∂H x 1 = − (M soursex + σ ∗ H x ) ∂t µ ∂H y 1 ∂E = z − (M soursey + σ ∗ H v ) µ ∂x ∂t ∂E z 1 ∂H y − (J soursez + σE z ) = ∂t ε ∂x (3.15a) (3.15b) (3.15c) ∂H x =0 ∂t at t = 0. We designate the mode determined by this set as an x-directed, z-polarized transverse electromagnetic (TEM) wave in one-dimension: Assuming that Msourcex = 0 for all time and Hx = 0 at t = 0, then it is implied that ∂H y 1 ∂E z − (M soursey + σ ∗ H v ) µ ∂x ∂t ∂E z 1 ∂H y − (J soursez + σE z ) = ∂t ε ∂x = (6.16a) (6.16b) X-DIRECTED, Y-POLARIZED TEM MODE Again assuming that all partial derivatives with respect to y equal zero, the twodimensional TEz mode of Maxwell’s equations in rectangular coordinates reduces to: ∂E x 1 = − (J soursex + σE x ) ∂t ε ∂E y 1 ∂H z = − − (J soursey + σ E v ) ε ∂x ∂t ∂H z 1 ∂E y = − − (M soursez + σ ∗ H z ) ∂t µ ∂x (6.17a) (6.17b) (6.17c) ∂E x = 0 at t=0. ∂t We designate the mode determined by this set as an x-directed, y-polarized TEM wave in one-dimension: Assuming that Jsourcex = 0 for all time and Ex = 0 at t = 0, it is implied that ∂E y ∂t = 1 ∂H z − (J soursey + σEv ) − ε ∂x ∂H z 1 ∂E y = − − (M soursez + σ ∗ H z ) ∂t µ ∂x (6.18a) (6.18b) 6.4 EQUIVALENCE TO THE WAVE EQUATION IN ONE DIMENSION Consider the one-dimensional TEM mode given by eq. 16. From this, we derive a homogenous, lossless, 1-dimensional scalar wave equation for Hy, assuming that Msourcey = Jsourcez = 0 and σ ∗ = σ = 0. First, lets take the partial derivative of (6.16a): ∂ ∂H y 1 ∂E z = . ∂t ∂t µ ∂x ∂ 2 H y 1 ∂ 2 Ez → = µ ∂t∂x ∂t 2 (3.19a) Now, taking the partial space derivative (6.16b): ∂ ∂E z 1 ∂H y = . ∂t ∂t ε ∂x 2 ∂ 2 Ez 1 ∂ H y → = ∂x∂t ε ∂x 2 (3.19b) This leads to ∂2H y ∂t 2 2 ∂2H y 1 1 ∂ Hy 2 = . . =c µ ε ∂x 2 ∂t 2 (3.19c) To obtain the wave equation for Ez, we take the partial time derivative of eq. 16b, again assuming that all sources and loss terms equal zero: ∂ ∂E z 1 ∂H y = . ∂t ∂t ε ∂x 2 ∂ 2 Ez 1 ∂ H y → = ε ∂t∂x ∂t 2 (6.20a) Now, taking the partial space derivative of (6.16a): ∂ ∂H y 1 ∂E z = . ∂x ∂t µ ∂x ∂ 2 H y 1 ∂ 2 Ez → = ∂x∂t µ ∂x 2 (6.20b) Upon substituting the x-t derivative of H y in (6.20b), we obtain 2 ∂ 2 Ez 1 1 ∂ 2 Ez 2 ∂ Ez = = c . . ε µ ∂x 2 ∂t 2 ∂x 2 (6.20c) 6.5 THE YEE ALGORITHM BASIC IDEAS In 1966, Kane Yee originated a set of finite-difference equations for the time-dependent Maxwell’s curl equation system for the lossless materials case σ ∗ = 0 and σ = 0. Main Features: 1. The Yee algorithm solves for both electric and magnetic fields in time and space using the coupled Maxwell’s curl-equations, rather than solving for only one of the fields using a wave equation. • This is analogous to the combined-field integral equation formulation of MM, wherein both E and H boundary conditions are enforced on the surface of a material structure. • Using both E and H information, the solution is more robust that using either alone. Both electric and magnetic material properties can be modeled in a straightforward manner. • Features unique to each field such as tangential H singularities near edges and corners, azimuthal H singularities near thin wires, and radial E singularities near points, edges, and thin wires can be individually modeled if both electric and magnetic fields are available. 2. The Yee algorithm centers its E and H components in three-dimensional space so that every E component is surrounded by four circulating H components, and every H component is surrounded by four circulating E components. Fig. 6.1 Position of the electric and magnetic field vector components about a cubic unit cell of the Yee space lattice. This provides a beautifully simple picture of three-dimensional space being filled by an interlinked array of Faraday’s Law and Ampere’s Law contours. We have the following attributes of the Yee space lattice: • The finite-difference expressions for the space derivatives used in the curl operators are central-difference in nature and second-order accurate. • Continuity of tangential E and H is naturally maintained across an interface of dissimilar materials if the interface is parallel to one of the lattice coordinate axes. • The location of the E and H components in the Yee space lattice and the centraldifference operations on these components implicitly enforce the two Gauss’ Law relations. Thus, the Yee mesh is divergence-free with respect to its E and H fields in the absence of free electric and magnetic charge. 3. The Yee algorithm centers its E and H components in time in what is termed a leapfrog arrangement. • Leapfrog time-stepping is fully explicit thereby avoiding problems involved in with simultaneous equations and matrix inversion. • The finite-difference expressions for the time derivatives are central-difference in nature and second-order accurate. The time-stepping algorithm is non-dissipative. That is, numerical wave modes propagating in the mesh do not spuriously decay due to a nonphysical artifact of time-stepping algorithm. • FINITE DIFFERENCES AND NOTATION Yee denoted a space point in a uniform, rectangular lattice as (i,j,k) = (i ∆ x, j ∆ y, k ∆ z) (6.21) Here, ∆ x, ∆ y, ∆ z are respectively the lattice space increments in the x, y and z-axes, and i, j and k are integers. We denote any function u of space and time evaluated at a discrete point in time as u(i ∆ x, j ∆ y, k ∆ z, n ∆ t) = u in, j ,k (6.22) where ∆ t is the time increment, assumed uniform over the observation interval, and n is an integer. Yee used centered finite-difference (central-difference) expressions for the space and time derivatives that are both simply programmed and second-order accurate in the space and time increments. [ u in+1 / 2, j ,k − u in−1 / 2, j ,k ∂u 2 (i∆x, j∆y, k∆z, n∆t ) = + O (∆x ) ∆x ∂x ] (6.23) Yee’s expression for the first time partial derivative of u, evaluated at the fixed space point (i,j,k) follows by analogy: [ u in, +j ,1k/ 2 − u in, −j 1,k/ 2 ∂u 2 (i∆x, j∆y, k∆z, n∆t ) = + O (∆t ) ∆t ∂t ] (6.24) Now, the ± 1 / 2 increment is in the n superscript (time coordinate) of u, denoting a time finite-difference over ± 1 / 2 ∆t . Yee chose this notation because he wished to interleave his E and H components in time at intervals of ± 1 / 2 ∆t for purposes of implementing a leapfrog algorithm. FINITE-DIFFERENCE EXPRESSIONS FOR MAXWELL’S EQUATIONS IN THREE DIMENSIONS We now apply the above ideas and notation to achieve a numerical approximation of the Maxwell’s curl equations in 3-dimensions given by the system of equations of 9 and 10. Consider the Ex field-component eq.10a, ∂E x 1 ∂H z ∂H y − J soursex + σ E x = − ε ∂y ∂z ∂t ( ) (3.10a) Consider a typical substitution of central differences for the time and space derivatives in (6.10a), for example at Ex(i,j+1/2,k+1/2,n). Here, we have initially: E n +1 / 2 x i , j +1 / 2 ,k +1 / 2 −E ∆t n −1 / 2 x i , j +1 / 2 ,k +1 / 2 = 1 ε i , j +1 / 2,k +1 / 2 n n n H zn − H z i , j ,k +1 / 2 H y i , j +1 / 2,k +1 − H y i , j +1 / 2,k i , j +1,k +1 / 2 − ∆y ∆z n n − J sourcex |i , j +1 / 2,k +1 / 2 −σ i , j +1 / 2,k +1 / 2 E x |i , j +1 / 2,k +1 / 2 (6.25) Since Ex values at time-step n are not assumed to be stored in the computer's memory, we need some way to estimate such terms. A very good way is as follows, using what is called a semi-implicit approximation: n x i , j +1 / 2, k +1 / 2 E | = E x |in,+j1+/12/ 2,k +1 / 2 + E x |in,−j1+/12/ 2,k +1 / 2 2 (6.26) Here, Ex values at time-step n are assumed to be simply the arithmetic average of the stored values of Ex at the time-step n-1/2 and the yet-to-be computed new values of Ex at time-step n+1/2. Substituting (6.26) into (6.25) after multiplying both sides by ∆t , we obtain E x |in,+j1+/12/ 2,k +1/ 2 − E x |in,−j1+/12/ 2,k +1/ 2 = ∆t ε i , j +1/ 2,k +1/ 2 H z |in, j +1,k +1/ 2 − H z |in, j ,k +1/ 2 H y |in, j +1/ 2,k +1 − H y |in, j +1/ 2,k − ∆z ∆y n +1 / 2 n −1 / 2 | | E E + x i , j +1 / 2,k +1 / 2 − J sourcex |in, j +1/ 2,k +1/ 2 −σ i , j +1/ 2,k +1/ 2 . x i , j +1/ 2,k +1/ 2 2 (6.27) Rearrangement leads to σ σ i , j +1 / 2 , k +1 / 2 ∆t ∆t E x |in,+j1+/12/ 2 ,k +1 / 2 = 1 − i , j +1 / 2, k +1 / 2 E x | in,−j1+/12/ 2 , k +1 / 2 1 + 2ε i , j +1 / 2, k +1 / 2 2ε i , j +1 / 2 , k +1 / 2 H z | in, j +1,k +1 / 2 − H z | in, j , k +1 / 2 H y |in, j +1 / 2 , k +1 − H y |in, j +1 / 2 ,k ∆t − J sourcex | in, j +1 / 2 , k +1 / 2 + − ∆z ∆y ε i , j +1 / 2 , k +1 / 2 (6.28) σ i , j +1 / 2 , k +1 / 2 ∆ t Dividing both sides by 1 + 2 ε i , j +1 / 2 , k +1 / 2 relation for E x |in,+j1+/12/ 2,k +1 / 2 : yields the desired explicit time-stepping σ i , j +1 / 2,k +1 / 2 ∆t 1 − ε 2 i , j +1 / 2 , k +1 / 2 E x |in,+j1+/12/ 2,k +1 / 2 = E x |in,−j1+/12/ 2,k +1 / 2 + t σ ∆ i , j +1 / 2 , k +1 / 2 1 + 2ε i , j +1 / 2,k +1 / 2 ∆t n n n n ε i , j +1 / 2,k +1 / 2 H z |i , j +1,k +1 / 2 − H z |i , j ,k +1 / 2 H y |i , j +1 / 2,k +1 − H y |i , j +1 / 2,k − − J sourcex |in, j +1 / 2,k +1 / 2 . σ ∆t ∆y ∆z 1 + i , j +1 / 2,k +1 / 2 ε 2 i , j + 1 / 2 , k + 1 / 2 (6.29a) Similarly, we can derive finite-difference expressions based on Yee’s algorithm for the Ey and Ez field components given by Maxwell’s equations (6.10b) and (6.10c). Referring again to Fig.1, we have the following time-stepping expressions for the E components normal to the remaining visible faces of the unit cell: σ i −1 / 2, j +1,k +1 / 2 ∆t 1 − ε 2 i −1 / 2 , j +1,k +1 / 2 n −1 / 2 E y |in−+11//22, j +1,k +1 / 2 = E y |i −1 / 2, j +1,k +1 / 2 + σ t ∆ i −1 / 2 , j +1,k +1 / 2 1 + 2ε i −1 / 2 , j +1,k +1 / 2 ∆t n n n n H x |i −1 / 2, j +1,k +1 − H x |i −1 / 2, j +1,k H z |i , j +1,k +1 / 2 − H z |i −1, j +1,k +1 / 2 ε i −1 / 2, j +1,k +1 / 2 − − J sourcey |in−1 / 2, j +1,k +1 / 2 σ t ∆ ∆z ∆x 1 + i −1 / 2, j +1,k +1 / 2 ε 2 i j k − 1 / 2 , + 1 , + 1 / 2 (6.29b) σ i −1 / 2, j +1 / 2,k +1 ∆t 1 − 2 ε i j k − 1 / 2 , + 1 / 2 , + 1 E | n −1 / 2 E z | in−+11//22, j +1 / 2,k +1 / 2 = z i −1 / 2 , j +1 / 2 , k +1 + σ i −1 / 2, j +1 / 2, k +1 ∆t 1 + 2 ε i j k − 1 / 2 , + 1 / 2 , + 1 ∆t n n n n H y | i , j +1 / 2, k +1 − H y | i −1, j +1 / 2, k +1 H x | i −1 / 2, j +1,k +1 − H x | i −1 / 2, j ,k +1 ε i −1 / 2, j +1 / 2, k +1 . − J sourcez | in−1 / 2, j +1 / 2, k +1 − σ ∆t ∆y ∆x 1 + i −1 / 2, j +1 / 2, k +1 2 ε i −1 / 2 , j +1 / 2 , k +1 (6.29c) We have the following time-stepping expression for the Hx component located at the upper right corner of the unit cell: σ ∗i −1/ 2, j +1,k +1∆t 1 − 2 µ i −1 / 2, j +1,k +1 n H x |in−+11/ 2, j +1,k +1 = H x |i −1/ 2, j +1,k +1 + ∗ σ i −1/ 2, j +1,k +1∆t 1 + 2µ i −1 / 2, j +1,k +1 ∆t E y |in−+11//22, j +1,k +3 / 2 −E y |in−+11//22, j +1,k +1/ 2 E y |in−+11//22, j +3 / 2,k +1 −E y |in−+11//22, j +1/ 2,k +1 − µi −1/ 2, j +1,k +1 ∆ z y ∆ σ ∗i −1/ 2, j +1,k +1∆t n + 1 / 2 1+ − M sourcex |i −1/ 2, j +1,k +1 2 µ i −1 / 2, j +1,k +1 (6.30a) Similarly, we have the following time-stepping expression for the Hy component located at the upper front corner of the unit cell: σ ∗i, j +1/ 2,k +1∆t 1 − µ 2 i , j +1 / 2,k +1 n H y |in,+j1+1/ 2,k +1 = H y |i , j +1/ 2,k +1 + ∗ σ i , j +1/ 2,k +1∆t 1 + 2µ i , j +1 / 2,k +1 ∆t E |n+1/ 2 E |n+1/ 2 −E |n+1/ 2 −Ex |in,+j1+/12/ 2,k +1/ 2 z i +1/ 2, j +1/ 2,k +1 z i +1/ 2, j +1/ 2,k +1 − x i, j +1/ 2,k +3 / 2 µi, j +1/ 2,k +1 x z ∆ ∆ n +1 / 2 σ ∗i, j +1/ 2,k +1∆t − M sourcey |i , j +1 / 2,k +1 1 + 2µ i , j +1 / 2,k +1 (6.30b) Finally, we have the following time-stepping expression for the Hz component located at the right front corner of the unit cell: σ ∗i, j +1,k +1/ 2 ∆t 1 − µ 2 i , j +1,k +1 / 2 n H z |in,+j1+1,k +1/ 2 = H y |i, j +1/ 2,k +1 + ∗ σ i, j +1,k +1/ 2 ∆t 1 + 2µ i , j +1,k +1 / 2 ∆t n +1 / 2 E |n+1/ 2 E y |in++11//22, j +1,k +1/ 2 −E y |in−+11//22, j +1,k +1/ 2 x i , j +3 / 2,k +1 / 2 − E x |i , j +1 / 2,k +1 / 2 − µi, j +1,k +1/ 2 ∆y ∆x σ ∗i, j +1,k +1/ 2 ∆t n+1 / 2 − M sourcez |i, j +1,k +1/ 2 1 + 2µ i , j +1,k +1 / 2 (6.30c) At any given time step, the computation of a field vector can proceed either one point at a time, or, if p parallel processors are employed concurrently, p points at a time. SPACE REGION WITH A CONTINUOUS VARIATION OF MATERIAL PROPERTIES To implement the finite-difference systems of (6.29) and (6.30) for a region having a continuous variation of material properties with spatial position, it is desirable to define and store the following constant updating coefficients for each field vector component before the time-stepping begins: Updating Coefficients at the General E-field Component Location (i,j,k): σ i , j ,k ∆t σ i , j ,k ∆t 1 + C a |i , j ,k = 1 − (6.31a) 2 ε 2 ε i , j , k i , j , k ∆t σ i , j ,k ∆t 1 + Cb1 |i , j ,k = (6.31b) ε ∆ 2 ε i , j , k 1 i , j , k ∆t Cb 2 |i , j ,k = ε ∆ i , j , k 2 σ i , j ,k ∆t 1 + 2 ε i , j , k (6.31c) Updating Coefficients at the General H-field Component Location (i,j,k): σ ∗i , j ,k ∆t σ ∗i , j ,k ∆t 1 + (6.32a) Da |i , j ,k = 1 − 2 µ 2 µ , , , , i j k i j k ∗ ∆t σ i , j ,k ∆t 1 + Db1 |i , j ,k = (6.32b) µ ∆ 2 µ , , 1 , , i j k i j k ∗ ∆t σ i , j ,k ∆t 1 + Db 2 |i , j ,k = (6.32c) µ ∆ 2 µ , , 2 , , i j k i j k In (6.31) and (6.32), ∆ 1 and ∆ 2 denote the two possible lattice space increments used for the finite differences in each field-component calculation. The finite-difference expressions of (6.29) can now be rewritten more simply as: H z |in, j +1,k +1/ 2 −H z |in, j ,k +1/ 2 E x |in,+j1+/12/ 2,k +1/ 2 = Ca ,Ex |i , j +1/ 2,k +1/ 2 E x |in,−j1+/12/ 2,k +1/ 2 +Cb,Ex |i , j +1/ 2,k +1/ 2 + H y |in, j +1/ 2,k −H y |in, j +1/ 2,k +1 n − J | ∆ sourcex i , j + 1 / 2 , k + 1 / 2 (6.33a) H x |in−1/ 2 , j +1,k +1 −H x |in−1/ 2 , j +1,k E y |in−+11//22, j +1,k +1/ 2 = Ca,Ey |i −1/ 2, j +1,k +1/ 2 E y |in−−11//22, j +1,k +1/ 2 +Cb,Ey |i −1/ 2, j +1,k +1/ 2 + H z |in−1, j +1,k +1/ 2 −H z |in, j +1,k +1/ 2 − J sourcey |in−1/ 2, j +1,k +1/ 2 ∆ (6.33b) H y |in, j +1/ 2 ,k +1 −H y |in−1, j+1/ 2 ,k +1 Ez |in−+11//22, j +1/ 2,k +1 = Ca,Ez |i −1/ 2, j +1/ 2,k +1 E z |in−−11//22, j +1/ 2,k +1 +Cb,Ez |i −1/ 2, j +1/ 2,k +1 + H x |in−1/ 2, j ,k +1 −H x |in−1/ 2, j +1,k +1 − J sourcez |in−1/ 2, j +1/ 2,k +1 ∆ (6.33c) Te finite-difference expressions of (6.30) can now be rewritten more simply as H x |in−+11/ 2, j +1,k +1 = Da , Hz |i −1 / 2, j +1,k +1 H z |in−1 / 2, j +1,k +1 + Db, Hz E y |in−+11//22, j +1,k +3 / 2 −E y |in−+11//22, j +1,k +1 / 2 |i −1 / 2, j +1,k +1 + E z |in−+11//22, j +1 / 2,k +1 − E z |in−+11//22, j +3 / 2,k +1 n +1 / 2 − M sourcex |i −1 / 2 , j +1,k +1 ∆ (6.34a) H y |in,+j1+1 / 2,k +1 = Da , Hy |i , j +1 / 2 ,k +1 H y |in, j +1 / 2,k +1 + Db, Hy |i , j +1 / 2,k +1 E z |in++11//22, j +1/ 2 ,k +1 −E z |in−+11//22, j +1/ 2 ,k +1 + E x |in,+j1+1/ 2/ 2 ,k +1 / 2 − E x |in,+j1+1/ 2/ 2,k + 3 / 2 n +1 / 2 − M | ∆ sourcey i j + k + , 1 / 2 , 1 (6.34b) Ex | −E x | n + n + 1 / 2 1 / 2 + E y |i −1 / 2, j +1,k +1 / 2 − E y |i +1 / 2, j +1,k +1 / 2 n +1 / 2 − M sourcez |i , j +1,k +1 / 2 ∆ n+1 / 2 i , j +3 / 2 ,k +1 / 2 n +1 z i , j +1,k +1 / 2 H | = Da , Hz |i , j +1,k +1 / 2 H | n z i , j +1,k +1 / 2 + Db, Hz |i , j +1,k +1 / 2 n+1 / 2 i , j +1/ 2 ,k +1 / 2 (6.34c) SPACE REGION WITH A FINITE NUMBER OF DISTINCT MEDIA For a space region with a finite number of media having distinct electrical properties, the computer storage requirement can be further reduced. This can be done by defining an integer array, MEDIA (i, j, k), for each set of field-vector components. This array stores an integer “pointer” at each location of such a field component in the space lattice, enabling the proper algorithm coefficients to be extracted. For this case, the finitedifference expressions of (6.33) can be rewritten more simply as m = MEDIAEx |i , j +1 / 2,k +1 / 2 n +1 / 2 x i , j +1 / 2 , k +1 / 2 E | = C a (m )E | n −1 / 2 x i , j +1 / 2 , k +1 / 2 (6.35a) H z | in, j +1,k +1 / 2 − H z | in, j ,k +1 / 2 +C b (m ). n n + H |n − − ∆ H | J | y i , j +1 / 2 , k y i , j +1 / 2 , k +1 sourcex i , j +1 / 2 , k +1 / 2 m = MEDIAEy |i −1 / 2, j +1,k +1 / 2 (6.35b) H x | in−1 / 2, j +1, k +1 − H x | in−1 / 2, j +1, k E y |in−+11//22, j +1, k +1 / 2 = C a (m )E y | in−−11//22, j +1, k +1 / 2 +C b (m ). n n + H |n H | J | − − ∆ z i −1, j +1, k +1 / 2 z i , j +1, k +1 / 2 sourcey i −1 / 2 , j +1, k +1 / 2 m = MEDIAEz |i −1 / 2, j +1,k +1 n +1 / 2 z i −1 / 2 , j +1 / 2 , k +1 E | = C a (m )E | n −1 / 2 z i −1 / 2 , j +1 / 2 , k +1 (6.35c) H y | in, j +1 / 2, k +1 − H y | in−1, j +1 / 2, k +1 +C b (m ). n n + H |n H | J | − − ∆ x i −1 / 2 , j , k +1 x i −1 / 2 , j +1, k +1 sourcex i −1 / 2 , j +1 / 2 , k +1 The finite-difference expressions of (6.34) can be written more simply as: m = MEDIAHx |i −1 / 2, j +1,k +1 (6.36a) Ey | −E y | H x | in−+11/ 2, j +1, k +1 = D a (m ) ⋅ H x | in−1 / 2, j +1, k +1 + Db (m ). n +1 / 2 n +1 / 2 + E | n +1 / 2 − − ∆ E | M | z i −1 / 2 , j +1 / 2 , k +1 z i −1 / 2 , j + 3 / 2 , k +1 sourcex i −1 / 2 , j +1, k +1 n +1 / 2 i =1 / 2 , j +1, k + 3 / 2 n +1 / 2 i −1 / 2 , j +1, k +1 / 2 m = MEDIAHy |i , j +1 / 2,k +1 (6.36b) Ez | −E z | H y | in,+j1+1 / 2, k +1 = D a (m ) ⋅ H y | in, j +1 / 2, k +1 + Db (m ). n +1 / 2 n +1 / 2 + E | n +1 / 2 E | M | − − ∆ x i , j + 1 / 2 , k + 1 / 2 x i , j + 1 / 2 , k + 3 / 2 sourcex i , j + 1 / 2 , k + 1 n +1 / 2 i +1 / 2 , j +1 / 2 , k +1 n +1 / 2 i −1 / 2 , j +1 / 2 , k +1 m = MEDIAHz |i , j +1,k +1 / 2 (6.36c) E x | in,+j1+/32/ 2, k +1 / 2 − E x | in,+j1+1/ 2/ 2, k +1 / 2 H z | in,+j1+1, k +1 / 2 = D a (m ) ⋅ H z | in, j +1, k +1 / 2 + Db (m ). n + 1 / 2 n + 1 / 2 n + 1 / 2 + E | E | M | − − ∆ y i −1 / 2 , j +1, k +1 / 2 y i +1 / 2 , j +1, k +1 / 2 sourcez i , j +1, k +1 / 2 With the finite-difference systems of (6.35) and (6.36), we note that the coefficient arrays Ca(m), Cb(m), Da(m) and Db(m) each contain only M elements, where M is the number of distinct material media in the FDTD space lattice. Thus, if separate MEDIA(i,j,k) integer pointer arrays are provided for each field vector component, the approximate total computer storage needed is reduced to 12N, where N is the number of space cells in the FDTD lattice. Taking advantage of the integer nature of the MEDIA arrays, further reduction in computer storage can be achieved. However, with the additional computer instructions required for word packing and unpacking, there is a tradeoff between storage and running time for such codes. Word packing would be pursued primarily if going “out of core” leads to an intolerable expansion of program running time due to massive input/output (I/O) to the disk array. A more efficient means of packing the MEDIA integers is to construct a separate bitpacked array. Such a composite pointer could specify up to 24 = 16 distinct media at each of 16 field component locations in the grid. This provides the means to reduce the overall computer storage for the MEDI arrays by a factor of 15/16 (94%). SPACE REGION WITH NON-PERMEABLE MEDIA Many electromagnetic wave interaction problems involve non-permeable media ( µ = µ o , σ * = 0 ) and can be implemented on a uniform cubic-cell FDTD space lattice. For such problems, the finite-difference expressions of (6.35) and (6.36) can be further simplified by defining the proportional E and M vectors: ∧ → → ∧ → → E = (∆t µ o ∆ ) E M = (∆t µ o ) M (6.37a) (6.37b) ∧ ∧ where ∆ = ∆ x= ∆ y= ∆ z is the cell size of the space lattice. Assuming that E x , E y and ∧ E z are stored in the computer memory, and further defining a scaled E-field updating ∧ coefficient C b (m ) as ∧ ∆ C b (m ) = (∆t µ o ∆ )C b (m ) (6.38) the finite-difference expressions of (6.35) can be rewritten as: m = MEDIAEx |i , j +1 / 2,k +1 / 2 ∧ (6.39a) ∧ E x |in,+j1+/12/ 2,k +1 / 2 = C a (m ) E x |in,−j1+/12/ 2,k +1 / 2 H z |in, j +1,k +1 / 2 − H z |in, j ,k +1 / 2 ∧ + C b (m ) ⋅ + H y |in, j +1 / 2,k − H y |in, j +1 / 2,k +1 J sourcex |in, j +1 / 2,k +1 / 2 ∆ m = MEDIAEy |i −1 / 2, j +1,k +1 / 2 ∧ (6.39b) H | −H | + C b (m ) ⋅ + H z |in−1, j +1,k +1 / 2 − H z |in, j +1,k +1 / 2 − J sourcey |in−1 / 2, j +1,k +1 / 2 ∆ ∧ n x i −1 / 2 , j +1, k +1 ∧ E y |in−+11//22, j +1,k +1 / 2 = C a (m ) E y |in−−11//22, j +1,k +1 / 2 m = MEDIAEz |i −1 / 2, j +1 / 2,k +1 ∧ − n x i −1 / 2 , j +1, k (6.39c) ∧ E z |in−+11//22, j +1 / 2,k +1 = C a (m ) E z |in−−11//22, j +1 / 2,k +1 H y |in, j +1 / 2,k +1 − H y |in−1, j +1 / 2,k +1 ∧ + C b (m ) ⋅ + H x |in−1 / 2, j ,k +1 − H x |in−1 / 2, j +1,k +1 J sourcex |in−1 / 2, j +1 / 2,k +1 ∆ − The finite-difference expressions of (6.36) can be rewritten very simply as: ∧ ∧ H x | in−+11/ 2, j +1,k +1 = H x |in−1 / 2, j +1,k +1 + E y |in=+11//22, j +1,k +3 / 2 − E y |in−+11//22, j +1,k +1 / 2 ∧ ∧ ∧ + E z |in−+11//22, j +1 / 2,k +1 − E z |in−+11//22, j +3 / 2,k +1 − M sourcex |in−+11//22, j +1,k +1 ∆ ∧ ∧ H y | in,+j1+1 / 2 , k +1 = H y | in, j +1 / 2 , k +1 + E z | in++11//22, j +1 / 2 , k +1 − E z | in−+11//22, j +1 / 2 , k +1 ∧ ∧ ∧ + E x | in,+j1+/12/ 2 , k +1 / 2 − E x | in,+j1+/1 2/ 2 , k + 3 / 2 − M sourcex | in,+j1+/1 2/ 2 , k +1 ∆ ∧ ∧ H z | in,+j1+1, k +1 / 2 = H z | in, j +1, k +1 / 2 + E x | in,+j1+/32/ 2 , k +1 / 2 − E x | in,+j1+/12/ 2 , k +1 / 2 ∧ ∧ ∧ + E y | in−+11//22, j +1, k +1 / 2 − E y | in++11//22, j +1, k +1 / 2 − M sourcez | in,+j1+/1,2k +1 / 2 ∆ REDUCTION TO THE TWO-DIMENSIONAL TMZ AND TEZ MODES Assuming now that all partial derivatives of the fields with respect to z are equal to zero, the following conditions hold: 1. The sets of (Ez, Hx, Hy) components located in each lattice cut plane k, k+1 etc. are identical and can be completely represented by any one of these sets, which we designate as the TMz mode. 2. The sets of (Hz,Ex,Ey) components located in each lattice cut plane k+1/2, k+3/2, etc. are identical and can be completely represented by any one of these sets, which we designate as the TEz mode. The TMz and TEz modes are completely decoupled from each other. 3. TMz Mode, Corresponding to the System of (6.13) Write (3.35c), (3.36a, b) without specifying the k index, and then set all partial derivatives of the fields with respect to z equal to zero: m = MEDIAEz |i −1 / 2, j +1 / 2 n +1 / 2 z i −1 / 2 , j +1 / 2 E | = C a (m )E | n −1 / 2 z i −1 / 2 , j +1 / 2 H y |in, j +1 / 2,k +1 − H y |in−1, j +1 / 2 +Cb (m ) n n n + H | x i −1 / 2 , j − H x |i −1 / 2 , j +1 − J sourcex |i −1 / 2 , j +1 / 2 ∆ (6.41a) m = MEDIAHx |i −1/ 2, j +1 H x |in−+11/ 2, j +1 = Da (m )H x |in−1 / 2, j +1 + Db (m ).(E z |in−+11//22, j +1 / 2 − E z |in−+11//22, j + 3 / 2 − M sourcey |in,+j1+/12/ 2 ∆ ) (6.41b) m = MEDIAHy |i , j +1 / 2 n +1 y i , j +1 / 2 H | = Da (m )H y |in, j +1 / 2 + Db (m )(E z |in++11//22, j +1 / 2 − E z |in−+11//22, j +1 / 2 − M sourcex |in,+j1+1/ 2/ 2,k +1 ∆ ) (6.41c) TEz Mode, Corresponding to the System of (6.13) Write (3.35a, b), (3.36c) without specifying the k index, and then set all partial derivatives of the fields with respect to z equal to zero: m = MEDIAEx |i , j +1 / 2 E x |in,+j1+/12/ 2 = C a (m )E x |in,−j1+/12/ 2 +Cb (m )(H z |in, j +1 − H z |in, j − J sourcex |in, j +1 / 2 ∆ ) (6.42a) m = MEDIAEy |i −1/ 2, j +1 n +1 / 2 y i −1 / 2 , j +1 E | = C a (m )E y |in−−11//22, j +1 +Cb (m )(H z |in−1, j +1 − H z |in, j +1 − J sourcey |in−1 / 2, j +1 ∆ ) (6.42b) m = MEDIAHz |i , j +1 n +1 z i , j +1 H | = Da (m )H | n z i , j +1 E x |in,+j1+/32/ 2 − E x |in,+j1+1/ 2/ 2 + Db (m ) n +1 / 2 + E |n +1 / 2 − E |n +1 / 2 − M ∆ | y i −1 / 2 , j +1 y i +1 / 2 , j +1 sourcez i , j +1 (6.42c) INTERPRETATION AS FARADAY’S AND AMPERE’S LAWS IN INTEGRAL FORM The Yee algorithm for FDTD was originally interpreted as a direct approximation of the point-wise derivatives of Maxwell’s time-dependent curl equations by numerical central differences. Although this interpretation is useful for understanding how FDTD models wave propagation away from material interfaces, it sheds little light on what algorithm modifications are needed to properly model the physics of fine geometrical features such as wires, slots, and curved surfaces requiring sub-cell spatial resolution. The literature indicates that FDTD modeling can be extended to such features by departing from Yee’s original point-wise derivative thinking. As shown in Fig.3, the idea involves starting with a more macroscopic (but still local) combined-field description based upon Ampere’s Law and faraday’s Law in integral form, implemented on an array of electrically small, spatially orthogonal contours. These contours mesh (intersect) in the manner of links in a chain, providing a geometrical interpretation of the coupling of these two laws. These meshing results in the filling of the FDTD modeled space by a threedimensional “chain-link” array of intersecting orthogonal contours. The presence of wires, slots, and curved surfaces can be modeled by incorporating appropriate field behavior into the contour and surface integrals used to implement Ampere’s and Faraday’s Laws at selected meshes, and by deforming contour paths as required to conform with surface curvature. Fig. 6.3 Examples of chain-linked orthogonal contours in the free-space Yee mesh. (a) Ampere’s Law for time-stepping Ez; (b)Faraday’s Law for time-stepping Hz. For simplicity, we assume lossless free space with no electric or magnetic current sources. Applying Ampere’s Law along contour C1 in Fig. 6.3a, and assuming that the field value at a midpoint of one side of the contour equals the average value of that field component along that side, we obtain → → → ∂ → D ⋅ d S = H ⋅ d l1 1 ∫ ∂t S∫1 C1 (6.43a) H x |i −1 / 2, j ,k ∆x + H y |i , j +1 / 2,k ∆y − ∂ ε E | dS ≅ o z i − 1 / 2 , j + 1 / 2 , k 1 H | x H | y ∆ − ∆ ∂t S∫1 y i −1, j +1 / 2 , k x i −1 / 2, j +1,k (6.43b) Now, assume that E z |i −1 / 2, j +1 / 2,k equals the average value of Ez over the surface patch S1 and that the time derivative can be numerically realized by using a central-difference expression. Then, (6.43b) yields E z |in−+11//22, j +1 / 2,k − E z |in−−11//22, j +1 / 2,k ε o ∆x∆y ∆t n n (H x |i −1 / 2, j ,k − H x |i −1 / 2, j +1,k )∆x + = n (H |n ) − ∆ H | y y i −1, j +1 / 2 ,k y i , j +1 / 2,k (6.43c) ∆t and solving for E z | i − 1 / 2, j + 1 / 2, k provides the ε 0 ∆ x∆ y following time stepping relation: Multiplying both sides by n +1 / 2 z i −1 / 2 , j +1 / 2 ,k E | n −1 / 2 z i −1 / 2 , j +1 / 2 ,k =E | (H x |in−1 / 2, j ,k − H x |in−1 / 2, j +1,k ) ∆t (ε o ∆y ) + − n (H |n ) ( ) − ∆ ∆ H | t ε x y i −1, j +1 / 2 ,k o y i , j +1 / 2,k (6.44) In an analogous manner, we can apply Faraday’s Law along contour C2 in Fig. 6.3b to obtain → → ∂ → → B ⋅ dS = − E 2 ∫C2 ⋅ dl2 ∂t S∫2 (6.45a) − E x |i , j −1/ 2,k +1 / 2 ∆x − E y |i +1 / 2, j ,k +1 / 2 ∆y ∂ ≅ µ | H dS , , 1 / 2 2 o z i j k + + E | ∆ + ∆ x E | y ∂t S∫2 x i , j +1 / 2 ,k +1 / 2 y i −1 / 2 , j ,k +1 / 2 (6.45b) H z |in,+j1,k +1 / 2 − H z |in, j ,k +1 / 2 (E x |in,+j1+/12/ 2,k +1 / 2 − E x |in,+j1−1/ 2/ 2,k +1 / 2 )∆x = n +1 / 2 + (E |n +1 / 2 ∆t y i −1 / 2 , j , k +1 / 2 − E y |i +1 / 2 , j , k +1 / 2 )∆y µ o ∆x∆y Solving for H z |in,+j1,k/ +21 / 2 provides the following time-stepping relation: n +1 z i , j ,k +1 / 2 H | =H | n z i , j ,k +1 / 2 (E x |in,+j1+/12/ 2,k +1/ 2 − E x |in,+j1−/12/ 2,k +1/ 2 )∆t / (µo ∆y ) + n +1 / 2 + (E |n +1/ 2 y i −1 / 2 , j ,k +1 / 2 − E y |i +1 / 2 , j ,k +1 / 2 )∆t / (µ o ∆x ) (6.45c) DIVERGENCE-FREE NATURE It is crucial for any grid-based solution of Maxwell’s curl equations to implicitly enforce (6.3) and (6.4), the gauss’ Law relations for the electric and magnetic fields. Consider forming the time derivative of the total electric flux over the surface of a single Yee cell of Fig. 6.1. ∂ ε o (E x |i , j +1 / 2,k +1 / 2 − E x |i −1, j +1/ 2,k +1/ 2 )∆y∆z ∂t → → ∂ ∂ D ⋅ d S = + ε o (E y |i −1 / 2, j +1,k +1 / 2 − E y |i −1 / 2, j ,k +1 / 2 )∆x∆z ∫∫ ∂t ∂t Yeecell + ε ∂ (E | o z i −1 / 2 , j +1 / 2 ,k +1 − E z |i −1 / 2 , j +1 / 2 ,k )∆x∆y ∂t (3.47) Using the Yee algorithm time-stepping relations for the E-field components according to (6.29), we substitute appropriate H-field spatial finite differences for the E-field time derivatives in each term: H z |i , j +1,k +1 / 2 − H z |i , j ,k +1 / 2 H y |i , j +1 / 2,k +1 − H y |i , j +1/ 2,k − ∆y ∆z Term1 = − H z |i −1, j +1,k +1/ 2 − H z |i −1, j ,k +1 / 2 − H y |i −1, j +1/ 2,k +1 − H y |i −1, j +1 / 2,k ∆y ∆z (6.48a) H x |i −1/ 2, j +1,k +1 − H x |i −1 / 2, j +1,k H z |i , j +1,k +1 / 2 − H z |i −1, j +1,k +1 / 2 − ∆z ∆x Term2 = − H x |i −1/ 2, j ,k +1 − H x |i −1 / 2, j ,k − H z |i , j ,k +1 / 2 − H z |i −1, j ,k +1 / 2 ∆ z x ∆ (6.48b) H y |i , j +1 / 2,k +1 − H y |i −1, j +1 / 2,k +1 H x |i −1/ 2, j +1,k +1 − H x |i −1/ 2, j ,k +1 − ∆x ∆y Term3 = − H y |i , j +1 / 2,k − H y |i −1, j +1 / 2,k − H x |i −1/ 2, j +1,k − H x |i −1/ 2, j ,k ∆ ∆ x y (6.48c) For all time steps, this results in → → ∂ D ⋅ d S = (Term1) ∆y∆z + (Term2) ∆x∆z + (Term3) ∆x∆y = 0 ∫∫ ∂t Yeecell (6.49) Assuming zero initial conditions, the constant zero value of the time derivative of the net electric field leaving the Yee cell means that this flux never departs from zero: → → ∫∫ D(t ) ⋅ d S = Yeecell → → ∫∫ D(t = 0) ⋅ d S = 0 (6.50) Yeecell Therefore, the Yee cell satisfies Gauss’ Law fro the E-field in charge-free space; hence the Yee algorithm is divergence-free with respect to its E-field computations.