Navier–Stokes: Kernel, Cross-Checks and Instruments
The 3D Fourier–Galerkin triad kernel (v3) stores complex Fourier coefficients and applies the −i factor in the trilinear coupling; it conserves energy. The earlier real-coefficient kernel injected up to 15% at N = 7; the defect was found and corrected on 2026-03-24. An FFT pseudo-spectral solver and the triad kernel agree to 2.8×10−17 at N = 4 over T = 0.01. Read the record · Zenodo (v19)
The v3 kernel and its checks
| File | Language | Description | Result |
| solvers/v3/triad_kernel_v3.c |
C |
3D Galerkin truncation: mode enumeration, triad precomputation, Leray projection, complex coefficients with the −i factor |
Energy conserved by the nonlinear term |
| experiments/v3_final/experiment_energy_audit.c |
C |
Energy conservation test at ν = 0 across several Δt values, real-coefficient kernel vs v3 |
Real-coefficient kernel injects up to 15% at N = 7; v3 drift is integrator error and halves with Δt |
| validation/pseudospectral_compare.py |
Python |
Cross-architecture check: FFT pseudo-spectral solver against the triad kernel |
Agreement to 2.8×10−17 at N = 4, T = 0.01 |
| validation/taylor_green_test.c |
C |
Taylor–Green vortex with known exact energy decay |
Matches exp(−6νt) to 10−7 |
| validation/ns_galerkin_3d.py |
Python |
Independent NumPy implementation of the 3D Galerkin system |
E(0) matches C to 10−8; nonlinear energy rate zero |
| validation/dedalus_ns_test.py |
Python |
Cross-validation with scipy RK45 (adaptive, rtol = 10−10) |
E(T) within 9×10−6 |
| Thermalisation check |
C |
Inviscid truncations: Ω/E against the lattice mean 〈k2〉 (Lee–Kraichnan absolute equilibrium) |
Within 1% at every N from 3 to 8; unchanged under time-step halving |
| ns-proof-experiments/experiment_leray_angle_variance.c |
C |
Angular variance Var(cos2αT) of triad interactions on Z3, shell by shell |
Positive at every shell computed; tends to 4/45 |
DNS and profile instruments
| Instrument | Language | Measures | Result |
| verify_review_claims.py |
Python |
Pointwise Kolmogorov closure at t = 0 (check 1), intra-shell dispersion for the shear flow (check 2), amplitude scaling of a per-mode estimate (check 3), Burgers vortex direction and stretching (check 4) |
Closure fails for a spectral-gap datum (E10 = 0, Π10 = −1.04); dispersion constant nK/2 = 9, 31, 175, 625, 2517 at K = 1, 2, 5, 10, 20; Burgers vortex is unidirectional with sustained stretching |
| N = 192 closure script |
Python |
Pointwise closure for localised vortex blobs of size ℓ and in the exponential dissipation range |
13.6× to 55× for ℓ = 0.25 to 0.15; 7.5×, 30×, 98× at K = 40, 48, 52 |
| Six-patch field |
Python |
Divergence-free field of six Burgers-type patches: direction second moment and enstrophy-weighted stretching |
‖Q‖ = 0, resultant 0, stretching 0.999 |
| E9 · pincer_probe.py |
Python |
Mean-strain and strain–direction covariance shares of the vortex stretching on DNS at the enstrophy peak |
Mean-strain term at most 6% at the flux scale; the covariance carries it (Betchov's identity in explicit form) |
| A1 · shear_profile.py |
Python |
Angular shear G = Pξ⊥Σξ of homogeneous critical profiles ω = |x|−2Ψ(x̂); linearisation and nonlinear minimisation, l ≤ 4 |
G vanishes to 10−15 on swirl-free axisymmetric profiles only; null space = symmetry count; six minimisations converge to that family; solver validated to 10−14 |
| Spectral3D · zoom_classification.py |
Python |
2/3-dealiased RK4 pseudo-spectral DNS |
ν = 0 energy drift 10−7 |
Solver versions
| File | Status | Description |
| solvers/v3/triad_kernel_v3.c |
CURRENT |
Complex Fourier coefficients, −i factor, energy conserved. Use this. |
| solvers/v2/triad_kernel_v2.c |
SUPERSEDED |
Real coefficients, missing −i; injects energy. Kept so the 2026-03-24 audit can be rerun. |
Three Fluid Equations: Euler, SQG & MHD Truncations
Fourier–Galerkin truncations of 3D Euler, 3D MHD and 2D SQG integrated with a first-order splitting scheme, with energy, enstrophy and per-shell diagnostics across nested truncation levels. At ν = 0 the truncated systems relax to the Lee–Kraichnan absolute equilibrium. A finite Galerkin system cannot blow up, so bounded enstrophy in these runs is not evidence about any of the three PDEs. Read the record · Zenodo (v2)
| Equation | Configurations | Record |
| 3D Euler (ν = 0) | 4 IC families, N = 2–8 | Ω/E reaches 〈k2〉 within 1% at every N; the ≈22% enstrophy growth is the equilibration; unchanged under time-step halving |
| 2D SQG | Critical (κ = 0.01) and inviscid, N ≤ 15 | Energy and enstrophy trajectories. Critical SQG is globally regular by theorem (Kiselev–Nazarov–Volberg 2007; Caffarelli–Vasseur 2010); inviscid SQG blow-up is open and the runs bear on it neither way |
| 3D MHD | 4 configurations, N ≤ 6 | Kinetic and magnetic energy trajectories of the truncation |
Arithmetic Oscillations
Truncated Odlyzko–te Riele sums over the non-trivial zeros of ζ, with computed ζ′(ρn) over Odlyzko's 2,001,052 zeros, and recovery of the first zeta zeros by Fourier analysis of M(x)/√x. All in C. Read the record · Zenodo (v2) · Code
| File | Description | Result |
| quick_sum.c | Truncated amplitude sum Σn≤K 2/|ρnζ′(ρn)| with computed ζ′(ρn) | Mertens sum crosses 1 at K = 58 and 2 near K = 1,040; growth consistent with the conjectural (log T)5/4 law |
| paper_data.c | Generates the tables in the record | Reproduction in <2 s |
| explicit_formula.c | Explicit-formula evaluator for M(x)/√x | Millisecond evaluation at 103 to 10200 |
| wave_plotter.c | CSV output for the reconstruction figures | Figure data |
| exp33_wave_decomposition.c | DFT of M(x)/√x over arithmetic data | First zeta zeros recovered from M(x) without computing ζ(s) |
| exp01–exp53 | Exploratory sequence, sieve, wavelet and calibration probes on prime and arithmetic data | Exploratory; retained as a record of what was run |
Shell-Model Experiments (Simplex)
A hand-constructed cubic shell model with state variables (ui, ωi) on 3 to 12 scalar wavenumbers coupled by a relaxation term, a cubic term and a signed cascade term, and a multi-level diagnostic H built from its trajectories. The shell model is not a Galerkin truncation of Navier–Stokes and does not conserve energy in the inviscid limit; H is an in-sample classifier whose weights are learned from the outcomes it reports. The pages record what the model did under the stated protocol; no conclusion about the 3D equations follows from them. Read the record · Zenodo (v3)
Shell models by wavenumber count
| File | Model | Record |
| exp_ns_6mode_solved.sx |
Shell model, 3 wavenumbers (3+3 variables) |
Finite-window enstrophy trajectories across initial amplitude |
| exp_ns_8mode_solve.sx |
Shell model, 4 wavenumbers |
Finite-window enstrophy trajectories across initial amplitude |
| exp_ns_10mode_solve.sx |
Shell model, 5 wavenumbers |
Finite-window enstrophy trajectories across initial amplitude |
| exp_ns_12mode_solve.sx |
Shell model, 6 wavenumbers |
Finite-window enstrophy trajectories across initial amplitude |
| exp_ns_16mode_solve.sx |
Shell model, 8 wavenumbers |
Finite-window enstrophy trajectories across initial amplitude |
| exp_ns_20mode_solve.sx |
Shell model, 10 wavenumbers |
Finite-window enstrophy trajectories across initial amplitude |
| exp_ns_24mode_solve.sx |
Shell model, 12 wavenumbers |
Finite-window enstrophy trajectories across initial amplitude |
| Mode scaling summary |
All shell models compared |
The finite-window excursion amplitude depends on window length, threshold value and solver; it is a property of the protocol, not of the equations |
Diagnostic H and related pages
| Page | Examines | Record |
| The Scaffold |
Multi-level diagnostic H on shell-model trajectories |
In-sample classifier; weights learned from the reported outcomes |
| The Holistic View |
H, H′ and H″ as one coupled system |
Diagnostic construction |
| Viscosity Spectrum |
Shell model across viscosity |
Trajectory record across ν |
| 3D Kernel with Vortex Stretching |
First real-coefficient 3D Fourier–Galerkin kernel |
Mode enumeration, triad precomputation and Leray projection later carried into the v3 kernel; this version omits the −i factor |
| 2D Four-Mode System |
Four-mode 2D shell system |
Trajectory record |
Unified Adaptation Theorem
Experiments on sequentially composed contractive updates on a shared parameter. The convergence statement is block contraction with a non-negative coupling matrix (Bertsekas–Tsitsiklis) plus LaSalle; the diagnostics are the identity B = 1 + 2I for the balance residual, the convergence-score lemma S ≥ 1 − 2σT/2/(1−σ)2, the balanced-matrix eigenvalues and the local Hessian of B. Read the record · Zenodo (v3)
Convergence conditions and diagnostics
| File | Examines | Result | Statement |
| exp_contraction.sx | Contraction of five individual update types (C1) | 5/5 contract, β < 1 | Condition C1 |
| exp_gradient_interference.sx | PCGrad-type projection on conflicting gradient pairs | Projection identity on 500 pairs; first-order descent of each objective preserved | Projection lemma |
| exp_lyapunov.sx | Lyapunov decrease along the composed update | 0 increases observed | LaSalle step |
| exp_invariants.sx | Invariant set under strong gradients | 0 violations / 15,000 steps | Invariant set |
| exp_timescale.sx | Fast/slow timescale separation | Separation maintained in two- and three-timescale settings | Condition C1 |
| exp_composition.sx | Full composed system | Converges within tolerance to a single fixed point | Block contraction |
| exp_interaction_matrix.sx | Block-coupling matrix estimated from trajectories | Converges in 5 cycles | Condition C2 |
| exp_convergence_order.sx | Convergence score S | S → 0.9997 | Convergence-score lemma |
| exp_iratio_proof.sx | The identity B = 1 + 2I for K = 2…20 | Holds to 2.22×10−16 | Identity |
| exp_iratio_proof_statistical.sx | The identity B = 1 + 2I on 70 random problems | Holds on all 70 | Identity |
| exp_balance_residual.sx | Gradient flow on the balance residual B | Reaches machine epsilon; local Hessian ∇2B = 2JTJ/D | Local Hessian |
| exp_pcgrad_refinement.sx | PCGrad vs cosine-scaled projection | Cosine-scaled projection is the graduated variant; limit points differ between the two | Projection lemma |
Exploratory: beliefs, dynamics, games
| File | Examines | Result |
| exp_anima_deep.sx | Belief interaction, consolidation, target misalignment | Single-run observation |
| exp_anima_correlated.sx | Correlated beliefs with misaligned targets | Exploratory |
| exp_belief_cascade.sx | Chain, circular, delayed topologies | Chain topology recovered from data |
| exp_skeptical_annealing.sx | Skeptic vs believer across horizons | Conjecture 6.3 refuted; 6.5 consistent |
| exp_memory_dynamics.sx | Forgetting rate, transfer, self-reference | Meta-gradient recovers near-optimal λ* |
| exp_liquid_hive.sx | Liquid neural network in a hive architecture | Dynamic reconfiguration converges |
| exp_chaos_boundary.sx | Convergence score S on the logistic map | Exploratory; S does not separate periodic from chaotic orbits |
| exp_s_vs_lyapunov.sx | S against the Lyapunov exponent | Complementary diagnostics |
| exp_nash_equilibrium.sx | Iterated Prisoner's Dilemma with an added term | Experiment outcome; not a theorem |
| exp_gan_convergence.sx | GAN training via projection | Generator–discriminator balance |
| exp_ode_solvers.sx | Learned blending of ODE solvers | Adaptive blend outperforms fixed methods |
| exp_prime_gaps.sx | Prime gap derivative series | Exploratory |
| exp_iratio_applications.sx | Balance residual across 5 domains | Identity holds in each |
| exp_collatz_analysis.sx | Collatz convergence diagnostics | Exploratory |
Code / compiler
| File | Examines | Result |
| exp_code_gates.sx | Code-structure convergence via gating | S → 0 at step 50 |
| exp_compiler_passes.sx | Per-program compiler pass adaptation | Per-program adaptation |
| exp_structure_discovery.sx | Gradient topology as a structural probe | Constraint graph recovered |
| exp_equilibrium_mapping.sx | B-flow equilibrium in an optimisation landscape | Matches the local Hessian |
Stress / robustness
| File | Examines | Result |
| exp_sensitivity.sx | Stability across 3 orders of magnitude in learning rate | Stable |
| exp_stress_test.sx | Rosenbrock + Rastrigin combined | Converges |
| exp_stress_rosenbrock.sx | Banana valley at 4–10 dimensions | Converges in high dimension |
| exp_stress_adversarial.sx | Anti-parallel gradient objectives | Projection resolves the pair; limit point not unique |
| exp_symmetry_breaking.sx | Group discovery, perturbation recovery | Recovery within O(10) cycles |
| exp_stochastic_projection.sx | Deterministic vs stochastic projection | Deterministic matches stochastic |
| exp_stochastic_rastrigin.sx | Stochastic projection on a multimodal landscape | Finds the global region |
| exp_lyapunov_refinement.sx | Tighter Lyapunov bounds | Tighter bounds achieved |
| exp_learnable_projection.sx | Learnable projection scale | Learned scale converges |
| exp_learnable_projection2.sx | Momentum-augmented learnable projection | Faster convergence |
| exp_convergence_ratios.sx | Ratio series and entropy analysis | Ratios converge (not universal) |
Compiler Math Validation
188 tests confirming the Simplex compiler produces correct numerical results for every mathematical operation used by the Simplex experiments above.
| File | Tests | Coverage | Operations |
| test_math_arithmetic.sx | 75 | f64/i64 arithmetic, casts, edge cases | +, -, *, /, %, int↔float |
| test_math_comparisons.sx | 23 | All 6 comparison operators, both types | <, ≤, >, ≥, ==, != |
| test_math_transcendental.sx | 66 | Transcendental functions and identities | sqrt, sin, cos, exp, ln, pow, tanh |
| test_math_loops.sx | 10 | Loop-based numerical computation | Accumulation, Newton, series |
| test_math_functions.sx | 14 | Function composition and recursion | Composition, recursion, dot product |
Total: 188/188 pass.
How to Run
Navier–Stokes kernel and instruments (C & Python)
git clone https://github.com/senuamedia/lab-code.git
cd lab-code
# C: v3 kernel + Taylor-Green check
gcc -O3 -c solvers/v3/triad_kernel_v3.c -o kernel.o
gcc -O3 -c validation/taylor_green_test.c -o tg.o
gcc -O2 tg.o kernel.o -o run_tg -lm
./run_tg
# Python: independent implementation and FFT cross-check
pip install numpy scipy
python3 validation/ns_galerkin_3d.py
python3 validation/pseudospectral_compare.py
# Python: closure, dispersion, scaling and Burgers-vortex checks
python3 numerical/verify_review_claims.py
Arithmetic oscillations (C)
cd domains/spectral-wave-theory
make # builds all experiments
./quick_sum # truncated amplitude sums (<1s)
./paper_data # tables (<2s)
Shell-model and adaptation experiments (Simplex)
cd simplex && ./build.sh
cd ../theorem-proof
./run_all.sh # adaptation-theorem experiments
./run_math_tests.sh # 188 compiler math tests