90° waveguide bend
3D FDTD of circular 90° strip bends, PSFDTD against Meep
A circular 90° bend of a 500 × 220 nm silicon strip, the simplest device where the two FDTD codes must agree on a curved, non-grid-aligned boundary and on a mode monitor normal to a different axis than the source. The headline case is R = 3 µm; R = 1.5 µm is checked the same way below.
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 7.5 × 7.5 × 2 µm plus PML (PSFDTD: 16 layers; Meep: 1 µm).

Spectrum
Grid convergence
At 32 cells per µm (31.25 nm), the finest grid both solvers ran, at 1550 nm T(out) = 0.9935 (PSFDTD) against 0.9941 (Meep), largest difference over 1500–1600 nm 0.0011. Refining PSFDTD from there to 80 cells per µm moves the 1550 nm value by at most 0.0005, so at that grid the two solvers differ by more than the remaining discretisation error of either.
Data table
| Series | Grid resolution (cells per µm) | T(out) at 1550 nm |
|---|---|---|
| PSFDTD | 20 | 0.99372 |
| PSFDTD | 25 | 0.99335 |
| PSFDTD | 32 | 0.99348 |
| PSFDTD | 40 | 0.99327 |
| PSFDTD | 50 | 0.99311 |
| PSFDTD | 64 | 0.99296 |
| PSFDTD | 80 | 0.99293 |
| Meep | 20 | 0.994 |
| Meep | 25 | 1.0242 |
| Meep | 32 | 0.99414 |
| Cells per µm | Cell (nm) | PSFDTD out | Meep out | Δ |
|---|---|---|---|---|
| 20 | 50 | 0.9937 | 0.9940 | -0.0003 |
| 25 | 40 | 0.9933 | 1.0242 | -0.0308 |
| 32 | 31.25 | 0.9935 | 0.9941 | -0.0007 |
| 40 | 25 | 0.9933 | – | – |
| 50 | 20 | 0.9931 | – | – |
| 64 | 15.625 | 0.9930 | – | – |
| 80 | 12.5 | 0.9929 | – | – |
Radius sweep
TE0 loss of the 90° bend against its radius, PSFDTD at 25 nm cells. The loss includes the two straight-to-bend junctions, which dominate above about 2 µm.
Data table
| Series | Bend radius (µm) | Loss at 1550 nm (dB) |
|---|---|---|
| PSFDTD, 40 cells/µm | 1 | 0.42448 |
| PSFDTD, 40 cells/µm | 1.5 | 0.16346 |
| PSFDTD, 40 cells/µm | 2 | 0.069872 |
| PSFDTD, 40 cells/µm | 3 | 0.029321 |
| PSFDTD, 40 cells/µm | 5 | 0.01093 |
| Radius (µm) | T (TE0) | Loss (dB) | Reflection |
|---|---|---|---|
| 1 | 0.9069 | 0.424 | 2.9e-06 |
| 1.5 | 0.9631 | 0.163 | 8.0e-07 |
| 2 | 0.9840 | 0.070 | 1.2e-06 |
| 3 | 0.9933 | 0.029 | 1.3e-06 |
| 5 | 0.9975 | 0.011 | 2.3e-06 |
Mode overlap against net flux
The two ports of a bend are normal to different axes, which exposes a normalisation problem the straight devices hide. In Meep, the TE0 power from get_eigenmode_coefficients at the y-normal output divided by that at the x-normal input can exceed 1 on these coarse grids, which is unphysical, while the ratio of net fluxes through the same two monitors stays below 1. In PSFDTD the mode-overlap power and the net flux at the input monitor agree, and the overlap ratio stays below the flux ratio at every grid, as it must when a little power leaves the port in other modes. Where Meep's overlap value is above 1, compare the flux columns instead; we have not established which part of Meep's mode projection causes it.
R = 3 µm:
| Solver | Cells per µm | TE0 mode overlap | Net flux ratio |
|---|---|---|---|
| PSFDTD | 20 | 0.9937 | 0.9965 |
| PSFDTD | 25 | 0.9933 | 0.9963 |
| PSFDTD | 32 | 0.9935 | 0.9963 |
| PSFDTD | 40 | 0.9933 | 0.9963 |
| PSFDTD | 50 | 0.9931 | 0.9962 |
| PSFDTD | 64 | 0.9930 | 0.9962 |
| PSFDTD | 80 | 0.9929 | 0.9962 |
| Meep | 20 | 0.9940 | 0.9961 |
| Meep | 25 | 1.0242 | 0.9866 |
| Meep | 32 | 0.9941 | 0.9964 |
R = 1.5 µm:
| Solver | Cells per µm | TE0 mode overlap | Net flux ratio |
|---|---|---|---|
| PSFDTD | 20 | 0.9628 | 0.9818 |
| PSFDTD | 25 | 0.9625 | 0.9814 |
| PSFDTD | 32 | 0.9634 | 0.9821 |
| PSFDTD | 40 | 0.9631 | 0.9815 |
| PSFDTD | 50 | 0.9627 | 0.9812 |
| PSFDTD | 64 | 0.9629 | 0.9811 |
| PSFDTD | 80 | 0.9628 | 0.9811 |
| Meep | 20 | 0.9633 | 0.9822 |
| Meep | 25 | 1.0410 | 0.9830 |
| Meep | 32 | 0.9639 | – |
R = 1.5 µm
At 32 cells per µm (31.25 nm), the finest grid both solvers ran, at 1550 nm T(out) = 0.9634 (PSFDTD) against 0.9639 (Meep), largest difference over 1500–1600 nm 0.0010. Refining PSFDTD from there to 80 cells per µm moves the 1550 nm value by at most 0.0006, 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(out) at 1550 nm |
|---|---|---|
| PSFDTD | 20 | 0.96279 |
| PSFDTD | 25 | 0.96245 |
| PSFDTD | 32 | 0.96338 |
| PSFDTD | 40 | 0.96306 |
| PSFDTD | 50 | 0.96272 |
| PSFDTD | 64 | 0.96286 |
| PSFDTD | 80 | 0.96282 |
| Meep | 20 | 0.9633 |
| Meep | 25 | 1.041 |
| Meep | 32 | 0.96385 |
| Cells per µm | Cell (nm) | PSFDTD out | Meep out | Δ |
|---|---|---|---|---|
| 20 | 50 | 0.9628 | 0.9633 | -0.0005 |
| 25 | 40 | 0.9625 | 1.0410 | -0.0786 |
| 32 | 31.25 | 0.9634 | 0.9639 | -0.0005 |
| 40 | 25 | 0.9631 | – | – |
| 50 | 20 | 0.9627 | – | – |
| 64 | 15.625 | 0.9629 | – | – |
| 80 | 12.5 | 0.9628 | – | – |
Runtime
| Solver | Cells per µm | Grid | Stepped cells (M) | Steps | Time stepping | Mcells·steps/s |
|---|---|---|---|---|---|---|
| PSFDTD | 20 | 182×182×72 | 2.38 | 2800 | 1.0 s | 6485 |
| PSFDTD | 25 | 220×220×82 | 3.97 | 3400 | 2.0 s | 6626 |
| PSFDTD | 32 | 272×272×96 | 7.10 | 4200 | 4.3 s | 6859 |
| PSFDTD | 40 | 332×332×112 | 12.35 | 5200 | 8.7 s | 7416 |
| PSFDTD | 50 | 407×407×132 | 21.87 | 6000 | 16.8 s | 7802 |
| PSFDTD | 64 | 512×512×160 | 41.94 | 7200 | 34.1 s | 8862 |
| PSFDTD | 80 | 632×632×192 | 76.69 | 9000 | 101 s | 6863 |
| Meep | 20 | 190×190×80 | 1.53 | 6004 | 564 s ⁎ | 16 ⁎ |
| Meep | 25 | 238×238×100 | 2.97 | 7505 | 16.0 min ⁎ | 23 ⁎ |
| Meep | 32 | 304×304×128 | 6.14 | 9606 | 40.6 min ⁎ | 24 ⁎ |
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/bend_r3.json 40 bench/work/psfdtd/bend_r3_res40 --field
# Meep (WSL, micromamba env with pymeep)
bash bench/meep.sh bend_r3 25