PyStratify against NGSolve

← Verification · Cylinders · Point dipole
Reference
NGSolve (3D finite elements; total field of a point dipole, Im(p·E) over the same mesh without the fibre)
Kind
code: another group's code
Calculated
total rate, radial / azimuthal / axial, beside the same fibre, 0.62–1.2 µm across the TE₀₁/TM₀₁ cutoff; a cylindrical cell (radial ⊗ z PML) cut to a quarter by mirror symmetry
Agreement
converges toward PyStratify: worst 1.4% → 0.8% → 0.5% at 0.8 µm and 4.4% → 1.3% → 0.8% at 0.645 µm (75k → 102k → 137k unknowns); ≤ 2.1% over 0.62–1.2 µm on the middle mesh (the figure). Until 2026-10-13 a spherical cell with a radial PML, which met the guided modes badly: up to 7% off away from 0.8 µm and 8–11% at 0.645 µm; asserted: < 3%
A dipole 100 nm outside a step-index fibre (n = 2, radius 150 nm) in vacuum: total decay rates against NGSolve (3D finite elements) Second-order Nédélec elements in a cylindrical cell (radius and half-height 1.2 µm) inside a 1 µm PML, radial in ρ and Cartesian in z, which the fibre runs through; mirror symmetry halves it twice, so each orientation is a quarter problem (~100k unknowns, the middle mesh: 0.25 µm in vacuum, 0.06 µm in the fibre). The rate is Im(p·E) at the dipole over the same on the same mesh with the fibre's permittivity set to 1. TE₀₁ and TM₀₁ are cut off at 0.678 µm; just above it their fields reach far into the vacuum. The difference shrinks with the mesh: worst 1.4% → 0.8% → 0.5% at 0.8 µm and 4.4% → 1.3% → 0.8% at 0.645 µm (FEM_NGSOLVE.md). An earlier spherical cell with a radial PML met the guided modes badly and was off by up to 8–11% here; Meep agrees to 0.74% over the same band.
0.70.80.911.11.20.60.811.21.41.61.822.2λ [µm]Γ / Γ₀
radial, PyStratify azimuthal, PyStratify axial, PyStratify radial, NGSolve azimuthal, NGSolve axial, NGSolve
Hover to read values.
  • largest relative difference (the middle mesh): 0.0205782
  • PyStratify the lines, the reference the circles

Run it yourself: fem_ngsolve.py · test_fem_ngsolve.py · figures.py · FEM_NGSOLVE.md on GitHub, PyStratify 97e52a9