FDTD Explained
FDTD (Finite-Difference Time-Domain) is the other main solver type in COMPASS. Unlike RCWA which works in frequency space, FDTD directly simulates how electromagnetic waves propagate through space over time. It divides space into a 3D grid and marches forward in time step by step, like watching a movie of light passing through the pixel.
The Finite-Difference Time-Domain (FDTD) method is the second major solver approach in COMPASS. It directly solves Maxwell's equations on a discrete spatial and temporal grid.
Core idea
FDTD replaces the continuous derivatives in Maxwell's equations with finite differences on a staggered grid (the Yee lattice). The electric and magnetic fields are updated alternately in a leapfrog time-stepping scheme:
- Update
from (half time step). - Update
from (half time step). - Repeat until the simulation reaches steady state or a pulse has fully propagated.
The Yee lattice
The Yee cell places the six field components (
Hz ---- Ey
| |
Ex |
| |
Ey ---- HzThis staggering ensures that every finite-difference curl approximation is second-order accurate and naturally satisfies the divergence conditions (
Interactive Yee Cell Viewer
Visualize the staggered Yee grid cell used in FDTD simulations. E-field components sit on cell edges, while H-field components sit on face centers.
The Yee cell staggers E and H field components in both space and time. E-field components are located on the edges of the cell, while H-field components are located at the face centers.
This arrangement ensures that every curl finite-difference is centered, giving second-order accuracy. The spatial staggering by half a grid cell naturally satisfies the divergence-free conditions for both E and B fields.
For a grid spacing of 25 nm, the cell resolves 5.5 points per wavelength at 550 nm in silicon (n=4). A minimum of 10 cells per wavelength is recommended.
Update equations
The update equations for a single component (e.g.,
The magnetic field components are updated analogously.
Stability: the Courant condition
The time step
where
Boundary conditions
Periodic boundaries (Bloch)
For pixel simulations with plane wave excitation, COMPASS uses Bloch periodic boundary conditions in the lateral (xy) directions:
This models an infinite array of identical pixels, matching the assumption in RCWA.
Absorbing boundaries (PML)
In the vertical (z) direction, Perfectly Matched Layers (PML) absorb outgoing waves without reflection. PML is a lossy medium with conductivity that increases gradually into the boundary:
The exponent
Source injection
COMPASS injects a plane wave using the total-field/scattered-field (TFSF) technique or by specifying field values on a source plane. For a monochromatic simulation, a CW (continuous-wave) source is used and the simulation runs until the fields reach steady state.
Extracting results
After the FDTD simulation reaches steady state, COMPASS extracts:
- Reflection and transmission: Poynting flux through monitor planes above and below the structure.
- Field distributions: Snapshot of
on any plane. - Absorption per pixel: Volume integral of
within each photodiode region.
Grid resolution
The spatial grid must resolve both the smallest geometric features and the shortest wavelength in any material:
where
This can lead to large grids and long run times compared to RCWA.
FDTD solvers in COMPASS
| Solver | Library | GPU support | Notes |
|---|---|---|---|
fdtd_flaport | fdtd (flaport) | CUDA (PyTorch) | Lightweight, good for prototyping. |
fdtdz | fdtdz | CUDA | Specialized for layered 2.5D structures. |
meep | Meep | CPU (MPI) | Full-featured, supports dispersive materials natively. |
When to choose FDTD
FDTD is the better choice when:
- The structure has non-periodic or aperiodic features.
- You need a broadband response from a single simulation run (pulse excitation).
- You want to visualize time-domain field propagation.
- You are studying near-field effects that are hard to extract from Fourier-space data.
For standard periodic pixel simulations, RCWA is usually faster and more accurate. See RCWA vs FDTD for a detailed comparison.