# OpenCretin live goal — 2026-06-09

## mission

Resolve the contested 3p-float question with **real level densities for every
line, in real device geometry** — the Stage-3 Λ-iterated trapped field — and
ship OpenCretin as the open-source radiative-transport + chemical flame physics
code for the LightCell, with a 3-D WebGPU visualization, in a browser.

The question the build answers (do NOT resolve by fiat): *does n(3p) float
above Boltzmann at 1-atm device conditions via trapped-field re-pumping?*
v17 says no (1-D only). The thesis says yes. The converged J̄(r,ν) fixed point
is the arbiter. Whatever it says, ship it with receipts.

## minimum live proof

- [x] **Layer-1 + Na₂:** Na₂ dimer added to gibbs speciation; existing
      regression (61.2/26.3/12.2% @ 2800 K, seed 0.008) still reproduces.
      → receipt: docs/receipts/RECEIPT-na2-speciation.md (2026-06-09)
- [x] **lines.zig:** NIST-sourced Na line table (D₂/D₁ 589, 3d→3p 818/819,
      4p→3s 330, 4s→3p 1138/1141). Per-cell (n_l, n_u) for EVERY line from
      Layer-1 speciation × Layer-2 CR populations. κ_ν, j_ν per cell with
      local Voigt widths (Doppler from T, resonance from n_Na, vdW from n_pert).
      **No escape-factor slider, no T_exc slider in the engine path.**
      → receipt: docs/receipts/RECEIPT-lines-real-densities.md (2026-06-09;
        6 gates pass; found live-model air/vac wavelength bug + derived
        Weisskopf wing boundary; 4s lines carried INACTIVE pending NLEV)
- [ ] **Na₂ continuum:** free-free quasistatic far wing + X→A / X→B bands from
      difference potentials. Retires the `wingExtent_nm` exponential-cutoff fudge.
      → IN PROGRESS rev 3: N1 detailed-balance + N2 Weisskopf-seam PASS (resonance
      broadening now MEASURED, H&G 1983 — live model 6.7× too wide, backport queued);
      N3 satellite RED pending Konowalow/RKR potential tables (data task) — receipt:
      docs/receipts/RECEIPT-na2-continuum-partial.md
- [x] **geometry.zig:** real device — cylindrical primary (r≈40 mm), secondary
      annulus (gap≈6 mm, ht≈1 m), T(r,z) + speciation n(r,z) patchwork of regimes.
      → committed 9522e43 (3 gates; chord closure exact; inlet regime inversion;
        KNOWN GAP: condensing skin has no saturated Na vapor yet — flagged)
- [x] **Stage 3:** Λ-iteration J̄(r,ν) → n̄(r) per line → `cascade.set_field`
      per cell → converged fixed point (report iterations + residual).
      g589 EMERGES as a geometry consequence — reported, never set.
      → receipt: docs/receipts/RECEIPT-stage3-slice-v1.md (2026-06-09; CPU
        single-slice reference, 3 gates; 6 iters to 1e-8; g589 emerges
        core 3e-5 → wall 3e-3, global ~4.4e-4 — 1/6000 slider RETIRED.
        v1 verdict superseded — see RECEIPT-stage3-v2-essential-physics.md:
        skin vapor + trap BC were ESSENTIAL physics (operator correction);
        v2 verdict: core pinned, SKIN FLOATS +30% (trapped-field re-pumping
        emergent), trap collapses in-band net escape to ~0 at the hot slice.
        THE ANSWER awaits: energy balance, 819-band transport, wall mesh
        refinement, low-P sweep)
- [x] **THE ANSWER:** n3p/n3s vs Boltzmann — receipt RECEIPT-stage3-float.md
      + REVISION 2026-06-11b (rev 3, the binding one). VERDICT: the wall float is
      REAL, FIELD-DRIVEN, and lives BELOW ~0.1 atm (1.18× @0.05, 1.59× @0.01 —
      monotonic in 1/P); at 1 atm there is NO float anywhere (wall 1.004, core
      0.9999 — v17 confirmed for core AND wall). 589 band flips net-absorber→
      net-emitter at P≈0.2 atm (stable across revisions). Device radiates in-band
      only below ~0.2 atm; low pressure is the REQUIREMENT, not just the lever.
      Rev-1's "+30% @1 atm wall" and the non-monotonic dip were chem-pump
      artifacts (missing DB reverse × one-row radicals) — caught by the R8 fix,
      rate-budget-verified by hand. Limits: 819 not transported, in-plane rays
      (float is a lower bound). T-prescribed limit CLOSED by v3 (next box).
- [x] **v3 COUPLED core↔skin/corona energy balance** — receipt
      RECEIPT-stage3-coupled.md (2026-06-11). T(r) EMERGES from per-ring balance
      (q_chem INPUT, q_rad from the converged Λ-field, k(T) conduction, wick-pinned
      wall). THE ANSWER robust: float/g589 move ≤1% vs prescribed at matched
      T_core, BOTH at 1 atm and 0.05 atm (rev-3: 1.186 coupled vs 1.181
      uncoupled @0.05 atm). Device number: ~2.5 kW/m holds the design flame
      (conduction-dominated ledger; closure ≤0.01%). NEW: core flips subthermal
      (0.996) at operating pressure while skin floats — emergent photosphere/
      corona structure. Limits: k(T)+q_chem-shape ASSUMED, no flow, continuum
      cooling absent (P_chem = lower bound), wall Dirichlet.
- [x] **Gates:** ALL GREEN 2026-06-11c — R8 PASS (b=1.0000 dense |b−1|=2e-10,
      departs thin 0.185, bridge monotone) **+ R8d chemiluminescent invariant**
      (chem-dominated overshoot bath: b/Γ=0.9676 vs analytic 0.967 — populations
      follow the radical pool's chemical potential, not kinetic T; the
      anti-smuggle gate, operator catch). Fix history: DB reverses for chem
      pump + pooling (krec vestigial); then reverse re-referenced from ACTUAL to
      EQUILIBRIUM radicals (set_chem_eq) — actual-referenced reverse had pinned
      chemistry to kinetic Boltzmann BY CONSTRUCTION. GEO1–3, lines G1–G5,
      S3-1..4 (J/B tol recalibrated), cascade verdict — all PASS.
- [x] **THE ANSWER rev 4 — the Γ axis** (RECEIPT-stage3-float.md REV c). TWO
      float mechanisms, both earned: trapped-field (wall, <0.1 atm, 1.18–1.59×)
      + chemiluminescent (∝Γ overshoot, core-led, ANY pressure: 1 atm core
      b=2.9/20/190 at Γ=1e3/1e4/1e5; 0.05 atm net in-band escape ×58 over swept
      Γ — radical pool = brightness lever). Γ=1 corner = v17 limit, not the
      device point. OPEN INPUT: device Γ (feed vs ∝P² 3-body recombination —
      kinetics model queued); radical TRANSPORT into the skin queued
      (load-bearing for wall drive). Driver: stage3_gsweep.mjs.
- [ ] **3-D viz:** WebGPU volumetric J̄(r,ν) render (raymarch bug FIXED, not
      sliced around), per-line toggle, spectral flythrough. Runs in-browser
      from static files.
- [ ] **Ship:** license chosen, initial commit, public GitHub repo, deployed at
      `sim.lightcellenergy.com` (apex UNTOUCHED), live==local verified.

## stretch proof

- [ ] V-T quench backported into spectrum.html — kill the unphysical 1-atm
      T_exc float (the live model's known bug).
- [ ] Bleaching coupling: per-cell opacity from local populations lifts the
      skin lid (~8× band-brightness lever from the sibling engine).
- [ ] Departure coefficients b_i + per-transition T_exc readouts.
- [ ] NLEV extension (4s, 3d fine structure) with NIST data.
- [ ] Monte Carlo photon-transport cross-check of the Λ-iteration (independent
      method, same answer = real validation).

## doctrine (binding)

- Source function is not a blackbody. Populations are the state.
- Every rate a flagged INPUT: measured / cited / assumed.
- Receipt after every concrete mutation. Self-graded validation is not validation.
- Zig→WASM hot path, f64, no allocator. Python offline only.
- `build-exe -fno-entry -rdynamic`, never `build-lib`.

## receipts

(append below — dated, with reproduced numbers)

### 2026-06-09 — Na2 into Layer-1 speciation (checkbox 1) ✅
- [x] Regression guard PASSED: 61.2/26.3/12.2 @ 2800 K reproduce; full-precision
      Δ ≤ 0.01% absolute (SLSQP path noise, both copies executed).
- [x] Result: flame-gas n_Na2/n_Na ≈ 1.8e-6 @ 2800 K seed 0.008 — dimer is TRACE
      in the bulk; continuum inventory is in the cool Na-rich skin, n_Na2 = Kc(T)·n_Na²
      → per-cell speciation in real geometry confirmed as the right architecture.
- Receipt: docs/receipts/RECEIPT-na2-speciation.md
  AMENDED by lines receipt: optimizer trace-slop found; analytic n_Na2/n_Na = 2.54e-6
  @ 2800 K (was 1.84e-6 from SLSQP) — same order, conclusion unchanged.

### 2026-06-09 — lines.zig: real densities for every line (checkbox 2) ✅
- [x] 6 new gates ALL PASS (voigt parity exact; Kirchhoff 0.12% centers / 0.55% off;
      normalization 0.65%; doublet 2.003; kc_na2 3e-11) + original 3 gates unchanged.
- [x] Wavelengths DERIVED from NIST level energies — found + fixed the live model's
      air/vacuum mix (818.33/819.48 air vs 589.158 vac). Backport queued.
- [x] Weisskopf-frequency wing truncation DERIVED (~0.5-1.1 nm) — retires the
      hand-tuned wingExtent fudge; far wing delegated to checkbox-3 quasistatic module.
- Receipt: docs/receipts/RECEIPT-lines-real-densities.md
