Directional coupler
3D FDTD of a 200 nm-gap directional coupler, PSFDTD against Meep
Two 500 nm strips with a 200 nm gap, coupled over 10 µm, with 6 µm cosine S-bends on both sides (port pitch 2.7 µm). Power exchange depends exponentially on the gap, which makes this the hardest test of sub-pixel smoothing in the set.
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.
Domain 27 × 5.7 × 2 µm plus PML (PSFDTD: 16 layers; Meep: 1 µm).

Spectrum
Grid convergence
At 25 cells per µm (40 nm), the finest grid both solvers ran, at 1550 nm T(cross) = 0.2520 (PSFDTD) against 0.2347 (Meep), largest difference over 1500–1600 nm 0.0229; T(through) = 0.7439 (PSFDTD) against 0.7610 (Meep), largest difference over 1500–1600 nm 0.0217. Refining PSFDTD from there to 64 cells per µm moves the 1550 nm value by at most 0.0184, so at that grid the two solvers differ by less than the remaining discretisation error of either.
Data table
| Series | Grid resolution (cells per µm) | T(cross) at 1550 nm |
|---|---|---|
| PSFDTD | 20 | 0.26122 |
| PSFDTD | 25 | 0.25197 |
| PSFDTD | 32 | 0.21245 |
| PSFDTD | 40 | 0.2321 |
| PSFDTD | 50 | 0.22311 |
| PSFDTD | 64 | 0.23354 |
| Meep | 20 | 0.27067 |
| Meep | 25 | 0.23473 |
Data table
| Series | Grid resolution (cells per µm) | T(through) at 1550 nm |
|---|---|---|
| PSFDTD | 20 | 0.73175 |
| PSFDTD | 25 | 0.7439 |
| PSFDTD | 32 | 0.78302 |
| PSFDTD | 40 | 0.76337 |
| PSFDTD | 50 | 0.77215 |
| PSFDTD | 64 | 0.76221 |
| Meep | 20 | 0.72203 |
| Meep | 25 | 0.76096 |
| Cells per µm | Cell (nm) | PSFDTD cross | Meep cross | Δ | PSFDTD through | Meep through | Δ |
|---|---|---|---|---|---|---|---|
| 20 | 50 | 0.2612 | 0.2707 | -0.0095 | 0.7317 | 0.7220 | +0.0097 |
| 25 | 40 | 0.2520 | 0.2347 | +0.0172 | 0.7439 | 0.7610 | -0.0171 |
| 32 | 31.25 | 0.2124 | – | – | 0.7830 | – | – |
| 40 | 25 | 0.2321 | – | – | 0.7634 | – | – |
| 50 | 20 | 0.2231 | – | – | 0.7721 | – | – |
| 64 | 15.625 | 0.2335 | – | – | 0.7622 | – | – |
Sensitivity to the grid
The coupler is the grid-sensitive device of the set: the 200 nm gap is only 4 cells wide on the coarsest grid, and the 1550 nm cross-port power moves between 0.212 and 0.261 across the PSFDTD grids (0.261, 0.252, 0.212, 0.232, 0.223, 0.234 from coarse to fine) without settling monotonically. Treat the third digit as unresolved at these resolutions in either solver.
Runtime
| Solver | Cells per µm | Grid | Stepped cells (M) | Steps | Time stepping | Mcells·steps/s |
|---|---|---|---|---|---|---|
| PSFDTD | 20 | 572×146×72 | 6.01 | 8400 | 7.6 s | 6658 |
| PSFDTD | 25 | 707×175×82 | 10.15 | 9800 | 13.7 s | 7258 |
| PSFDTD | 32 | 896×214×96 | 18.41 | 12000 | 27.2 s | 8120 |
| PSFDTD | 40 | 1112×260×112 | 32.38 | 15000 | 61.2 s | 7935 |
| PSFDTD | 50 | 1382×317×132 | 57.83 | 18200 | 130 s | 8113 |
| PSFDTD | 64 | 1760×397×160 | 111.80 | 16400 | 238 s | 7697 |
| Meep | 20 | 580×154×80 | 3.78 | 8006 | 29.6 min ⁎ | 17 ⁎ |
| Meep | 25 | 725×192×100 | 7.32 | 10007 | 45.5 min ⁎ | 27 ⁎ |
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/coupler.json 40 bench/work/psfdtd/coupler_res40 --field
# Meep (WSL, micromamba env with pymeep)
bash bench/meep.sh coupler 25