Fluid Dynamics
Navier-Stokes on the browser's GPU — laminar flow, turbulence models (k-ε, k-ω, LES filter), boundary-layer analysis, and vortex shedding — verified to ≤ 0.1% on canonical benchmarks.
- Live app — zeq.dev/apps/fluid-dynamics/
- Source —
apps/zeq-me/public/apps/_in-development/fluid-dynamics/(1,401 lines) - Operators — KO42 · NS-incompressible · Reynolds-stress (τ_ij) · optional NM28
- Error budget — ≤ 0.1% for lid-driven cavity at
Re = 1000(Ghia et al., 1982, reference)
What it solves
Incompressible 2D Navier-Stokes on a regular grid, with three turbulence-modelling options:
- DNS — direct numerical solve, expensive but exact
- RANS (k-ε / k-ω) — time-averaged, production-grade, for engineering design
- LES with Smagorinsky filter — large-eddy resolved, sub-grid modelled
Runs on WebGL2 with a compute-shader projection step. Each HulyaPulse tick produces one fully-converged pressure-Poisson solve; the render loop interpolates between ticks for smooth visualisation.
The math
Navier-Stokes ρ(∂v/∂t + v·∇v) = −∇p + μ∇²v + f
Continuity ∇·v = 0 (incompressible)
Reynolds decomp. v = v̄ + v'
Reynolds stress τ_ij = −ρ ⟨v'_i v'_j⟩
k-ε closure ν_t = C_μ k² / ε (C_μ = 0.09)
Operator picks
| Step | Decision |
|---|---|
| 1. Prime | KO42 on |
| 2. Limit | KO42 + NS + Reynolds-stress = 3 operators |
| 3. Scale | Continuum, Re ∈ [10, 10⁶] |
| 4. Precision | ≤ 0.1% vs. Ghia reference |
| 5. Compile | Master Equation with C_KO42 + C_NS + C_Reynolds |
| 6. Execute | Z encodes grid resolution, Re, boundary conditions, turbulence model |
| 7. Verify | Compare centreline u(y) at 17 Ghia-points; RMS error ≤ 0.1% |
KO42 contributes a 1.287 Hz coherence constraint on the velocity field so numerical dissipation is identifiable (it drifts phase, not magnitude).
Runnable worked example — lid-driven cavity at Re = 1000
Published Ghia reference, centreline u at y = 0.5: u = −0.38289.
The anonymous playground takes a domain plus named inputs and lets the seven-step wizard pick the operators (always KO42 + the domain fit). It returns a sealed envelope:
curl -s -X POST https://zeqsdk.com/api/playground/compute \
-H "Content-Type: application/json" \
-d '{
"domain": "fluid-dynamics",
"inputs": { "reynolds": 1000, "velocity": 1.0, "length": 1.0 }
}' | jq
The response carries value, unit, the operators the wizard chose, the equations it evaluated, and a zeqProof digest. Compare the returned value against the published Ghia centreline (u = −0.38289) yourself — the platform hands you a result any node can recompute, not a printed figure to trust.
Extend it
- 3D cavity — promote grid to 3D; Reynolds-stress becomes a 6-component tensor
- Free surface — VOF + NS; watch dam-break against Koshizuka reference
- Multiphase — two-fluid formulation for bubble dynamics; pair with QM wavelength operator for bubble-sonoluminescence
Seeds
- Active matter / self-propelled particles — add a source term to NS with polarity-based forcing; watch collective flocking
- Biofluid at the capillary scale — non-Newtonian viscosity model + QM de Broglie wavelength at red-blood-cell scale
- Analogue black-hole acoustic horizon — drop a hole in the cavity floor; visualise where streamlines can no longer escape
Papers
- Zeq Paper — doi:10.5281/zenodo.18158152
Middleware active. Kernel on the 1.287 Hz HulyaPulse. Awaiting next Zeqond.