Читать книгу Electromagnetic Simulation Using the FDTD Method with Python - Dennis M. Sullivan - Страница 9
Оглавление
GUIDE TO THE BOOK
This book has one purpose only: it enables the reader or student to learn and do three‐dimensional electromagnetic simulation using the finite‐difference time‐domain (FDTD) method. It does not attempt to explain the theory of FDTD simulation in great detail. It is not a survey of all possible approaches to the FDTD method, nor is it a “cookbook” of applications. It is aimed at those who would like to learn and do FDTD simulation in a reasonable amount of time.
FORMAT
This book is tutorial in nature. Every chapter attempts to address an additional level of complexity. The text increases in complexity in two major ways:
Dimension of Simulation | Type of Material |
One‐dimensional | Free space |
Two‐dimensional | Complex dielectric material |
Three‐dimensional | Frequency‐dependent material |
The first section of Chapter 1 is one‐dimensional simulation in free space. From there, the chapters progress to more complicated media. In Chapter 2, the simulation of frequency‐dependent media is addressed. Chapter 3 introduces two‐dimensional simulation, including the simulation of plane waves and how to implement the perfectly matched layer (PML). Chapter 4 introduces three‐dimensional simulation.
Chapter 5 focuses on Python as an object‐oriented language, coding strategies, and features to enhance FDTD simulations in the language. Chapter 6 presents a real‐world application of the FDTD method and breaks down strategies for solving the problem.
SPECIFIC CHOICES DEALING WITH SOME TOPICS
There are many ways to handle individual topics having to do with FDTD simulation. This book does not attempt to address all of them. In most cases, a single approach is taken and used throughout the book for the sake of clarity. Our philosophy is that when first learning the FDTD method, it is better to learn one specific approach and learn it well, rather than to be confused by switching to different approaches. In most cases, the approach being taught is the author’s own preference. This does not make it the only approach or even the best; it is just the approach that the author has found to be effective. In particular, the following are some of the choices that have been made.
1 The Use of Normalized Units. Maxwell’s equations have been normalized by substitutingThis is a system similar to Gaussian units, which are frequently used by physicists. The reason for using it here is the simplicity in the formulation. The E and the H fields have the same order of magnitude. This has an advantage in formulating the PML, which is a crucial part of FDTD simulation.
2 Maxwell’s Equations with the Flux Density. There is some leeway in forming the time‐domain Maxwell’s equations from which the FDTD formulation is developed. The following is used in Chapter 1:(1) (2) This is a straightforward formulation and among those commonly used. However, by Chapter 2, the following formulation using the flux density is adopted:(3) (4) (5)
In this formulation, it is assumed that the materials being simulated are nonmagnetic; that is, . However, we will be dealing with a broad range of dielectric properties, so Eq. (4) could be a complicated convolution. There is a reason for this formulation: Eq. (3) and Eq. (5) remain the same regardless of the material; any complicated mathematics stemming from the material lies in Eq. (4). We will see that the solution of Eq. (4) can be looked upon as a digital filtering problem. In fact, the use of signal processing techniques in FDTD simulation will be a recurring theme in this book.
Z TRANSFORMS
As mentioned above, the solution of Eq. (4) for most complicated materials can be viewed as a digital filtering problem. This being the case, the most direct approach to solve the problem is to take Eq. (4) into the Z domain. Z transforms are a regular part of electrical engineering education, but not that of physicists, mathematicians, and others. In teaching a class on FDTD simulation, Prof. Sullivan teaches some Z transform theory so when he reaches the sections on complicated dispersive materials, the students are ready to apply Z transforms. This has two distinct advantages: (a) Electrical engineering students have another application of Z transforms to strengthen their understanding of signal processing; and (b) physics students and others now know and can use Z transforms, something that had not usually been part of their formal education. Based on his positive experience, Prof. Sullivan would encourage anyone using this book when teaching an FDTD course to consider this approach. However, he has left the option open to simulate dispersive methods with other techniques. The sections on Z transforms are optional and may be skipped. Appendix A on Z transforms is provided.
PROGRAMMING EXERCISES
The philosophy behind this book is that the reader will learn by doing. Therefore, most exercises involve programming. Each of Chapters 1–5 has at least one FDTD program written in Python. Each of the programs is complete and can be run as written, provided the Python interpreter and necessary libraries are installed. These programs include the graphical display of results to match many of the figures in the chapters. The programs in Chapters 1–4 are designed to be simple and procedural for ease of understanding and following the equations. Chapter 5 addresses some better Python programming practices and introduces some new features and techniques. This chapter attempts to introduce those unfamiliar with Python with some useful concepts to enhance FDTD programs and produce more readable, extendable code.
PROGRAMMING LANGUAGE
The programs in the book are written in Python. Python is a free, open‐source programming language which has broad adoption in both general‐purpose industries and scientific applications. This large community means that we can leverage a large number of well‐documented tools and libraries. The Python libraries are constantly being expanded. Additionally, the plotting and graphical interface libraries allow the entire program to be more interactive and user‐friendly, while being written in a high‐level language. Libraries are also available to speed up simulations to give good performance. Python, and FDTD simulations, can be run on any modern computer.
PYTHON VERSION
All programs in this book were run with Python 3.5.1 and the following library versions:
matplotlib==3.0.0
numba==0.39.0
numpy==1.14.3
scipy==1.0.1