PyStratify against pyGDM2

← Verification · Spheres · Plane wave
Reference
pyGDM2 (a second different method: volume Green dyadic)
Kind
code: another group's code
Calculated
C_ext, C_sca, C_abs of 40 nm-radius n = 2 and n = 2 + 0.1i spheres at the volume-equivalent radius, 425–2235 dipoles; metal spheres shown
Agreement
finest mesh within 4%; observed +2.2–2.9% (the lattice's error at these meshes); metals not asserted (ε = −10 + i still +173% absorption)
An absorbing dielectric sphere (n = 2 + 0.1i, R = 40 nm) in air: cross sections against pyGDM2's volume discretization pyGDM2 (Wiecha) fills the sphere with point dipoles on a hexagonal lattice and solves their coupling; PyStratify is evaluated for the sphere of the same volume (r_eff = 41.27 nm). A volume lattice stays ~3% high at the meshes this machine affords; the test asserts a band, and the report follows four meshes.
40045050055060065070075080002004006008001000120014001600λ [nm]C [nm²]
Cext, PyStratify Csca, PyStratify Cext, pyGDM2 (1405 dipoles) Csca, pyGDM2 (1405 dipoles)
Hover to read values.
  • largest relative difference (the lattice's error at this mesh): 0.0297791
  • PyStratify the lines, the reference the circles

Run it yourself: gdm_spheres.py · test_gdm_spheres.py · figures.py · GDM_SPHERES.md on GitHub, PyStratify 97e52a9