minfx-ai/navier-stokes-blowup

0

stars

2

commits

Rust

primary language

Sep 9, 2026

updated

README

Finite-time Navier-Stokes blowup viewer

Paper-grounded 3D viewer (Rust + egui + WGPU) for the finite-time blowup construction in OpenAI's Finite time blowup for Navier-Stokes.

Screenshot

Finite-time Navier-Stokes blowup viewer

What this app is (and is not)

This application visualizes the construction's geometry, asymptotic scaling, and mechanism. It is not a direct numerical reconstruction of the full certified fields.

Represented exactly at the statement level:

  • Theorem 1.1: smooth compact forcing, zero initial velocity, bounded kinetic energy, unbounded L∞ velocity as t -> 1.
  • Section 2.1: anisotropic core contraction and velocity scaling.
  • Section 2.2: annular mismatch and two oscillatory pulse families with zero mean but nonzero averaged quadratic momentum flux.
  • Section 2.3: purely azimuthal heat exterior.
  • Section 3: viscosity rescaling.
  • Theorem 4.6, Proposition 7.5, Corollary 10.6.

Not claimed as exact theorem data:

  • Procedural particle positions and colors.
  • Exact phase functions and pulse timing envelopes.
  • Visual gains (swirl, axial outflow, pulse amplitude, heat exterior).
  • Pedagogical turn-on schedule.

Terminology note: this is not a "refutation of Navier-Stokes." The paper gives a forced smooth solution with finite-time blowup behavior under the stated setup.

Mathematical quantities shown

With tau = 1 - t and 0 < h < 1/100:

  • l_r ~ tau^(1/2)
  • l_z ~ tau^(1/2-h)
  • |u_theta|, |u_z| ~ tau^(-1/2-h)
  • |u_r| ~ tau^(-1/2)
  • core-energy proxy ~ tau^(1/2-3h)
  • Re_theta ~ tau^(-h)/nu
  • axial/radial diffusion proxy ~ tau^(2h)

Viscosity rescaling reference:

  • u_nu(x,t) = sqrt(nu) u(x/sqrt(nu), t)
  • p_nu(x,t) = nu p(x/sqrt(nu), t)
  • f_nu(x,t) = sqrt(nu) f(x/sqrt(nu), t)

The UI checkbox apply exact sqrt(nu) spatial scaling applies the corresponding spatial scaling.

Current UI and behavior

Time is controlled in logarithmic coordinate:

  • s = -log10(1 - t)
  • s = 1,2,3,4,5 corresponds to t = 0.9, 0.99, 0.999, 0.9999, 0.99999

Main controls currently implemented:

  • Renderer switch: WGPU / Software.
  • Layer toggles: core, pulses, exterior, traces, axes, dotted grid.
  • Particle counts for each layer (runtime adjustable).
  • Visualization handles: swirl, axial outflow, pulse amplitude, exterior gain, pulse-family balance, size, density, exposure.
  • Paper handles: h, nu, viscosity scaling toggle.
  • Timeline transport: jump/start/step/playback speed.
  • Camera: drag orbit, wheel zoom, double-click reset, auto-follow path (3 presets).

Notes on timeline jump presets:

  • The first two labels (activation at s=0.30, core contraction at s=0.60) are heuristic names over the logarithmic slider coordinate.
  • Remaining jump points are explicit time labels (t=0.9, t=0.99, t=0.999, near t=1).

Rendering architecture

  • src/main.rs: app state, egui panels, camera, diagnostics, timeline, stage text, uniform packing, callback registration.
  • src/scene.rs: SceneUniforms, WGPU pipeline, callback prepare/paint, particle constants, draw call.
  • src/shader.wgsl: procedural particle generation and shading.

Implementation details:

  • No CPU mesh upload for WGPU path.
  • Particles are procedurally generated billboards from vertex_index.
  • Current default compile-time counts:
    • core: 24,000
    • pulses: 18,000
    • exterior: 8,000
    • total: 50,000 particles (300,000 billboard vertices)
  • Software mode draws a CPU fallback sample cloud.

Uniform layout must stay byte-compatible between SceneUniforms in Rust and Uniforms in WGSL.

Build and run

Prerequisites:

  • Rust stable toolchain
  • (web only) wasm32-unknown-unknown target + Trunk

General Rust setup

If Rust is not installed yet, install it with rustup:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then restart your shell and verify:

rustc --version
cargo --version

Update to latest stable toolchain:

rustup update stable
rustup default stable

Recommended optional components:

rustup component add rustfmt clippy

For this repository's web build support:

rustup target add wasm32-unknown-unknown
cargo install trunk

Native:

cargo run

Release:

cargo run --release

Web run:

trunk serve --release

Open http://127.0.0.1:8080 unless a custom --port is supplied.

Standalone WASM export

A deploy-ready static bundle is kept in export/ for direct upload.

  • Includes index.html, hashed JS loader, and .wasm binary.
  • Uses relative paths (./...) so it works when hosted from a subpath.

Refresh it from current dist/ output:

./scripts/refresh-export.sh

Upload all files inside export/ together. See export/UPLOAD_INSTRUCTIONS.txt for checklist and local validation steps.

Validation workflow

Recommended before/after changes:

cargo fmt --check
cargo check
cargo clippy
cargo run
cargo run --release

Manual smoke test waypoints:

  • timeline near s=0, s~0.05, s~0.35, s=1, s=2, s=3, s=5
  • physical + similarity coordinates
  • each layer individually and combined
  • low/high density
  • low/high h and nu

cargo check alone is not enough for shader safety; WGSL is validated when the app creates the renderer at runtime.

Troubleshooting quick reference

If scene looks empty:

  1. Move to s=1 (t=0.9).
  2. Set density to 1.0, raise exposure and point size.
  3. Enable only core and switch to similarity view.
  4. Confirm renderer mode and WGPU availability.

Common non-bug appearance cases:

  • At t~0, particles intentionally start faint (zero-initial-state emphasis).
  • Near t->1 in physical coordinates, the core collapses into a tiny region.
  • In similarity coordinates, exterior can move out of useful framing.

If Rust compiles but startup fails, inspect WGPU/WGSL runtime errors (shader syntax, uniforms, pipeline descriptors, entry points).

Scientific fidelity rules for contributors

Safe claims:

  • asymptotic scalings, annular stress-cancellation mechanism, heat exterior role, viscosity rescaling, finite-time singular behavior in the construction

Unsafe claims:

  • exact sampled theorem fields from current particle shaders
  • exact pulse cutoffs/phases from the proof
  • arbitrary-h re-proof claims from slider exploration

If higher fidelity is needed, derive and implement from explicit equations/data in the paper rather than tuning current procedural effects.

Contributors

michalsustr

2 commits

minfx-ai/navier-stokes-blowup

0

stars

2

commits

Rust

primary language

Sep 9, 2026

updated

README

Finite-time Navier-Stokes blowup viewer

Paper-grounded 3D viewer (Rust + egui + WGPU) for the finite-time blowup construction in OpenAI's Finite time blowup for Navier-Stokes.

Screenshot

Finite-time Navier-Stokes blowup viewer

What this app is (and is not)

This application visualizes the construction's geometry, asymptotic scaling, and mechanism. It is not a direct numerical reconstruction of the full certified fields.

Represented exactly at the statement level:

  • Theorem 1.1: smooth compact forcing, zero initial velocity, bounded kinetic energy, unbounded L∞ velocity as t -> 1.
  • Section 2.1: anisotropic core contraction and velocity scaling.
  • Section 2.2: annular mismatch and two oscillatory pulse families with zero mean but nonzero averaged quadratic momentum flux.
  • Section 2.3: purely azimuthal heat exterior.
  • Section 3: viscosity rescaling.
  • Theorem 4.6, Proposition 7.5, Corollary 10.6.

Not claimed as exact theorem data:

  • Procedural particle positions and colors.
  • Exact phase functions and pulse timing envelopes.
  • Visual gains (swirl, axial outflow, pulse amplitude, heat exterior).
  • Pedagogical turn-on schedule.

Terminology note: this is not a "refutation of Navier-Stokes." The paper gives a forced smooth solution with finite-time blowup behavior under the stated setup.

Mathematical quantities shown

With tau = 1 - t and 0 < h < 1/100:

  • l_r ~ tau^(1/2)
  • l_z ~ tau^(1/2-h)
  • |u_theta|, |u_z| ~ tau^(-1/2-h)
  • |u_r| ~ tau^(-1/2)
  • core-energy proxy ~ tau^(1/2-3h)
  • Re_theta ~ tau^(-h)/nu
  • axial/radial diffusion proxy ~ tau^(2h)

Viscosity rescaling reference:

  • u_nu(x,t) = sqrt(nu) u(x/sqrt(nu), t)
  • p_nu(x,t) = nu p(x/sqrt(nu), t)
  • f_nu(x,t) = sqrt(nu) f(x/sqrt(nu), t)

The UI checkbox apply exact sqrt(nu) spatial scaling applies the corresponding spatial scaling.

Current UI and behavior

Time is controlled in logarithmic coordinate:

  • s = -log10(1 - t)
  • s = 1,2,3,4,5 corresponds to t = 0.9, 0.99, 0.999, 0.9999, 0.99999

Main controls currently implemented:

  • Renderer switch: WGPU / Software.
  • Layer toggles: core, pulses, exterior, traces, axes, dotted grid.
  • Particle counts for each layer (runtime adjustable).
  • Visualization handles: swirl, axial outflow, pulse amplitude, exterior gain, pulse-family balance, size, density, exposure.
  • Paper handles: h, nu, viscosity scaling toggle.
  • Timeline transport: jump/start/step/playback speed.
  • Camera: drag orbit, wheel zoom, double-click reset, auto-follow path (3 presets).

Notes on timeline jump presets:

  • The first two labels (activation at s=0.30, core contraction at s=0.60) are heuristic names over the logarithmic slider coordinate.
  • Remaining jump points are explicit time labels (t=0.9, t=0.99, t=0.999, near t=1).

Rendering architecture

  • src/main.rs: app state, egui panels, camera, diagnostics, timeline, stage text, uniform packing, callback registration.
  • src/scene.rs: SceneUniforms, WGPU pipeline, callback prepare/paint, particle constants, draw call.
  • src/shader.wgsl: procedural particle generation and shading.

Implementation details:

  • No CPU mesh upload for WGPU path.
  • Particles are procedurally generated billboards from vertex_index.
  • Current default compile-time counts:
    • core: 24,000
    • pulses: 18,000
    • exterior: 8,000
    • total: 50,000 particles (300,000 billboard vertices)
  • Software mode draws a CPU fallback sample cloud.

Uniform layout must stay byte-compatible between SceneUniforms in Rust and Uniforms in WGSL.

Build and run

Prerequisites:

  • Rust stable toolchain
  • (web only) wasm32-unknown-unknown target + Trunk

General Rust setup

If Rust is not installed yet, install it with rustup:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Then restart your shell and verify:

rustc --version
cargo --version

Update to latest stable toolchain:

rustup update stable
rustup default stable

Recommended optional components:

rustup component add rustfmt clippy

For this repository's web build support:

rustup target add wasm32-unknown-unknown
cargo install trunk

Native:

cargo run

Release:

cargo run --release

Web run:

trunk serve --release

Open http://127.0.0.1:8080 unless a custom --port is supplied.

Standalone WASM export

A deploy-ready static bundle is kept in export/ for direct upload.

  • Includes index.html, hashed JS loader, and .wasm binary.
  • Uses relative paths (./...) so it works when hosted from a subpath.

Refresh it from current dist/ output:

./scripts/refresh-export.sh

Upload all files inside export/ together. See export/UPLOAD_INSTRUCTIONS.txt for checklist and local validation steps.

Validation workflow

Recommended before/after changes:

cargo fmt --check
cargo check
cargo clippy
cargo run
cargo run --release

Manual smoke test waypoints:

  • timeline near s=0, s~0.05, s~0.35, s=1, s=2, s=3, s=5
  • physical + similarity coordinates
  • each layer individually and combined
  • low/high density
  • low/high h and nu

cargo check alone is not enough for shader safety; WGSL is validated when the app creates the renderer at runtime.

Troubleshooting quick reference

If scene looks empty:

  1. Move to s=1 (t=0.9).
  2. Set density to 1.0, raise exposure and point size.
  3. Enable only core and switch to similarity view.
  4. Confirm renderer mode and WGPU availability.

Common non-bug appearance cases:

  • At t~0, particles intentionally start faint (zero-initial-state emphasis).
  • Near t->1 in physical coordinates, the core collapses into a tiny region.
  • In similarity coordinates, exterior can move out of useful framing.

If Rust compiles but startup fails, inspect WGPU/WGSL runtime errors (shader syntax, uniforms, pipeline descriptors, entry points).

Scientific fidelity rules for contributors

Safe claims:

  • asymptotic scalings, annular stress-cancellation mechanism, heat exterior role, viscosity rescaling, finite-time singular behavior in the construction

Unsafe claims:

  • exact sampled theorem fields from current particle shaders
  • exact pulse cutoffs/phases from the proof
  • arbitrary-h re-proof claims from slider exploration

If higher fidelity is needed, derive and implement from explicit equations/data in the paper rather than tuning current procedural effects.

See what people are saying

Contributors

michalsustr

2 commits

Languages

Rust

86.8%

WGSL

8.5%

HTML

3.1%