Consistency checks

← Verification · Spheres · Plane wave

Under active development. Verification is growing as comparisons are added and rerun: the matrix, its figures and their presentation are not yet in their final form. Spotted an error, or missing a topic? Tell us.

Checks that need no other code: closed forms, limits and conservation laws, the same series summed in extended precision, and independent routes through PyStratify's own physics. Each case plots PyStratify against its reference on the same axes.

Metal nanoshell

every Mie coefficient against transfer matrices in 60 digits

Open in calculator
51015202530354010⁻¹⁸⁵10⁻¹⁶²10⁻¹³⁹10⁻¹¹⁶10⁻⁹³10⁻⁷⁰10⁻⁴⁷10⁻²⁴10⁻¹order ℓ|T_ℓ|
|T_ℓ|, electric (TM), PyStratify |T_ℓ|, magnetic (TE), PyStratify electric, 60 digits magnetic, 60 digits
|T_ℓ|, electric (TM)|T_ℓ|, magnetic (TE)PyStratify60 digits

Source

Source typePlane wave
λ [nm]600
ℓ min1
ℓ max40
ℓ step1
R 20 nm k R 20 nm k

Sphere · Plane wave

LabelMaterialnkThickness [nm]
CSilicaconst1.45945015
1Metalconst0.1579173.166225
HAirconst10∞

Field at the centre

the field at the centre against Bohren & Huffman's d₁ and c₁

Open in calculator
0.511.522.533.54024681012size parameter x|field at the centre|
|E(0)|, PyStratify |H(0)|, PyStratify |d₁|, Bohren & Huffman |m c₁|, Bohren & Huffman
|E(0)||H(0)|PyStratifyBohren & Huffman, every 0.1 in x

Source

Source typePlane wave
λ [nm]600
x min0.02
x max4
x step0.02
R 200 nm k R 200 nm k

Sphere · Plane wave

LabelMaterialnkThickness [nm]
CSphereconst30.01x λ / 2π
HAirconst10∞

Homogeneous sphere

Mie's series, one shell and fifty identical shells must agree

Open in calculator
51015202530012345size parameter xQext
Qext, one shell (PyStratify) Qext, fifty identical shells (PyStratify) Qext, Bohren & Huffman Eq. 4.53
Qext, one shell (PyStratify)Qext, fifty identical shells (PyStratify)Qext, Bohren & Huffman Eq. 4.53, every 1 in x

Source

Source typePlane wave
λ [nm]1000
x min0.2
x max30
x step0.2
R 1000 nm k R 1000 nm k

Sphere · Plane wave

LabelMaterialnkThickness [nm]
CSphereconst1.50x λ / 2π
HAirconst10∞

Optical theorem

extinction and scattering two ways: optical theorem, angular integral

Open in calculator
500600700800900100000.10.20.30.40.5λ [nm]Q
Qext, sum over orders (PyStratify) Qsca, sum over orders (PyStratify) Qext, optical theorem (forward amplitude) Qsca, integrated pattern
QextQscasum over orders (PyStratify)Qext, optical theorem (forward amplitude), every 15 nmQsca, integrated pattern, every 15 nm

Source

Source typePlane wave
λ min [nm]450
λ max [nm]1000
λ step [nm]5
R 55 nm k R 55 nm k

Sphere · Plane wave

LabelMaterialnkThickness [nm]
CSilicaconst1.45050
1Auconst0.272.935
HAirconst10∞

Rayleigh limit

the dipole coefficient a₁ against Rayleigh's limit as x → 0

Open in calculator
0.20.40.60.810.1850.190.1950.20.2050.210.215size parameter x|a₁| / x³
|a₁| / x³, PyStratify Rayleigh: (2/3) |(m² − 1)/(m² + 2)|
|a₁| / x³PyStratifyRayleigh: (2/3) |(m² − 1)/(m² + 2)|, every 0.025 in x

Source

Source typePlane wave
λ [nm]614
x min0.005
x max1
x step0.005
R 50 nm k R 50 nm k

Sphere · Plane wave

LabelMaterialnkThickness [nm]
CSphereconst1.50.2x λ / 2π
HAirconst10∞

Lossless multilayer

random lossless multilayers must absorb nothing

5010015020025030010⁻¹⁶10⁻¹⁵10⁻¹⁴10⁻¹³10⁻¹²size parameter x|Q_abs| / Q_ext
|Qabs| / Qext, PyStratify
|Qabs| / Qext

Absorption is what extinction leaves after scattering,

Qabs=Qext−Qsca,Q_\mathrm{abs} = Q_\mathrm{ext} - Q_\mathrm{sca},

so for spheres with no loss anything above rounding is energy the recursion invents. Eight shells of random real indices 1.2–3.5 in water, at every size up to x = 300: it stays below the test's 10⁻¹², growing slowly with the orders summed.

Chiral shell

the T-matrix against transfer matrices in 80 digits

51015202530354010⁻¹³⁷10⁻¹²⁰10⁻¹⁰³10⁻⁸⁶10⁻⁶⁹10⁻⁵²10⁻³⁵10⁻¹⁸10⁻¹order ℓ|T|
|T₊₊|, PyStratify |T₋₋|, PyStratify |T₊₋|, PyStratify |T₊₊|, 80 digits |T₋₋|, 80 digits |T₊₋|, 80 digits
|T₊₊||T₋₋||T₊₋|PyStratify80 digits

Source

Source typePlane wave
λ [nm]690
κ of the shell0.05 + 0.01i
ℓ min1
ℓ max40
ℓ step1
R 55 nm k R 55 nm k

Sphere · Plane wave

LabelMaterialnkThickness [nm]
CCoreconst1.450.0140
1Chiral shellconst1.60.0215
HWaterconst1.330∞

The calculator holds no chirality: this sphere opens there without κ.

Graphene-coated sphere

the plasmon resonance against its quasi-static position

102030405060345678910radius [nm]λ [µm]
resonance, PyStratify (peak of |T₁|) quasi-static: ε₁ℓ + ε₂(ℓ + 1) + iσℓ(ℓ + 1)/(k₀R) = 0
resonancequasi-static: ε₁ℓ + ε₂(ℓ + 1) + iσℓ(ℓ + 1)/(k₀R) = 0PyStratify (peak of |T₁|)

A conducting sheet σ on a sphere of radius R shifts the resonance of order ℓ to where, in the quasi-static limit,

Re[ε1ℓ+ε2(ℓ+1)+iσ ℓ(ℓ+1) λ2πR]=0.\mathrm{Re}\left[\varepsilon_1 \ell + \varepsilon_2 (\ell + 1) + \frac{i\sigma\,\ell(\ell+1)\,\lambda}{2\pi R}\right] = 0.

PyStratify's full solution with the sheet (graphene, EFE_F = 0.5 eV, ε = 2.1 inside, 1.77 outside) finds the peak of |T₁|; the two meet as R→0R \to 0 and part by retardation, within (kR)2(kR)^2 as the test asserts.

Thin film as a sheet

a 1 nm film as a shell and as a 2D conducting sheet

Open in calculator
500550600650700750800850900012345λ [nm]Qext
Qext, 2D sheet (PyStratify) Qext, explicit 1 nm film
QextQext, explicit 1 nm film, every 10 nm2D sheet (PyStratify)explicit 1 nm film, every 10 nm

Source

Source typePlane wave
λ min [nm]500
λ max [nm]900
λ step [nm]2.5
R 201 nm k R 201 nm k

Sphere · Plane wave

LabelMaterialnkThickness [nm]
CCoreconst3.50200
1Filmconst3.925010.6369411
HWaterconst1.330∞

Near-field truncation

|E|² outside with the truncation PyStratify picks, against 120 orders

Open in calculator
10015020025030035040010⁻¹11010²distance from the centre [nm]|E|²
|E|², PyStratify near-field truncation (11 orders) |E|², 120 orders
|E|²PyStratify near-field truncation (11 orders)120 orders, every 10 nm

Source

Source typePlane wave
λ [nm]600
r min [nm]50.5
r max [nm]400.5
r step [nm]2.5
R 50 nm k R 50 nm k

Sphere · Plane wave

LabelMaterialnkThickness [nm]
CGold-likeconst0.25350
HWaterconst1.330∞