Electromagnetic Simulation Using the FDTD Method with Python. Dennis M. Sullivan
Чтение книги онлайн.
Читать онлайн книгу Electromagnetic Simulation Using the FDTD Method with Python - Dennis M. Sullivan страница 7
matplotlib==3.0.0
numba==0.39.0
numpy==1.14.3
scipy==1.0.1
1 ONE‐DIMENSIONAL SIMULATION WITH THE FDTD METHOD
This chapter provides a step‐by‐step introduction to the finite‐difference time‐domain (FDTD) method, beginning with the simplest possible problem, the simulation of a pulse propagating in free space in one dimension. This example is used to illustrate the FDTD formulation. Subsequent sections lead to formulations for more complicated media.
1.1 ONE‐DIMENSIONAL FREE‐SPACE SIMULATION
The time‐dependent Maxwell’s curl equations for free space are
E and H are vectors in three dimensions, so, in general, Eq. (1.1a) and (1.1b) represent three equations each. We will start with a simple one‐dimensional case using only Ex and Hy, so Eq. (1.1a) and (1.1b) become
(1.2a)
(1.2b)
These are the equations of a plane wave traveling in the z direction with the electric field oriented in the x direction and the magnetic field oriented in the y direction.
Taking the central difference approximations for both the temporal and spatial derivatives gives
In these two equations, time is specified by the superscripts, that is, n represents a time step, and the time t is t = Δt ⋅ n. Remember, we have to discretize everything for formulation into the computer. The term n + 1 means one time step later. The terms in parentheses represent distance, that is, k is used to calculate the distance z = Δx ⋅ k. (It might seem more sensible to use Δz as the incremental step because in this case we are going in the z direction. However, Δx is so commonly used for a spatial increment that we will use Δx.) The formulation of Eq. (1.3a) and (1.3b) assume that the E and H fields are interleaved in both space and time. H uses the arguments k + 1/2 and k − 1/2 to indicate that the H field values are assumed to be located between the E field values. This is illustrated in Fig. 1.1. Similarly, the n + 1/2 or n − 1/2 superscript indicates that it occurs slightly after or before n, respectively. Equations (1.3a) and (1.3b) can be rearranged in an iterative algorithm:
Notice that the calculations are interleaved in space and time. In Eq. (1.4a), for example, the new value of Ex is calculated from the previous value of Ex and the most recent values of Hy.
Figure 1.1 Interleaving of the E and H fields in space and time in the FDTD formulation. To calculate Hy, for instance, the neighboring values of Ex at k and k + 1 are needed. Similarly, to calculate Ex, the values of Hy at k + 1/2 and
are needed.This is the fundamental paradigm of the FDTD method (1).
Equations (1.4a) and (1.4b) are very similar, but because ε0 and μ0 differ by several orders of magnitude, Ex and Hy will differ by several orders of magnitude. This is circumvented by making the following change of variables (2):
Substituting this into Eq. (1.4a) and (1.4b) gives
Once the cell size Δx is chosen, then the time step Δt is determined by
where c0 is the speed of light in free space. (The reason for this will be explained in Section 1.2.) Therefore, remembering