Week 2: Learning More Theory
March 8, 2024
Hello readers! Welcome back to my blog, where I will be tracking my progress through my EM field simulation project. This week, I researched numerical methods for finding solutions to Maxwell’s equations. Knowledge of the available algorithms for solving Maxwell’s equations will allow me to implement the core of my project: an efficient, stable, and accurate simulation program.
In order to understand the numerical methods needed to solve Maxwell’s equations, I first needed to develop a good understanding of the equations themselves. There are four equations in total:
All four of the equations are PDEs (partial differential equations) involving the partial derivatives of the E and B fields with respect to time and space. Some of these equations should look familiar; (1) is Gauss’ Law, while (4) is the Ampere-Maxwell Law, which is the generalization of Ampere’s Law to systems with changing electric fields. As for the unfamiliar-looking ones, (2) essentially states that magnetic monopoles cannot exist and (3) is Faraday’s Law, which states that a change in the magnetic field will create an induced electric field.
To solve this system of equations given some initial values, we can use the Finite-Difference Time Domain (FDTD) method. As apparent in the name, the FDTD method makes use of a technique called finite differencing. With finite differencing, continuous space (or space-time) is replaced by a discrete lattice. In this discrete space/space-time, derivatives with respect to space and time are represented as discrete differences. The time evolution of the system can then easily be calculated using the finite difference equations (which now resemble recurrence relations for a discrete sequence).
One of the most popular FDTD algorithms for solving Maxwell’s equations is Yee’s algorithm. First proposed in 1966, the algorithm uses finite-differencing to approximate to 1st order accuracy the behavior of EM fields in an uniform medium. One of the main optimizations of Yee’s algorithm is the staggered grid method, which calculates E and B at staggered lattice points in space (visualized below).
While the algorithm is easy to implement and reasonably efficient (requiring no matrix operations!), the stability of the algorithm depends on the ratio between the temporal and spatial step sizes (fun fact: the stability condition is an instance of a Courant-Friedrichs-Lewy, or CFL, criterion). Moreover, algorithms have been proposed with higher orders of accuracy and greater adaptability to different geometries than Yee’s algorithm. These include finite element methods and time integration algorithms, the latter of which does away with discretization completely.
My initial implementation will use Yee’s algorithm because it is the easiest to implement. After the initial implementation, however, I will also experiment with more complex algorithms and compare their performances. Next week, I will start by setting up the development environment before implementing and testing a simple Maxwell’s equation solver. Wow! How exciting! See you next week.
Sources:
https://engineering.purdue.edu/wcchew/ece604f20/Lecture%20Notes/Lect37.pdf
https://home.cc.umanitoba.ca/~lovetrij/cECE7810/Papers/Yee%201966%20HiRes.pdf
https://doi.org/10.1016/0010-4655(92)90026-U
Leave a Reply
You must be logged in to post a comment.