Does light charge the quons? › Files cited on the page › check_trials25-27_fable/
a6_gyro.py
"""A6 (blind): Variant G (gyro_band.py; h = 1/6, A = 1/36, wheel inertia 1). Thirty-fifth reviewer, 25 November 2026.
(a) the law for small waves; (b) one slipped band's couple over time against a plain lattice (slip 0.06, 10^3 cells);
(c) how fast a small gimbal tilt grows under a standing twist of amplitude a: one gyrostat with a prescribed twist, and in the lattice.
By hand [D], from L = (1/2) A (beta'^2 + theta'^2 cos^2 beta) + h theta' sin beta (the code's two equations follow from it):
(a) Small angles: A beta' = h theta (in step), C = A theta'' + (h^2/A) theta: a band of stiffness K = h^2/A = 1 with an inertia A = 1/36.
(I + A S^T S) phi'' = -K S^T S phi, so for a transverse wave w^2 = K Kt^2/(1 + A Kt^2) = Kt^2/(1 + Kt^2/36): the plain law with a pole
at w^2 = K/A = 36 (the band is a relay). At k = pi (Kt^2 = 4): w^2 = 3.6. RK4 adds only O((w dt)^4) error.
(b) A steady twist theta (a slipped band at rest) makes the gimbal turn steadily, beta' = (h/A) theta = 6 theta, and the couple is
C = h beta' cos beta = K theta cos beta. So the gyrostat cannot hold a steady load: as beta turns through, its couple swings between
+K theta and -K theta and averages to nothing, while a plain band's couple settles to (2/3) slip (its own static Coulomb share) = 0.04.
Kelvin's medium is quasi-elastic for oscillation, not for a standing strain; a charge's field in Variant G cannot be static.
(c) Prescribed theta = a cos(w t), in step: beta = beta0 + B sin(w t), B = (h/A) a/w = 6a/w. Averaging the beta equation over a period:
<beta0''> = [ (h/A)^2 a^2/2 - a^2 w^2/2 ] sin beta0 (the first from h theta' cos beta with the oscillating tilt, the second from -A theta'^2 sin beta cos beta).
So a small mean tilt grows as e^(lambda t) with lambda = a sqrt((h/A)^2 - w^2)/sqrt 2 = a sqrt(18 - w^2/2), for every twist wave below the pole w = 6.
At w ~ 1: lambda = 4.2 a. In the lattice each gyrostat sees its own local amplitude a_b, so the antinodes tilt first.
"""
import subprocess, sys, time
import numpy as np
sys.path.insert(0, "/home/doug/aetherscience.org/aspden-investigation/sim/m8_engine")
import engine as eng
import gyro_band as gb
sys.path.insert(0, "/home/doug/aetherscience.org/aspden-investigation/sim/m8_engine/check_trials25-27_fable")
from a2_charge_tools import prony_damped
print("git HEAD:", subprocess.run(["git", "rev-parse", "HEAD"], capture_output=True, text=True,
cwd="/home/doug/aetherscience.org/aspden-investigation").stdout.strip())
print("clock:", time.strftime("%Y-%m-%d %H:%M:%S %Z"))
h, A = 1 / 6, 1 / 36
# (a) small waves
print("\n(a) small waves, N = 16, phi_z = 1e-5 cos(k x) on the z-faces, k = 2 pi m/16, started in step, RK4 dt = 0.02")
N = 16; shape = (N, N, N); dt = 0.02
xg = np.arange(N)[:, None, None] * np.ones(shape)
print(f"{'m':>3} {'Kt^2':>9} {'w plain band':>13} {'w by hand G':>13} {'w engine G':>13} {'diff':>9}")
for m in (1, 2, 4, 8):
k = 2 * np.pi * m / N; Kt2 = 4 * np.sin(k / 2) ** 2
G = gb.GyroLattice(shape, h, A)
G.phi[2] = 1e-5 * np.cos(k * xg)
G.start_in_step()
sig = []
for _ in range(int(40 / dt)):
sig.append(G.phi[2, 0, 5, 7]); G.step(dt)
w, _ = eng.prony_frequencies(np.array(sig), dt, 1, with_zero=True)
wh = np.sqrt(Kt2 / (1 + A * Kt2))
print(f"{m:>3} {Kt2:>9.5f} {np.sqrt(Kt2):>13.8f} {wh:>13.8f} {w[0]:>13.8f} {w[0] - wh:>9.1e}")
# (b) one slipped band
print("\n(b) one slipped band, slip 0.06, 10^3 cells; couple on that band over time (K = kappa = 1): Variant G against the plain lattice; dt = 0.02")
N = 10; shape = (N, N, N); c = 5; dt = 0.02
slip = np.zeros((3, *shape)); slip[0, c, c, c] = 0.06
G = gb.GyroLattice(shape, h, A, slip=slip); G.start_in_step()
P = eng.Lattice(shape, dt); P.E[0, c, c, c] = 0.06
T = 150
tg, cg, bg, thg, cp = [], [], [], [], []
for s in range(int(T / dt) + 1):
if s % 10 == 0:
tg.append(G.t); cg.append(G.couple()[0, c, c, c]); bg.append(G.beta[0, c, c, c]); thg.append((gb.S(G.phi) + slip)[0, c, c, c]); cp.append(P.E[0, c, c, c])
G.step(dt); P.step()
tg, cg, bg, thg, cp = map(np.array, (tg, cg, bg, thg, cp))
print(f"{'t':>6} {'G couple':>10} {'G twist':>9} {'G gimbal beta':>14} | {'plain couple':>13}")
for tt in list(range(0, 21, 2)) + list(range(30, 151, 15)):
i = int(round(tt / (10 * dt)))
print(f"{tg[i]:>6.1f} {cg[i]:>10.5f} {thg[i]:>9.5f} {bg[i]:>14.3f} | {cp[i]:>13.5f}")
late = tg >= 50
print(f"time means over t in [50, 150]: Variant G couple {cg[late].mean():+.5f} (rms {np.sqrt((cg[late]**2).mean()):.5f}); plain {cp[late].mean():+.5f} (rms about its mean {cp[late].std():.5f})")
print(f"by hand: plain settles about (2/3) slip (1 + 1/(2 N^3)) = {0.06 * (2 / 3 + 1 / (3 * N**3)):.5f}; Variant G's gimbal turns at about 6 x twist and its couple swings as cos(beta)")
# (c) one gyrostat with a prescribed twist
print("\n(c1) one gyrostat, theta = a cos(w t), in step; mean tilt beta0 sampled once a period; growth rate lambda from a fit of ln|beta0|")
print(f"{'a':>6} {'w':>5} {'B=6a/w':>7} {'lambda run':>11} {'lambda by hand':>14} {'ratio':>6}")
def gyro_rhs(y, t, a, w):
beta, bd = y
thd = -a * w * np.sin(w * t)
return np.array([bd, (h * thd * np.cos(beta) - A * thd**2 * np.sin(beta) * np.cos(beta)) / A])
for a, w in ((0.005, 1.0), (0.01, 1.0), (0.02, 1.0), (0.01, 0.5), (0.01, 2.0), (0.02, 4.0), (0.05, 5.5)):
lam_h = a * np.sqrt(18 - w * w / 2)
per = 2 * np.pi / w; nps = 400; dt = per / nps
y = np.array([1e-7, h / A * a]); t = 0.0
samples = []
nper = int(min(10 / lam_h, 600) / per) + 2
for n in range(nper):
for _ in range(nps):
k1 = gyro_rhs(y, t, a, w); k2 = gyro_rhs(y + dt / 2 * k1, t + dt / 2, a, w)
k3 = gyro_rhs(y + dt / 2 * k2, t + dt / 2, a, w); k4 = gyro_rhs(y + dt * k3, t + dt, a, w)
y = y + dt / 6 * (k1 + 2 * k2 + 2 * k3 + k4); t += dt
samples.append((t, y[0]))
samples = np.array(samples)
ok = (np.abs(samples[:, 1]) > 1e-6) & (np.abs(samples[:, 1]) < 0.05)
if ok.sum() >= 3:
lam = np.polyfit(samples[ok, 0], np.log(np.abs(samples[ok, 1])), 1)[0]
print(f"{a:>6} {w:>5} {6 * a / w:>7.3f} {lam:>11.5f} {lam_h:>14.5f} {lam / lam_h:>6.3f} (final beta0 {samples[-1, 1]:+.3e} at t = {samples[-1, 0]:.0f})")
else:
print(f"{a:>6} {w:>5} {6 * a / w:>7.3f} no growth window: beta0 went {samples[0, 1]:+.2e} -> {samples[-1, 1]:+.2e} by t = {samples[-1, 0]:.0f} (by hand lambda {lam_h:.5f})")
# (c2) in the lattice
print("\n(c2) in the lattice: N = 8, standing twist wave along x (k = 2 pi/8), twist amplitude a at the antinodes, gimbals seeded at 1e-7, in step")
N = 8; shape = (N, N, N)
k = 2 * np.pi / N; Kt = 2 * np.sin(k / 2); w = Kt / np.sqrt(1 + A * Kt**2)
per = 2 * np.pi / w; nps = 300; dt = per / nps
xg = np.arange(N)[:, None, None] * np.ones(shape)
for a in (0.01, 0.02):
G = gb.GyroLattice(shape, h, A)
G.phi[2] = (a / Kt) * np.cos(k * xg) # twist on the y-bands: a sin(k (x - 1/2)); largest |.| at x = 2, 3 (0.924 a) and x = 6, 7
G.start_in_step()
G.beta[:] = 1e-7
a_loc = a * abs(np.sin(k * (2 - 0.5)))
lam_h = a_loc * np.sqrt(18 - w * w / 2)
rows = []
nper = int(min(9 / lam_h, 900) / per) + 1
for n in range(nper):
for _ in range(nps):
G.step(dt)
rows.append((G.t, G.beta[1, 2, 4, 4], G.beta[1, 4, 4, 4], G.beta.mean(), np.abs(gb.S(G.phi)).max()))
rows = np.array(rows)
ok = (np.abs(rows[:, 1]) > 1e-6) & (np.abs(rows[:, 1]) < 0.05)
lam = np.polyfit(rows[ok, 0], np.log(np.abs(rows[ok, 1])), 1)[0] if ok.sum() >= 3 else float("nan")
print(f" a = {a}: wave w = {w:.5f} (period {per:.2f}); band at x = 2 has local amplitude {a_loc:.5f}; growth of its mean tilt: lambda run = {lam:.5f}, by hand {lam_h:.5f}, ratio {lam / lam_h:.3f}")
print(f" tilt at x = 2 (antinode): {rows[0, 1]:+.2e} at t = {rows[0, 0]:.0f} -> {rows[-1, 1]:+.2e} at t = {rows[-1, 0]:.0f}; at x = 4 (near a node, local amplitude {a * abs(np.sin(k * 3.5)):.4f}): {rows[-1, 2]:+.2e}; box mean {rows[-1, 3]:+.2e}; largest twist now {rows[-1, 4]:.5f} (start {a_loc / abs(np.sin(k * 1.5)) * 1:.5f})")
print("clock:", time.strftime("%Y-%m-%d %H:%M:%S %Z"))