Electromagnetic Simulation Using the FDTD Method with Python. Dennis M. Sullivan

Чтение книги онлайн.

Читать онлайн книгу Electromagnetic Simulation Using the FDTD Method with Python - Dennis M. Sullivan страница 9

Electromagnetic Simulation Using the FDTD Method with Python - Dennis M. Sullivan

Скачать книгу

      1 The program fd1d_1_2.py has absorbing boundary conditions at both ends. Get this program running and test it to ensure that the boundary conditions completely absorb the pulse.

      In order to simulate a medium with a dielectric constant other than 1, which corresponds to free space, we have to add the relative dielectric constant εr to Maxwell’s equations:

      (1.13a)

      (1.13b)

      We will stay with our one‐dimensional example,

      (1.14a)

      (1.14b)

      (1.15a)

      (1.15b)

      From this we can get the computer equations

      (1.16a)

      (1.16b)

Four graphs of Ex versus FDTD cells displaying intersecting solid and dashed curves with segments for T= 100 and Eps= 4, T=220 and Eps= 4, T=320 and Eps=4, and T=440 and Eps= 4 (top-bottom).

      over those values of k that specify the dielectric material.

      1 The program fd1d_1_3.py simulates a problem containing partly free space and partly dielectric material. Run this program and duplicate the results of Fig. 1.4.

      2 Look at the relative amplitudes of the reflected and transmitted pulses. Are they correct? Check them by calculating the reflection and transmission coefficients (Appendix 1.A).

      3 Still using a dielectric constant of 4, let the transmitted pulse propagate until it hits the far right wall. What happens? What could you do to correct this?

      In the fd1d_1_1.py and fd1d_1_2.py, a source is assigned as values to Ex; this is referred to as a hard source. In fd1d_1_3.py, however, a value is added to Ex at a certain point; this is called a soft source. The reason is that with a hard source, a propagating pulse will see that added value and be reflected because a hard value of Ex looks like a metal wall to FDTD. With the soft source, a propagating pulse will just pass through.

      Until now, we have been using a Gaussian pulse as the source. It is very easy to switch to a sinusoidal source. Just replace the parameter pulse with the following:

equation equation

      The parameter freq_in determines the frequency of the wave. This source is used in the program fd1d_1_4.py. Figure 1.5 shows the same dielectric medium problem with a sinusoidal source. A frequency of 700 MHz is used. Notice that the simulation was stopped before the wave reached the far right side. Remember that we have an absorbing boundary condition, but only for free space.

      1 Modify your program fd1d_1_3.py to simulate the sinusoidal source (see fd1d_1_4.py).

      2 Keep increasing your incident frequency from 700 MHz upward at intervals of 300 MHz. What happens?

      3 A wave packet, a sinusoidal function in a Gaussian envelope, is a type of propagating wave function that is of great interest in areas such as optics. Modify your program to simulate a wave packet.

      Choosing the cell size to be used in an FDTD formulation is similar to any approximation procedure: Enough sampling points must be taken to ensure that an adequate representation is made. The number of points per wavelength is dependent on many factors (3, 4). However, a good rule of thumb is 10 points per wavelength. Experience has shown this to be adequate, with inaccuracies appearing as soon as the sampling drops below this rate.

      Naturally,

Скачать книгу