Skip to content

RCWA vs FDTD

선수 지식 | Prerequisites

RCWA 설명FDTD 설명 → 이 페이지

COMPASS supports both RCWA and FDTD solvers. This page helps you understand the trade-offs and choose the right solver for your simulation.

Side-by-side comparison

FeatureRCWAFDTD
DomainFrequency (one wavelength per run)Time (broadband in one run)
GeometryStrictly periodic (infinite array)Arbitrary (periodic, finite, isolated)
DiscretizationFourier harmonics (lateral), exact layers (vertical)Uniform spatial grid in all directions
Thin filmsExact -- no spatial discretization neededMust resolve each film with grid points
Curved surfacesStaircase approximation of microlensesStaircase or sub-pixel smoothing
MemoryScales with (2N+1)2 harmonicsScales with Nx×Ny×Nz grid
Speed (single wavelength)Very fast (seconds on GPU)Slower (must time-step to steady state)
Speed (wavelength sweep)Proportional to number of wavelengthsOne broadband run covers all wavelengths
Numerical stabilityEigenvalue issues at high ordersCFL-limited but generally robust
AccuracyExponential convergence in Fourier orderSecond-order in grid spacing

Accuracy regimes

RCWA excels when

  • The pixel pitch is 1-10 wavelengths (typical for image sensors).
  • The structure is genuinely periodic (2x2 unit cell repeats infinitely).
  • You need high accuracy at specific wavelengths (e.g., for peak QE).
  • Anti-reflection coating design requires exact thin-film treatment.

FDTD excels when

  • The structure has isolated or aperiodic features.
  • You need broadband data and want to avoid looping over wavelengths.
  • Time-domain effects (pulse propagation, transient behavior) are of interest.
  • The geometry is complex and does not decompose into uniform layers.

Practical guidance for image sensors

For a standard BSI pixel simulation in COMPASS:

Use RCWA (default) for:

  • QE spectrum computation
  • Convergence studies (Fourier order sweep)
  • BARL optimization
  • Color filter material selection
  • Parameter sweeps (thickness, pitch, angle)

Use FDTD for:

  • Validating RCWA results at selected wavelengths
  • Studying near-field effects in silicon
  • Visualizing field propagation through the pixel
  • Structures that break periodicity

Cross-validation workflow

A recommended workflow is to use RCWA for fast iteration and FDTD for validation:

COMPASS provides a built-in comparison runner:

yaml
# configs/experiment/solver_comparison.yaml
defaults:
  - pixel: default_bsi_1um
  - source: wavelength_sweep

solvers:
  - name: torcwa
    type: rcwa
  - name: fdtd_flaport
    type: fdtd

And the SolverComparison analysis class computes QE differences, relative errors, and runtime ratios between any pair of solver results.

Performance benchmarks

Typical numbers for a 2x2 Bayer unit cell at 1 um pitch, single wavelength:

MetricRCWA (order 9, GPU)FDTD (5 nm grid, GPU)
Runtime0.3 s45 s
Memory200 MB2 GB
QE accuracy< 0.5% error at order 15+< 1% error at 5 nm grid

For a 41-wavelength sweep (380-780 nm, 10 nm step):

MetricRCWAFDTD
Runtime12 s (41 sequential)45 s (one broadband run)
Total wall time12 s45 s

RCWA wins for narrow-band or moderate sweeps; FDTD can be competitive for very wide-band studies.

RCWA vs FDTD Solver Comparison

Compare simulated quantum efficiency (QE) curves from RCWA and FDTD solvers. Adjust pixel pitch and solver parameters to see how results and performance change.

RCWA (Fourier order = 9)
0%20%40%60%80%100%400500600700Wavelength (nm)QE (%)RedGreenBlue
FDTD (grid = 20 nm)
0%20%40%60%80%100%400500600700Wavelength (nm)QE (%)RedGreenBlue
RCWA
Time estimate:137 ms
Memory:6 MB
Periodic structures:Yes
Arbitrary geometry:Limited
FDTD
Time estimate:188 ms
Memory:3 MB
Periodic structures:Yes
Arbitrary geometry:Yes
Agreement
Max |Delta QE|:2.2%
Avg |Delta QE|:0.9%
Status:Good agreement

Combining results

When both solvers produce results for the same configuration, use the SolverComparison class:

python
from compass.analysis.solver_comparison import SolverComparison

comparison = SolverComparison(
    results=[rcwa_result, fdtd_result],
    labels=["torcwa", "fdtd_flaport"],
)

summary = comparison.summary()
print(f"Max QE difference: {summary['max_qe_diff']}")
print(f"Runtime ratio: {summary['runtimes_seconds']}")