Skip to content

v0.21.0 — Birefringence: o/e spatial ray-splitting + a χ² coupled-wave solver

Choose a tag to compare

@emircbngl emircbngl released this 29 Jun 10:28

v0.21.0 — Birefringence: o/e spatial ray-splitting + a χ² coupled-wave solver

The two biggest-ticket architectural items on the backlog, both landing in the live ray tracer (not the
off-trace analysis layer) yet byte-identical — each gated behind a per-element opt-in flag (default OFF), so
all 18 baseline examples trace unchanged. The tracer already branches rays (beamsplitter, Wollaston) and already
emits walk-off SHG children, so each feature is the same split-two pattern, not a new engine.

True ordinary/extraordinary spatial double refraction (oe_split)

A uniaxial crystal or waveplate with oe_split ON forks one incident ray into an ordinary beam (polarized
perpendicular to the principal plane, index n_o) and an extraordinary beam (polarized in-plane, index n_e),
modeled as a slab: both exit parallel to the input, the e-beam laterally displaced by L·tan(ρ) — the
textbook calcite double image (a fixed displacement set by the crystal thickness, not the screen distance). The
power split is Malus on the eigen-axes; the two beams are orthogonally polarized; energy is conserved. Materials:
calcite, quartz, MgF2, sapphire.

χ² tensor solver: the Manley-Rowe coupled-wave ODE (use_chi2_solver)

A nonlinear crystal with use_chi2_solver ON derives its SHG conversion efficiency from the full Manley-Rowe
coupled-wave equations
(pump depletion + arbitrary phase mismatch, RK4-integrated) instead of a static
efficiency scalar. It is verified against both analytic limits to about 1e-12 (perfect phase match gives
tanh-squared of the square root of the undepleted efficiency; undepleted gives the sinc-squared tuning curve) and
conserves photon number. In-trace, a 1064-to-532 BBO crystal converts more as the pump rises (eta 0.076, then
0.93, then 0.999), pump residual plus harmonic equal the input at every level.

Nonlinear-crystal catalog (sourced + self-validated)

The phase-match angle and walk-off worked only for BBO; added three more uniaxial crystals from
refractiveindex.info, each self-validated by reproducing its textbook Type-I 1064-to-532 phase-match angle (a
wrong coefficient would miss it): KDP (41.2 deg), ADP (41.7 deg), LiIO3 (30.0 deg, exact). KTP and
LBO are biaxial, and congruent LiNbO3 has no room-temperature critical angle for this conversion, so all three
honestly stay outside the uniaxial angle path rather than be modeled wrong.

Type-I and Type-II phase matching

Added the real Type-II condition (one ordinary plus one extraordinary fundamental photon make an
extraordinary harmonic) solved by bisection — BBO 32.84 deg, KDP 59.1 deg, both larger than their Type-I cuts as
a negative uniaxial requires. The Sellmeier-derived walk-off is now per-type.


Verification: textbook validation 219 / 219, byte-identical regression 389 / 389, the bare-interpreter
physics.py self-test, and the MCP-to-API parity meta-test all green; plus two standalone harnesses
(_verify_birefringence.py 6/6, _verify_chi2_tensor.py 14/14) and a physics_verify Docker-oracle pass on the
SHG depletion result. New demos: birefringence-demo.png, chi2-solver-demo.png.

Install / update: the add-on self-updates through Blender's native extension channel, or drag the attached
optical_alignment_sim-0.21.0.zip into Blender (Edit → Preferences → Get Extensions → Install from Disk).