Skip to main content

The field solvers

Five more real-physics pipelines, each an independent endpoint on the 7-step seal, each gating on its own physical reality check, each filling the ZEQOND receipt with what it genuinely computed. Nothing existing is touched. All deterministic.

ZeqHeat

POST /api/zeq/heat · zeq_heat · heat — the heat/diffusion equation, now in 2-D by default: ∂T/∂t = α(∂²T/∂x² + ∂²T/∂y²) on a grid, compared to the exact 2-D Fourier-mode decay exp(−α·π²·(kx²/Lx² + ky²/Ly²)·t). Two methods and the life-or-death between them: explicit FTCS is conditionally stable — cross the 2-D limit r = α·dt·(1/dx² + 1/dy²) = ½ and it amplifies every mode and explodes; implicit ADI (Peaceman–Rachford, two Thomas sweeps per step) is unconditionally stable. Fills temperature_field + heat_flux_vector (|q| = α·|∇T|, Fourier's law). Deterministic. Verified live: default implicit ADI at r=5 (10× the explicit limit) → 0.05% error; explicit r=0.4 → 0.15%; explicit past ½ → blows up (does not seal). Pass dim:1 (or L, or the 1-D Fourier mode) for the original 1-D bar (Crank–Nicolson).

heat # 2-D implicit ADI — stable, ~0.05% vs analytic
heat method=explicit # 2-D explicit FTCS — stable just under the CFL ½
heat dim=1 # the original 1-D bar
heat method=explicit steps=2000 # stable if r ≤ ½
heat method=implicit # always stable

ZeqLorenz

POST /api/zeq/lorenz · zeq_lorenz · lorenz — the Lorenz attractor by RK4. Dissipative chaos, so the reality check is not energy: it's the exact phase-volume contraction ∇·f = −(σ+1+β) (reproduced to ~10⁻¹¹%) and boundedness on the strange attractor. The butterfly effect is measured live — a twin trajectory a hair away diverges exponentially, giving the largest Lyapunov exponent (λ ≈ 0.905 for the classic σ=10, ρ=28, β=8/3, matched to ~0.3%). Yet the run is reproduced bit-for-bit: determinism and sensitive dependence. Fills no continuum field — honestly, a trajectory in phase space has none.

ZeqWave

POST /api/zeq/wave · zeq_wave · wave — now a 2-D membrane by default: ∂²u/∂t² = c²(∂²u/∂x² + ∂²u/∂y²) on a rectangular drum, Dirichlet edges, by leapfrog. The reality check is exact energy conservation — the leapfrog scheme conserves a discrete Hamiltonian H = ½‖u̇‖² − ½ uᵀAu (A = the update's own 5-point Laplacian) to machine precision, so the energy-drift is ~10⁻¹³ and the run seals. A second check compares to the exact standing mode ω = cπ√(kx²/Lx² + ky²/Ly²) (the reported frequency matches it exactly; the few-percent errorPct over a period is honest leapfrog dispersion, not the gate). The life-or-death is the 2-D Courant number C = c·dt·√(1/dx² + 1/dy²) ≤ 1 — cross it and the field explodes. Fills displacement_field + velocity_field.

Pass mode:"maxwell" for 1-D Maxwell on a Yee FDTD grid (electromagnetic_vectors [E, B]), or dim:1 / mode_k for the 1-D scalar wave.

wave # 2-D membrane — energy drift ~1e-13, C=0.5
wave courant=1.05 # past the 2-D Courant limit → explodes
wave mode=maxwell # 1-D Maxwell FDTD (Yee)
wave dim=1 # the 1-D scalar wave

ZeqFlow

POST /api/zeq/flow · zeq_flow · flow — 2-D incompressible Navier–Stokes by Stam's stable fluids: semi-Lagrangian advection, implicit diffusion, and a pressure projection that drives ∇·u → 0. The response reports max divergence before and after projection — the reality check that the fluid is actually incompressible. Fills velocity_field, pressure_field, viscosity_field.

ZeqFracture

POST /api/zeq/fracture · zeq_fracture · fracture — a 2-D bond-based peridynamic lattice with crack propagation (the default). A single-edge notch is seeded into a mode-I SENT specimen (bottom clamped, top pulled), the load is ramped quasi-statically, and a bond breaks irreversibly when its true finite stretch s = (‖ξ+η‖ − ‖ξ‖)/‖ξ‖ exceeds the critical stretch s₀ (Silling's criterion). Breaking is cascaded — relax, break, repeat — so the stress concentration hands off from the old crack tip to the next bond and the crack runs. A no-fail boundary layer at the grips localises failure at the notch.

The life-or-death: below a critical far-field strain the notch is stable (only the seeded bonds are broken); above it the crack initiates at the tip and propagates across the whole specimen (unstable fracture). The response reports criticalStrain, crackTipX, crackAdvance, propagated, spannedDomain, and the crack geometry: crackPath (a polyline of [x, y] — the broken-bond front's route across the specimen), crackLengthAlongPath, and maxDeflection from the centre-line (≈0 for a straight mode-I crack, larger if it deflects). This is the pipeline that fills the receipt's material + boundary tier no other fills: stress_field, strain_field, damage_degradation_field, elasticity_tensor, boundary_traction, contact_constraint_flag. Deterministic; the reality check is the relaxed equilibrium residual.

fracture strain=0.01 # below critical → the notch holds
fracture strain=0.06 # above critical → the crack spans the specimen
fracture mode=bar strain=0.05 # the original 1-D cohesive bar

Pass mode:"bar" (or a 1-D N) for the original 1-D cohesive bar — pulled to a strain, it holds elastically or the crack localises at a seeded defect and the bond stress softens to zero.

ZeqReact

POST /api/zeq/react · zeq_react · react — reaction–diffusion, the biology pipeline. model="gray-scott" is the canonical Turing / morphogenesis system: two morphogens U, V, and spots/stripes/worms self-organise from a seed. model="fitzhugh-nagumo" is excitable media — the cardiac/neural model whose travelling and spiral waves are the textbook picture of an action potential. Both run on a 2-D grid, explicit in time. The reality check is the same diffusion stability limit as heat, in 2-D: D·dt/dx² ≤ ¼ — under it the pattern forms and stays bounded; over it the grid amplifies noise and the concentrations explode.

This is the pipeline that fills the receipt's chemical/biological tierconcentration_field + reaction_rate_field — added honestly for it. Verified: Gray–Scott forms a Turing pattern (variance ≈ 0.014, stable); CFL > ¼ blows up and does not seal; both deterministic.

react model=gray-scott steps=4000 # Turing morphogenesis
react model=fitzhugh-nagumo # cardiac / neural excitable waves

ZeqTumor

POST /api/zeq/tumor · zeq_tumor · tumor — the Fisher–KPP growth front ∂u/∂t = D ∂²u/∂x² + r u(1 − u): a population that both grows (rate r) and spreads (diffusion D), invading as a travelling front. It is the model of tumour invasion, an advancing species, a spreading advantageous gene, and the spatial edge of an epidemic. Two honest reality checks. The seal is boundedness — a density must stay in [0,1]; a stable scheme holds it to machine precision, an unstable one (past the CFL limit D·dt/dx² ≤ ½) violates it and explodes (the life-or-death). The physics check is the front speed: Fisher–KPP has the exact Ablowitz–Zeppetella travelling wave u = (1 + A·e^{b(x−ct)})⁻², b = √(r/6D), c = 5·√(rD/6) ≈ 2.041·√(rD) — seed it and the measured front speed matches c to ~0.25% (verified live), and the pointwise error vs the exact wave is reported as a small phase lag. Fills concentration_field. Deterministic. Oncology, invasion biology, population genetics, spatial epidemiology.

tumor # invades at c = 5√(rD/6), stays in [0,1] → seals
tumor D=1 r=2 # faster spread + growth → faster front
tumor dt=0.05 # past the CFL limit → density explodes, does NOT seal