Does light charge the quons? › Files cited on the page › check_trials25-27_fable/

b1_reruns.py

In the investigation at sim/m8_engine/check_trials25-27_fable/b1_reruns.py · last changed in commit 46c285d, 25 November 2026 · 3,270 bytes · the folder as a zip


"""Phase B reruns with my own code (thirty-fifth reviewer). (a) Trial 26's H1b: a lone rotor in the 32^3 box over the lock's windows: is the miss
the returning light? (b) Trial 27's G3': the seeded gimbal's growth in the lock's 12 x 2 x 2 box, then with a wider cross-section, against the single-gyrostat law."""
import math, 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
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"))

print("\n(a) lone rotor, wb2 = (1.65/4)^2, wp2 = 0.2, dt = 0.1: energy means over t = 20-60 and 160-200 (trial 26's windows)")
for N in (32, 48):
    shape = (N, N, N); s = (N // 2,) * 3
    occ = np.zeros((3, *shape)); occ[0][s] = occ[1][s] = 1
    wA = 1.65 / 4
    L = eng.Lattice(shape, 0.1, wb2=wA**2, wp2=0.2, occ=occ)
    L.P[0][s] = 1e-3; L.V[1][s] = wA * 1e-3; L.E = eng.static_field_of(L.P)
    es = []
    for it in range(2000):
        L.step(); es.append(0.5 * (L.wb2 * (L.P[0][s]**2 + L.P[1][s]**2) + L.V[0][s]**2 + L.V[1][s]**2) / 0.2)
    es = np.array(es); t = 0.1 * (np.arange(2000) + 1)
    e1, e2 = es[(t >= 20) & (t < 60)].mean(), es[(t >= 160) & (t < 200)].mean()
    e_free = es[(t >= 10) & (t < 25)].mean()
    print(f"   {N}^3 box: ratio {e2 / e1:.4f} (trial 26 got 0.8478 at 32^3; free radiation would give 0.713); light returns at t = {N}."
          f" Means per 20 units/start: " + " ".join(f"{es[(t >= a) & (t < a + 20)].mean() / es[0]:.3f}" for a in range(0, 200, 20)))

print("\n(b) G3': standing wave of y-band twists, m = 2 over 12 cells (twist amplitude 0.0173 at x = 1), one gimbal seeded +-1e-4, two copies; RK4 dt = 0.01")
h, A, dtg = 1 / 6, 1 / 36, 0.01
for shp in ((12, 2, 2), (12, 4, 4), (12, 8, 8)):
    kk = 2 * math.pi * 2 / 12; lam = 4 * math.sin(kk / 2) ** 2; wv = math.sqrt(lam / (1 + A * lam))
    pos = np.stack(np.meshgrid(*[np.arange(q, dtype=float) for q in shp], indexing="ij"))
    phi_z = 0.02 * np.cos(kk * (pos[0] + 0.5))
    th_amp = abs(eng.curl_f2e(np.stack([np.zeros(shp), np.zeros(shp), phi_z]))[1, 1, 0, 0])
    seps = []
    t0 = time.time()
    for sgn in (+1, -1):
        g = gb.GyroLattice(shp, h, A); g.phi[2] = phi_z.copy(); g.start_in_step(); g.beta[1, 1, 0, 0] += sgn * 1e-4
        tr = []
        for it in range(4000):
            g.step(dtg)
            if it % 50 == 49:
                tr.append(g.beta[1, 1, 0, 0])
        seps.append(np.array(tr))
    sep = (seps[0] - seps[1]) / 2e-4
    tt = np.arange(1, len(sep) + 1) * 50 * dtg
    gfit = np.polyfit(tt[len(tt) // 3:], np.log(np.abs(sep[len(tt) // 3:])), 1)[0]
    gpred = th_amp * math.sqrt((h * h / A**2 - wv**2) / 2)
    gcosh = math.acosh(sep[-1]) / tt[-1] if sep[-1] > 1 else float("nan")
    print(f"   box {shp}: twist amplitude {th_amp:.4f}, wave w {wv:.4f}; law {gpred:.4e}; log-slope (last two thirds) {gfit:.4e} = {gfit / gpred:.2f} of the law;"
          f" acosh(sep_end)/t = {gcosh:.4e}; sep at t = 40: {sep[-1]:.2f}; {time.time() - t0:.0f} s")
print("clock:", time.strftime("%Y-%m-%d %H:%M:%S %Z"))