Whittaker's History (1910), reviewed › The review's files
check_crystal_tie.py
#!/usr/bin/env python3
"""The author seat's check of the thirty-first reviewer's part 2, F10: do crystals decide between the two readings of MacCullagh's medium? Own code; post hoc.
Reading T (Thomson, Glazebrook): the medium's displacement u ~ E; isotropic stiffness, anisotropic inertia rho_ij ~ eps_ij: rho u'' = -k curl curl u.
Reading F (FitzGerald, MacCullagh): u' ~ H, curl u ~ D; anisotropic stiffness (1/eps)_ij, isotropic inertia: rho u'' = -curl (C curl u).
Maxwell in a crystal: for plane waves, the two allowed phase speeds in each direction (Fresnel's wave surface). Compare all three."""
import subprocess
import numpy as np
print("git HEAD:", subprocess.run(["git", "rev-parse", "HEAD"], capture_output=True, text=True).stdout.strip())
rng = np.random.default_rng(7)
eps = np.diag([2.1, 2.4, 3.0]) # a biaxial crystal, mu = mu0 = 1
inv = np.linalg.inv(eps)
worst_T = worst_F = 0
for _ in range(500):
n = rng.normal(size=3); n /= np.linalg.norm(n)
K = np.array([[0, -n[2], n[1]], [n[2], 0, -n[0]], [-n[1], n[0], 0]]) # n x
# Maxwell: eps^-1 (n x (n x H)) ... for D: v^2 D = -(n x (n x eps^-1 D)); transverse modes
M_max = -K @ K @ inv
vmax = np.sort(np.linalg.eigvals(M_max).real)[1:]
# reading T: rho = eps, stiffness 1: v^2 eps u = -(n x n x u) -> eigenvalues of eps^-1 (-K K)
vT = np.sort(np.linalg.eigvals(inv @ (-K @ K)).real)[1:]
# reading F: rho = 1, stiffness C = eps^-1 on the twist: v^2 u = -(n x (C (n x u)))
vF = np.sort(np.linalg.eigvals(-K @ inv @ K).real)[1:]
worst_T = max(worst_T, np.abs(vT - vmax).max()); worst_F = max(worst_F, np.abs(vF - vmax).max())
print(f"500 directions in a biaxial crystal: largest difference of v^2 from Maxwell's: reading T {worst_T:.1e}; reading F {worst_F:.1e}")
print("Both readings give Fresnel's crystal optics exactly: crystals do not decide between them (the reviewer's F10 stands).")