Add-drop ring resonator
2D FDTD of a 5 µm add-drop ring, PSFDTD against Meep
A 5 µm radius ring between two bus waveguides (400 nm wide, 100 nm gaps) in a 2D effective-index model. Resonant devices stress what the other examples do not: a long ring-down (the run covers a fixed 20 ps) and sub-nanometre sensitivity to numerical dispersion.
Setup
220 nm silicon strip (n = 3.476) fully clad in SiO₂ (n = 1.444), both non-dispersive, 500 nm wide access guides, TE0 launched by a mode source, 1500–1600 nm from one Gaussian-pulse run. Both solvers read the same polygon list and port planes from bench/devices.py, use a uniform grid of the same step with sub-pixel smoothing, and report TE0 mode-overlap power at each output divided by the forward TE0 power at a monitor just after the source.
Two-dimensional top view, Hz polarisation, core index 2.848 (the slab's TE effective index), domain 16 × 14 µm plus PML.

Spectrum
Resonances against the grid
A transmission value at a fixed wavelength is not a useful convergence measure for a resonator: the resonance moves with the grid, so the 1550 nm value swings between off and on resonance. The quantities compared here are the drop-port resonance wavelength and the loaded Q (wavelength over the full width at half maximum of the drop peak), read from the 801-point spectrum (0.125 nm steps). At 25 cells per µm, the finest grid both solvers ran, each PSFDTD drop-port resonance has a Meep resonance within 5.40 nm.
Data table
| Series | Grid resolution (cells per µm) | Resonance wavelength (nm) |
|---|---|---|
| PSFDTD | 25 | 1557.8 |
| PSFDTD | 50 | 1552.7 |
| PSFDTD | 100 | 1551.5 |
| PSFDTD | 200 | 1551.1 |
Resonance wavelength (nm) / loaded Q at each grid; a dash means no drop peak was found within 11 nm of the finest grid's resonance:
| Resonance | PSFDTD 25 | PSFDTD 50 | PSFDTD 100 | PSFDTD 200 | Meep 25 |
|---|---|---|---|---|---|
| 1 | 1512.07 / 585 | 1506.70 / 606 | 1505.39 / 610 | 1505.03 / 611 | – |
| 2 | 1534.60 / 506 | 1529.37 / 532 | 1528.09 / 535 | 1527.74 / 536 | 1517.02 / 512 |
| 3 | 1557.78 / 449 | 1552.69 / 465 | 1551.46 / 468 | 1551.11 / 469 | – |
| 4 | 1581.65 / 393 | 1576.70 / 406 | 1575.49 / 408 | 1575.16 / 409 | – |
Runtime
| Solver | Cells per µm | Grid | Stepped cells (M) | Steps | Time stepping | Mcells·steps/s |
|---|---|---|---|---|---|---|
| PSFDTD | 25 | 432×382×1 | 0.17 | 214275 | 18.1 s | 1954 |
| PSFDTD | 50 | 832×732×1 | 0.61 | 428550 | 17.3 s | 15083 |
| PSFDTD | 100 | 1632×1432×1 | 2.34 | 857100 | 45.0 s | 44516 |
| PSFDTD | 200 | 3232×2832×1 | 9.15 | 1714199 | 13.3 min | 19698 |
| Meep | 25 | 450×400×1 | 0.18 | 300000 | 10.5 min ⁎ | 86 ⁎ |
PSFDTD: NVIDIA RTX 4090 (single precision); its grid column includes the PML cells. Meep 1.33.0: one core of an AMD Ryzen 9 9950X under WSL2 (the conda build has no MPI), double precision; in 3D it uses the z mirror plane, so it steps half the grid shown. Times are time stepping only, without mesh generation, mode solving or post-processing. The Meep runs themselves shared the machine with other jobs, so their wall times are not used: each Meep time is the stepping rate of that case measured alone on an idle machine (300 steps, all monitors active) multiplied by the run's step count. Rows marked ⁎ have no idle-machine rate and show the contended wall time, which overstates Meep's cost.
Reproduce
# device specs
python bench/devices.py bench/work/specs
# PSFDTD (Windows, GPU): device, cells per µm
python bench/run_psfdtd.py bench/work/specs/ring.json 40 bench/work/psfdtd/ring_res40 --field
# Meep (WSL, micromamba env with pymeep)
bash bench/meep.sh ring 25