Skip to content

FDTD Explained

선수 지식 | Prerequisites

전자기파 → 이 페이지 FDTD가 처음이라면 먼저 솔버 선택 가이드에서 개요를 확인하세요.

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:

  1. Update H from E (half time step).
  2. Update E from H (half time step).
  3. Repeat until the simulation reaches steady state or a pulse has fully propagated.

The Yee lattice

The Yee cell places the six field components (Ex,Ey,Ez,Hx,Hy,Hz) at staggered positions within each grid cell:

        Hz ---- Ey
        |       |
        Ex      |
        |       |
        Ey ---- Hz

This staggering ensures that every finite-difference curl approximation is second-order accurate and naturally satisfies the divergence conditions (B=0).

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.

Cells per wavelength (550 nm):5.5
Courant number S:0.5716
Stability limit (1/sqrt(3)):0.5774
Warning: Need 10+ cells/wavelength for accuracy
xyzExEyEzHxHyHz
Staggered Grid Concept

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., Ex) in a non-magnetic medium:

Exn+1(i,j,k)=Exn(i,j,k)+Δtε0εr(i,j,k)(Hzn+1/2(i,j,k)Hzn+1/2(i,j1,k)ΔyHyn+1/2(i,j,k)Hyn+1/2(i,j,k1)Δz)

The magnetic field components are updated analogously.

Stability: the Courant condition

The time step Δt must satisfy the Courant-Friedrichs-Lewy (CFL) condition to prevent numerical instability:

Δt1c1Δx2+1Δy2+1Δz2

where c is the speed of light. COMPASS FDTD solvers automatically compute the maximum stable time step from the grid spacing.

Boundary conditions

Periodic boundaries (Bloch)

For pixel simulations with plane wave excitation, COMPASS uses Bloch periodic boundary conditions in the lateral (xy) directions:

E(x+Λx,y,z)=E(x,y,z)eikxΛx

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:

σ(z)=σmax(zdPML)p

The exponent p (typically 3-4) and the PML thickness (typically 10-20 cells) control the absorption quality. Abrupt PML can cause spurious reflections.

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 |E|2 on any plane.
  • Absorption per pixel: Volume integral of 12ωε|E|2 within each photodiode region.

Grid resolution

The spatial grid must resolve both the smallest geometric features and the shortest wavelength in any material:

ΔxλminnmaxNppw

where Nppw is the number of points per wavelength (typically 15-20 for second-order FDTD). For silicon (n4) at 400 nm:

Δx0.4 um4×20=5 nm

This can lead to large grids and long run times compared to RCWA.

FDTD solvers in COMPASS

SolverLibraryGPU supportNotes
fdtd_flaportfdtd (flaport)CUDA (PyTorch)Lightweight, good for prototyping.
fdtdzfdtdzCUDASpecialized for layered 2.5D structures.
meepMeepCPU (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.