The FDTD Yee Algorithm

This page gives a brief overview of the FDTD algorithm and the Yee Grid. The basic FDTD grid and time stepping algorithm originate to the seminal paper by Kane Yee in IEEE Transactions on Antennas and Propagation (Yee 1966).

Contents

Maxwell’s equations

The FDTD algorithm starts from Maxwell’s equations in a region that has no electric or magnetic current sources. From Taflove2005 pp.51-54. Also see Maxwell’s equations

Faraday’s Law

275bb8cc38d5858293408be3fb7b32fc.png Eqn:2.1

Ampere’s Law

15fa30d10e66dda3e20961e22349ab40.png Eqn:2.2

Gauss’s Law (electric)

9fa2685e0d9af6d7cf0e96a3f41899b0.png Eqn:2.3

Gauss’s Law (magnetic)

7383020fabe682b4bdd0568eace377bf.png Eqn:2.4

Terms Defined

0898d6ef8f17e37365058e0f2f7335a3.pngelectric field intensity (volts / meter)
37dfc68a38f6b3c39d9fe864b7c767b3.pngelectric flux density (coulombs / square meter)
8f14501007f91398110881febb19de68.pngmagnetic field intensity (amperes / meter)
3a823fab05bdbe0964b96286bd26c91e.pngmagnetic flux density (webers / square meter)
9ada48465e2719c445b4e2e69505a277.pngelectric current density (amperes / square meter)
13de2fbdb5fb4e9d45199ac0c81c7cdb.pngequivalent magnetic current density (volts / square meter)

Maxwell’s Equations for FDTD

The FDTD algorithm makes certain assumptions concerning the constitutive relations and sources and losses.

The Constitutive Relations

If the material is linear, isotropic, non-dispersive (i.e. materials having field-independent, direction-independent, and frequency-independent electric and magnetic properties) then:

8973eff56a954d34385ab6abd4f850a4.png Eqn:2.5
960bfe5314c17cee1811aa24b0d45bfe.png Eqn:2.6

where,

a1f21f33e4cc224c1aa90a478a5339d5.pngelectric permittivity (farads/meter)
6853def5df895caf393a01dbf6d99ab9.pngrelative electric permittivity (dimensionless)
7da3363c48472901d1e800bfa833ec71.pngelectric permittivity (free space) (8.854 * 10^-12 farads/meter)
2b3a144c31b05e0a773b0b60dc13e991.pngmagnetic permeability (Henrys/meter)
b5d24390fa4c8305063e1bee25209d3d.pngrelative magnetic permeability (dimensionless)
8be24318b6c81bd832138961bbd6707b.png(Henrys/meter), magnetic permeability (free space)

Sources and Losses

Allowing for sources and materials with isotropic, non-dispersive electric and magnetic losses gives:

b065087e71cc3977fff7186ec046ab7d.png Eqn:2.7
f62fdb14cc499a6279d8e33013f6d6a1.png Eqn:2.8

where,

1a24ad98a63af89b686a9c36f0e118b4.pngelectric conductivity (siemens / meter)
d8880374184ad3d24cd7ac0e30b1d0f9.pngequivalent magnetic loss (ohms / meter)

The Modified Maxwell’s Equations for FDTD

Substituting into the two Maxwell’s curl equations, gives for linear, isotropic, non-dispersive, lossy materials:

Writing out the individual components gives six coupled equations for E and H:

9d86b3e93457e43bf7ed288b1f1e974c.png Eqn:2.11
05a683a5645d9ca3461898c033907ae1.png Eqn:2.12
cf615854f387ee9face73facf91343b8.png Eqn:2.13
c31b6c0e5984e8d19afaff2c6b2debc4.png Eqn:2.14
1d32e6dc25b86515cbd6c96f9bd99dbc.png Eqn:2.15
7fc9b0cb5dc561738dc4d9271761873f.png Eqn:2.16

The Yee FDTD Algorithm

The algorithm used in FDTD simulations is known as the Yee algorithm. The Yee algorithm solves for both electric and magnetic fields using the coupled Maxwell’s curl equations. (As opposed to solving for the electric or magnetic field alone using a wave equation.) From Taflove2005 pp.58-60. and Sadiku pp.160-164.

A key to the Yee algorithm is that the components of E and H (Ex,Ey,Ez, Hx,Hy,Hz) are spatially offset from one another. An easy way to visualize this is to see how the field components are arranged within a unit cell (voxel) as shown below:

YeeCube
voxel

  • Ex = i+.5, j, k
  • Ey = i, j+.5, k
  • Ez = i, j, k+.5
  • Hx = i, j+.5, k+.5
  • Hy = i+.5, j, k+.5
  • Hz = i+.5, j+.5, k

The Yee Grid

from Sadiku P.161,164

Spatial offset of the field components


Other features of the Yee algorithm are:

  • In addition to being offset spatially, E and H are also offset in time by 1/2 time step using a “leapfrog” time-stepping technique.
  • The leapfrog time-stepping algorithm is fully explicit. This avoids problems involved with simultaneous equations and matrix inversions.
  • The finite-difference equations for both the space derivatives and time derivatives are central-difference and second-order accurate.

Yee2dGrid

Close-up view of the Yee Grid for the 2-D TEz (transverse electric mode)

Example Code

Some simple example code of a 2-D FDTD TE in a free-space region: (See Taflove2005 pp.60-73 for explanation and more examples) From: Yee2d.c .c file (FDTD code)

for (n = 0; n  < maximumIteration; n++) {  // iteration loop

    for (i = 0; i < xSize; i++) {   // evaluate ex
        for (j = 1; j < ySize; j++) {
            ex[i][j] = caex[i][j] * ex[i][j] + cbex[i][j] * ( hz[i][j] - hz[i][j-1] );
        }
    }

    for (i = 1; i < xSize; i++) {   // evaluate ey
        for (j = 0; j < ySize; j++) {
            ey[i][j] = caey[i][j] * ey[i][j] + cbey[i][j] * ( hz[i-1][j] - hz[i][j] );
        }
    }


    for (i = 0; i < xSize; i++) {   // evaluate hx
        for (j = 0; j < ySize; j++) {
            hz[i][j] = dahz[i][j] * hz[i][j] + 
             dbhz[i][j] * ( ex[i][j+1] - ex[i][j] + ey[i][j] - ey[i+1][j] );
        }
    }

    hz[xSource][ySource] = sourceValue[n];
}

Where (in vacuum),
    ca = da = 1.0
    cb = dTime / (electricalPermittivity0 * dx);
    db = dTime / (magneticPermeability0 * dx);

See Also

References

  • Sadiku – Numerical Techniques in Electromagnetics, 2001
  • Taflove1995 – Computational Electrodynamics, 1995
  • Taflove1998 – Advances in Computational Electrodynamics, 1998
  • Taflove2000 – Computational Electrodynamics, 2000
  • Taflove2005 – Computational Electrodynamics, 2005

External Links

Personal tools
Toolbox