School of Electrical Engineering and Computer Science
Washington State University
Understanding the FDTD Method
I once considered publishing a book on the finite-difference
time-domain (FDTD) method based on notes I wrote for a course I
taught. But, why go through the hassle of publishing through a
publisher when you can give away something for free? (Okay, I can
think of several reasons, but I’m going to ignore them.)
So, here is what I have written. In addition to my students,
several people who have stumbled across these notes via a search
engine have told me this material has been quite helpful to
them. Hopefully if you read through this you’ll find it helpful
too. But, here are a few things to note:
This material is presented “as is.” One of the
reasons I’m not trying to publish this via the traditional route is
that I lack the time to put all the finishing touches on this
material (such as adding proper citations to previous work).
Despite the previous statement, I sincerely welcome any and all
suggestion to improve this material. If you catch a typo or
think there is some weakness in this material, please let me know
(by sending me email).
If you find this material useful and see an opportunity to cite it
in one of your publications, I would be ever so appreciative of the
citation. Please cite this work as:
Understanding the Finite-Difference Time-Domain
Method, John
B. Schneider, www.eecs.wsu.edu/~schneidj/ufdtd,
2010.
Although there isn't a hardcopy available for purchase in
English, there is is one available in Chinese! You can find that
here: 时域有限差分方法及编程技巧.
(I get no proceeds from this. I said to the gentleman interested
in doing the translation that if I were sent five copies of the
translation, they could do what they want with it.)
The first two chapters are weak (and have very little to do with
FDTD). The third chapter is where the FDTD material really starts
and I believe (and hope you agree) that things are pretty decent
beginning from there.
Chapter 1: Numeric Artifacts. A
simple overview of some of the errors inherent in digital computation.
Chapter 1 contents:
1.1 Introduction
1.2 Finite Precision
1.3 Symbolic Manipulation
Chapter 2: Brief Review of
Electromagnetics. This book isn’t the place to learn about
the fundamentals of electromagnetics, but it was necessary to
include some background material.
Chapter 2 contents:
2.1 Introduction
2.2 Coulomb’s Law and Electric Field
2.3 Electric Flux Density
2.4 Static Electric Fields
2.5 Gradient, Divergence, and Curl
2.6 Laplacian
2.7 Gauss’s and Stokes’ Theorems
2.8 Electric Field Boundary Conditions
2.9 Conductivity and Perfect Electric Conductors
2.10 Magnetic Fields
2.11 Magnetic Field Boundary Conditions
2.12 Summary of Static Fields
2.13 Time Varying Fields
2.14 Summary of Time-Varying Fields
2.15 Wave Equation in a Source-Free Region
2.16 One-Dimensional Solutions to the Wave Equation
Chapter 3: Introduction to the
Finite-Difference Time-Domain Method: FDTD in 1D. This is where
things really start. You can skip the previous two chapters, but
not this one!
Chapter 3 contents:
3.1 Introduction
3.2 The Yee Algorithm
3.3 Update Equations in 1D
3.4 Computer Implementation of a One-Dimensional FDTD Simulation
3.5 Bare-Bones Simulation
3.6 PMC Boundary in One Dimension
3.7 Snapshots of the Field
3.8 Additive Source
3.9 Terminating the Grid
3.10 Total-Field/Scattered-Field Boundary
3.11 Inhomogeneities
3.12 Lossy Material
Chapter 4: Improving the FDTD Code.
The goal of this book is to enable you to write fast,
efficient FDTD code in the C language. The material in this chapter
discusses a way to "modularize" the code using structures. (Although
it isn’t necessarily pretty, the FDTD code in this book is much, much
faster than MATLAB-based code!)
Chapter 4 contents:
4.1 Introduction
4.2 Arrays and Dynamic Memory Allocation
4.3 Macros
4.4 Structures
4.5 Improvement Number One
4.6 Modular Design and Initialization Functions
4.7 Improvement Number Two
4.8 Compiling Modular Code
4.9 Improvement Number Three
Chapter 5: Scaling FDTD Simulations to
Any Frequency. So many people talk about a particular frequency
when performing an FDTD simulation. Generally there is no need
to do that. (Granted, sometimes one is interested in a particular
frequency, but I find is most convenient to think dimensionlessly,
where the points per wavelength in the primary metric describing a
simulation.)
Chapter 5 contents:
5.1 Introduction
5.2 Sources
5.2.1 Gaussian Pulse
5.2.2 Harmonic Sources
5.2.3 The Ricker Wavelet
5.3 Mapping Frequencies to Discrete Fourier Transforms
5.4 Running Discrete Fourier Transform (DFT)
5.5 Real Signals and DFT’s
5.6 Amplitude and Phase from Two Time-Domain Samples
5.7 Conductivity
5.8 Transmission Coefficient for a Planar Interface
5.8.1 Transmission through Planar Interface
5.8.2 Measuring the Transmission Coefficient Using FDTD
Chapter 6: Differential-Equation Based
Absorbing Boundary Conditions. The absorbing boundary conditions
(ABC’s) described here are decidedly old-fashioned. Still, there is
some useful information here and the operator notation that is
developed comes in handy at various times.
Chapter 6 contents:
6.1 Introduction
6.2 The Advection Equation
6.3 Terminating the Grid
6.4 Implementation of a First-Order ABC
6.5 ABC Expressed Using Operator Notation
6.6 Second-Order ABC
6.7 Implementation of a Second-Order ABC
Chapter 7: Dispersion, Impedance,
Reflection, and Transmission. This chapter is something of a
grab-bag analysis of the FDTD method and the ways in which it differs
from the continuous world.
Chapter 7 contents:
7.1 Introduction
7.2 Dispersion in the Continuous World
7.3 Harmonic Representation of the FDTD Method
7.4 Dispersion in the FDTD Grid
7.5 Numeric Impedance
7.6 Analytic FDTD Reflection and Transmission Coefficients
7.7 Reflection from a PEC
7.8 Interface Aligned with an Electric-Field Node
Chapter 8: Two-Dimensional FDTD
Simulations. Finally we get beyond 1D!
Chapter 8 contents:
8.1 Introduction
8.2 Multidimensional Arrays
8.3 Two Dimensions: TM^{z} Polarization
8.4 TM^{z} Example Animation
(courtesy of John Coady)
8.5 The TFSF Boundary for TM^{z} Polarization
8.6 TM^{z} TFSF Boundary Example
8.7 TE^{z} Polarization
8.8 PEC’s in TE^{z} and TM^{z} Simulations
8.9 TE^{z} Example
Chapter 9: Three-Dimensional FDTD.
If you understood FDTD in 1D, then making the transition to 2D and 3D
is truly simple.
Chapter 9 contents:
9.1 Introduction
9.2 3D Arrays in C
9.3 Governing Equations and the 3D Grid
9.4 3D Example
9.5 TFSF Boundary
9.6 TFSF Demonstration
9.7 Unequal Spatial Steps
Chapter 10: Dispersive Material.
Yes, the FDTD grid is itself dispersive, but here we are trying to
model media that are dispersive in the continuous world.
Chapter 10 contents:
10.1 Introduction
10.2 Constitutive Relations and Dispersive Media
10.2.1 Drude Materials
10.2.2 Lorentz Material
10.2.3 Debye Material
10.3 Debye Materials Using the ADE Method
10.4 Drude Materials Using the ADE Method
10.5 Magnetically Dispersive Material
10.6 Piecewise Linear Recursive Convolution
10.7 PLRC for Debye Material
Chapter 11: Perfectly Matched
Layer. Now we’re ready to tackle a perfectly matched layer (PML)
which is arguably the current state-of-the-art when it comes to ABC’s.
Chapter 11 contents:
11.1 Introduction
11.2 Lossy Layer, 1D
11.3 Lossy Layer, 2D
11.4 Split-Field Perfectly Matched Layer
11.5 Un-Split PML
11.6 FDTD Implementation of Un-Split PML
Chapter 12: Acoustic FDTD
Simulations. FDTD can be used for more than just Maxwell’s
equations. This chapter gives a brief overview of the
application of the FDTD method to small-signal linear acoustics.
Chapter 12 contents:
12.1 Introduction
12.2 Governing FDTD Equations
12.3 Two-Dimensional Implementation
Chapter 13: Parallel Processing.
The FDTD method is a computational hog. To help handle that, one
can parallelize the algorithm (the FDTD method is said to be
"trivially parallelizable"). This chapter provides a brief
discussion of threading and the Message Passing Interface (MPI) as
means of parallelizing code.
Chapter 13 contents:
13.1 Threads
13.2 Thread Examples
13.3 Message Passing Interface
13.4 Open MPI Basics
13.5 Rank and Size
13.6 Communicating Between Processes
Chapter 14: Near-to-Far-Field
Transformation. Discussion of how one can use the fields in the
FDTD grid to determine the fields at any "distant" point.
Chapter 14 contents:
14.1 Introduction
14.2 The Equivalence Principle
14.3 Vector Potentials
14.4 Electric Field in the Far-Field
14.5 Simpson’s Composite Integration
14.6 Collocating the Electric and Magnetic Fields: The Geometric Mean
14.7 NTFF Transformations Using the Geometric Mean
14.7.1 Double-Slit Radiation
14.7.2 Scattering from a Circular Cylinder
14.7.3 Scattering from a Strongly Forward-Scattering Sphere
Appendices Miscellaneous
material including a PostScript primer that has very little to do with
FDTD, but I have found it useful at times to have my code directly
draw output in PostScript so that I can visualize what is happening in
the grid.
Appendices:
A Construction of Fourth-Order Central Differences
B Generating a Waterfall Plot and Animation
C Rendering and Animating Two-Dimensional Data
D Notation
E PostScript Primer
E.1 Introduction
E.2 The PostScript File
E.3 PostScript Basic Commands
Bibliography Citations in
this work are sadly lacking, but here is the bibliography such as it
is.