PyStratify against BHMIE

← Verification · Spheres · Plane wave
Reference
BHMIE
Kind
code: another group's code
Calculated
Q_ext, Q_sca to x = 20000
Agreement
1e-10 / report
Large absorbing spheres, m = 1.5 + 0.1i BHMIE's downward recurrence for the logarithmic derivative, ported from the book's Appendix A, against the logarithmic transfer-matrix recursion, both summed 20 orders beyond Wiscombe's truncation; the x axis is logarithmic and the extinction tends to 2 with the ripple of the edge waves. For a weakly absorbing or lossless sphere BHMIE's double-precision recurrence drifts at large x (3e-4 in Q_ext at x = 1481 for m = 1.33 + 1e-4 i, 6e-4 for m = 1.33), where PyStratify agrees with the same series summed in 40-digit arithmetic (pystratify.references.sphere_extinction) to 2e-13: the absorbing case here is the one the test suite asserts.
1000200030004000500000.511.522.533.5size parameter xQext
Qext, PyStratify Qext, BHMIE (Bohren & Huffman, Appendix A)
Hover to read values.
  • largest relative difference: 2.4×10⁻¹³
  • PyStratify the lines, the reference the circles

Run it yourself: test_solver.py · figures.py on GitHub, PyStratify 97e52a9