FluidNeRF
Neural Flow Visualizer

Neural Radiance Fields adapted for 3D fluid flow visualization. Select an exact analytical flow field, explore velocity magnitude, vorticity, Q-criterion vortex cores, Beer-Lambert volume rendering, and RK4 streamlines — all computed analytically in your browser.

Flow Field

Exact Navier-Stokes solution for decaying 3D turbulence.

Visualization

25×2549×4973×73
41224

Time Evolution

Taylor-Green vortex decays with viscous timescale τ = L²/(2ν). Other fields are steady.

00.05.0

Physics Verification

Divergence-free condition (∇·V = 0) computed at a sample point via finite differences:

Computing...

Flow Statistics

Avg |V|
Max |V|
Avg |ω|
Max |ω|
Enc. Dim
Samples
Compute

Flow Field Slice & Streamlines — RK4 Integration

Q-Criterion — Vortex Core Identification (Hunt et al., 1988)

Q = ½(‖Ω‖² − ‖S‖²). Red/positive regions are vortex cores where rotation dominates strain. Contours show Q > threshold.

Beer-Lambert Volume Rendering — Ray-Marched View

Integrates C(r) = Σᵢ Tᵢαᵢcᵢ along z-rays (32 samples/ray). Color = viridis(speed), density σ ∝ vorticity magnitude. This is the core NeRF rendering equation applied to flow data.

Volume Render

NeRF Positional Encoding (Mildenhall et al., 2020)

γ(x) = [sin(2⁰πx), cos(2⁰πx), …, sin(2⁹πx), cos(2⁹πx)]. Applied to each of (x,y,z) → 60-dim per coordinate → 180-dim total input to the MLP.

Beer-Lambert Transmittance T(t) = exp(−σt)

Higher density σ causes faster opacity buildup. NeRF hierarchical sampling allocates more rays in high-density (high-σ) regions for accurate rendering of vortex cores.

FluidNeRF — Exact Architecture (Mildenhall et al., 2020)

Position (x,y,z) 3D coordinate in flow domain
Positional Encoding γ(p): L=10 → 60-dim per axis → 180-dim
8-layer MLP (256) Skip connection at layer 4. ReLU activations.
Density σ + RGB σ: ReLU (≥0). c: sigmoid after direction encoding.
Volume Rendering C(r) = Σ Tᵢαᵢcᵢ → Pixel color

Taylor-Green Vortex (Taylor & Green, 1937)

u = V₀ sin(x/L) cos(y/L) cos(z/L) e−2νt/L²
v = −V₀ cos(x/L) sin(y/L) cos(z/L) e−2νt/L²
ωz = −2V₀/L · cos(x/L)cos(y/L)cos(z/L)

Exact N-S solution. Vorticity decays exponentially with viscosity ν. Benchmark for turbulence DNS codes.

ABC Flow — Beltrami (Dombre et al., 1986)

u = A·sin(z) + C·cos(y),  A=√6
v = B·sin(x) + A·cos(z),  B=√2
w = C·sin(y) + B·cos(x),  C=√3

curl(V) = V exactly → zero pressure gradient, satisfies Euler equations. Exhibits Lagrangian chaos: exponential separation of nearby fluid particles.

Q-Criterion (Hunt et al., 1988)

∇u = S + Ω
Q = ½(‖Ω‖² − ‖S‖²)
Vortex cores: Q > 0

S = symmetric strain rate. Ω = antisymmetric rotation rate. Positive Q identifies regions where vorticity production exceeds strain (vortex cores).

← All ML/AI Projects View Source on GitHub