Meep Introduction

From AbInitio

Revision as of 05:55, 22 October 2005; Stevenj (Talk | contribs)
(diff) ←Older revision | Current revision | Newer revision→ (diff)
Jump to: navigation, search
Meep
Download
Release notes
FAQ
Meep manual
Introduction
Installation
Tutorial
Reference
C++ Tutorial
C++ Reference
Acknowledgements
License and Copyright

Meep implements the 'finite-difference time-domain (FDTD) method for computational electromagnetism. This is a widely used technique in which space is divided into a discrete grid and then the fields are evolved in time using discrete time steps—as the grid and the time steps are made finer and finer, this becomes a closer and closer approximation for the true continuous equations, and one can simulate many practical problems essentially exactly.

In this section, we introduce the equations and the electromagnetic units employed by Meep, the FDTD method, and Meep's approach to FDTD. Also, FDTD is only one of several useful computational methods in electromagnetism, each of which has their own special uses—we mention a few of the other methods, and try to give some hints as to which applications FDTD is best suited for and when you should consider a different method.

Contents

Maxwell's equations

Meep simulates Maxwell's equations, which describe the interactions of electric (E) and magnetic (H) fields with one another and with matter and sources. In particular, the equations for the evolution of the fields are:

\frac{d\mathbf{B}}{dt} = -\nabla\times\mathbf{E} + \mathbf{J}_B \mathbf{B} = \mu \mathbf{H}
\frac{d\mathbf{D}}{dt} = \nabla\times\mathbf{E} + \mathbf{J} \mathbf{D} = \varepsilon \mathbf{E}

Where D is the displacement field, ε is the dielectric constant, J is the current density, and JB is the magnetic-charge current density. (Magnetic currents are a convenient computational fiction in some situations.) B is the magnetic flux density (often called the magnetic field), but currently μ (the magnetic permeability) is always 1 in Meep so we don't need to distinguish between B and H.

You may have noticed the lack of annoying constants like ε0, μ0, c, and 4π — that's because Meep uses "dimensionless" units where all these constants are unity (you can tell it was written by theorists). As a practical matter, almost everything you might want to compute is expressed as a ratio anyway, so the units end up cancelling; see Units in Meep, below.

Material dispersion and nonlinearity

The material structure is determined by the dielectric function ε(x), but ε is not only a function of position — in general, it also depends on frequency (material dispersion) and on the electric field E itself (nonlinearity). Material dispersion, in turn, is generally associated with absorption loss in the material, or possibly gain. All of these effects can be simulated in Meep, with certain restrictions.

Dispersion

Physically, material dispersion arises because the polarization of the material does not respond instantaneously to an applied field E, and this is essentially the way that it is implemented in FDTD. In particular, \mathbf{D} = \varepsilon\mathbf{E} is expanded to:

\mathbf{D} = \varepsilon_\infty \mathbf{E} + \mathbf{P}

where \varepsilon_\infty is the instantaneous dielectric function (the infinite-frequency response) and P is the polarization density in the material. P, in turn, has its own time-evolution equation, and the exact form of this equation determines the frequency-dependence ε(ω). In particular, Meep supports any material dispersion of the form of a sum of harmonic resonances:

\varepsilon(\omega,\mathbf{x}) = \varepsilon_\infty(\mathbf{x}) + \sum_n \frac{\sigma_n(\mathbf{x})}{\omega_n^2 - \omega^2 - i\omega\gamma_n} ,

where ωn and γn are user-specified constants and \sigma_n(\mathbf{x}) is a user-specified function of position. This corresponds to evolving P via the equations:

\mathbf{P} = \sum_n \mathbf{P_n}
\frac{d^2\mathbf{P}_n}{dt^2} + \gamma_n \frac{d\mathbf{P}_n}{dt} +  \omega_n^2 \mathbf{P}_n = \sigma_n(\mathbf{x}) \mathbf{E}

That is, we must store and evolve a set of auxiliary fields \mathbf{P}_n along with the electric field in order to keep track of the polarization P. Essentially any ε(ω) could be modeled by including enough of these polarization fields — Meep allows you to specify any number of these, limited only by computer memory and time (which must increase with the number of polarization terms you require).

Loss and gain

If γ above is nonzero, then the dielectric function ε(ω) becomes complex, where the imaginary part is associated with absorption loss in the material if it is positive, or gain if it is negative.

If you look at Maxwell's equations, then d\mathbf{P}/dt plays exactly the same role as a current \mathbf{J}. Just as \mathbf{J} \cdot \mathbf{E} is the rate of change of mechanical energy (the power expended by the electric field on moving the currents), the rate at which energy is lost to absorption is given by:

absorption rate \sim \frac{d\mathbf{P}}{dt} \cdot \mathbf{E}

Meep can keep track of this energy, which for gain gives the amount of energy expended in amplifying the field. Using this energy, Meep supports the idea of a saturable gain (e.g. a situation in which there is a depletable population inversion causing the gain). For more information, see saturable gain in Meep.

Nonlinearity

In general, ε can be changed by the E field itself, with:

\Delta\varepsilon_{ij} = \sum_{k} \chi_{ijk}^{(1)} E_k + \sum_{k\ell} \chi_{ijk\ell}^{(2)} E_k E_\ell  + \cdots

where the ij is the index of the change in the 3×3 ε tensor and the χ terms are the nonlinear susceptibilities. The χ(1) term is the Pockels effect and the χ(2) term is the Kerr effect. (The above expansion assumes that the nonlinearity is instantaneous; more generally, Δε would depend on some average of the fields at previous times.)

Currently, Meep supports instantaneous, isotropic Kerr nonlinearities, where Failed to parse (unknown error): \chi_{ijk\ell}^{(2)} = \chi^{{2)} \cdot \delta_{ij} \delta{k\ell} , so that

Failed to parse (unknown error): \Delta\varepsilon = \chi^{{2)} |\mathbf{E}|^2 .


Units in Meep

Finite-difference time-domain methods

The illusion of continuity in Meep

Although FDTD inherently uses discretized space and time, as much as possible Meep attempts to maintain the illusion that you are using continuous system.

Other computational methods

Applications of FDTD

Field patterns and Green's functions

Transmission/reflection spectra

Resonant modes

Personal tools