Does light charge the quons? › Files cited on the page › check_m8_fable/
a6_gyrostat.py
#!/usr/bin/env python3
"""A6 (blind): variant G. One gyrostat per edge: flywheel spin momentum h, diameter inertia A, gimbal-frame inertia If.
Frame twist theta (= S phi, the signed sum of the four wheels), gimbal tilt beta about an axis perpendicular to the edge
and to the spin axis. Routhian after removing the cyclic spin coordinate (derived in the text):
L = (A/2)(beta'^2 + theta'^2 cos^2 beta) - h theta' sin beta + (If/2) theta'^2
Small angles: A beta'' = -h theta'; couple on the frame = -(A+If) theta'' - h beta' => an effective spring h^2/A plus inertia A+If.
"""
import subprocess
import numpy as np
from scipy.integrate import solve_ivp
print("git HEAD:", subprocess.run(["git", "rev-parse", "HEAD"], capture_output=True, text=True).stdout.strip())
# (i) small-angle wave law with the extra inertia, units I = 1, d = 1, h^2/A = kappa = 1 => long-wave c = 1
def disp(W2, A, If):
return np.sqrt(W2 / (1 + (A + If) * W2))
print("\n(i) wave law: omega^2 = (h^2/(A I)) W^2 / (1 + (A+If) W^2/I). Long waves: c_G = d h/sqrt(A I). Top: W^2 = 12.")
for A, If in ((0.0, 0.0), (0.1, 0.0), (1.0, 0.0), (1.0, 1.0)):
print(f" (A+If)/I = {A+If:.1f}: omega_max = {disp(12, A, If):.3f} c/d (band model 3.464); ceiling h/sqrt(A(A+If)) = {np.inf if A+If == 0 else np.sqrt(1 / (A * (A + If))) if A > 0 else np.inf:.3f};"
f" long-wave 1 - v_p/c on an axis = (kd)^2 [1/24 + (A+If)/(2I)] = (kd)^2 x {1 / 24 + (A + If) / 2:.4f}")
# (ii) nonlinear gimbal under a steady twist theta0 applied over a short ramp, A = 1, h = 1 (so h/A = 1), If = 0
def rhs(t, y, theta_fn, dtheta_fn):
beta, dbeta = y
th_dot = dtheta_fn(t)
return [dbeta, -h_ * th_dot * np.cos(beta) - A_ * th_dot**2 * np.sin(beta) * np.cos(beta)]
A_ = 1.0; h_ = 1.0
theta0 = 0.01
ramp = 1.0
theta = lambda t: theta0 * min(t / ramp, 1.0)
dtheta = lambda t: theta0 / ramp if t < ramp else 0.0
sol = solve_ivp(rhs, (0, 400), [0, 0], args=(theta, dtheta), max_step=0.05, rtol=1e-9, atol=1e-12, dense_output=True)
ts = np.linspace(0, 400, 9)
print(f"\n(ii) steady twist theta0 = {theta0} (h/A = 1): tilt beta(t) and the couple on the frame -h beta' cos beta (spring value h^2 theta0/A = {theta0}):")
for t in ts:
b, db = sol.sol(t)
print(f" t = {t:5.0f}: beta = {b:+.4f} rad, couple = {-h_ * db * np.cos(b):+.5f}")
print(f" the tilt grows as -(h/A) theta0 t; the couple holds for t_hold = (pi/2) A/(h theta0) = {np.pi / 2 / theta0:.0f} and then reverses: a steady twist is not held.")
# (iii) steady to-and-fro twist, omega = 0.1 h/A, nonlinear. Case a: theta = theta0 sin(omega t) (a wave arriving, starts at 0).
# Case b: theta = theta0 cos(omega t) with the gimbal at rest at t = 0 (a twist already present when the gimbal was set).
omega = 0.1; theta0 = 0.05
for case, theta, dtheta in (("a: sin", lambda t: theta0 * np.sin(omega * t), lambda t: theta0 * omega * np.cos(omega * t)),
("b: cos", lambda t: theta0 * np.cos(omega * t), lambda t: -theta0 * omega * np.sin(omega * t))):
sol = solve_ivp(rhs, (0, 4000), [0, 0], args=(theta, dtheta), max_step=0.2, rtol=1e-9, atol=1e-12, dense_output=True)
t = np.linspace(0, 4000, 400001); b, db = sol.sol(t)
couple = -h_ * db * np.cos(b)
lin_amp = (h_ / A_) * theta0 / omega
k_eff = -np.sum(couple * theta(t)) / np.sum(theta(t)**2)
print(f"\n(iii{case}) to-and-fro twist theta0 = {theta0}, omega = {omega} h/A: linear tilt amplitude (h/A) theta0/omega = {lin_amp:.3f};")
print(f" measured: max |beta| = {np.abs(b).max():.4f}, mean beta (last quarter) = {b[t > 3000].mean():+.3e}, drift rate (h/A) theta0 = {theta0:.3f} if offset;")
print(f" mean couple = {couple.mean():+.2e}; effective stiffness (projection on theta) = {k_eff:.5f} x h^2/A; second order expected 1 - <beta^2>/2 = {1 - lin_amp**2 / 4:.4f}")
print(" case a: bounded tilt, mean zero, stiffness reduced at second order by <beta^2>/2 (a Kerr-like softening). case b: the DC part of the twist")
print(" makes the gimbal precess without bound, exactly as in (ii). Slow mean-tilt frequency (case a) omega theta0/sqrt2 = %.4f." % (omega * theta0 / np.sqrt(2)))
# (iv) static field of an atom at rest: twist s = D s0 d^2/e; hold time t_hold = (pi/2) A/(h s) = (pi/2)/(omega_nut s), omega_nut = h/A
e = 1.602176634e-19; eps0 = 8.8541878128e-12; c = 299792458.0; hbar = 1.054571817e-34; alpha = 1 / 137.035999
E_bohr = e / (4 * np.pi * eps0 * (5.29177e-11)**2); E_fm = e / (4 * np.pi * eps0 * (1e-15)**2)
print(f"\n(iv) static fields: at the Bohr radius E = {E_bohr:.3e} V/m, at 1 fm from a proton E = {E_fm:.3e} V/m.")
print(f" With A = I (gyrostat flywheel like the face wheel): h = sqrt(kappa A) = 4 pi alpha hbar/s0^2 = {4 * np.pi * alpha:.4f} hbar/s0^2, omega_nut = h/A = c/d.")
print(" d [m] s_Bohr t_hold(Bohr) s_fm t_hold(1 fm) | omega_max allowed if t_hold = 4e17 s: Bohr, 1 fm [rad/s]")
for d in (1e-18, 1e-26, 1e-35):
s0 = 2 * np.pi
sB = eps0 * E_bohr * s0 * d**2 / e; sF = eps0 * E_fm * s0 * d**2 / e
om_nut = c / d
tB = (np.pi / 2) / (om_nut * sB); tF = (np.pi / 2) / (om_nut * sF)
print(f" {d:.0e} {sB:.2e} {tB:.2e} s {sF:.2e} {tF:.2e} s | {(np.pi/2) / (4e17 * sB):.1e}, {(np.pi/2) / (4e17 * sF):.1e}")
print(" general: omega_max x t_hold <= (pi/2)/s_static, whatever h and A; 1 PeV light is 1.5e30 rad/s.")
dmax = np.sqrt((np.pi / 2) * e / (4e17 * 1.5e30 * eps0 * E_fm * 2 * np.pi))
print(f" to hold the proton's 1 fm field for 4e17 s and carry 1 PeV light: d <= {dmax:.1e} m")