Real-time Picard-Lindelof stability monitor for Navier-Stokes CFD simulations. Issues pre-singularity WARNING before solver divergence with mean 37.5% lead time.
Reason this release was yanked:
Pending patent filing - re-releasing after USPTO submission
Project description
navier-stability
Real-time Picard-Lindelöf stability monitor for Navier-Stokes CFD simulations.
Patent Pending — Aadam Quraishi | Simulation Vitals LLC
What It Does
navier-stability monitors any Navier-Stokes CFD simulation at each timestep and issues a WARNING before the solver diverges — giving you time to save a checkpoint, reduce the timestep, or refine the mesh before hours of compute are lost.
Validated Performance (March 2026)
| Metric | Result |
|---|---|
| Detection sensitivity | 100% (57/57 divergence events warned) |
| False positive rate | 0% (9 stable cases — zero false alarms) |
| Mean WARNING lead time | 37.5% of simulation duration |
| High-Re lead time (Re=3200–6400) | 53.1% mean |
| Prior art lead time | 0% |
How It Works
Three signals computed at each timestep:
L(t) = ||∇u(t)||_{L∞} (Lipschitz constant of velocity field)
D_FP(t) = ν · sup_x |Δu(x,t)| (Fokker-Planck dissipation bound)
M*(t) = D_FP(t) / (L(t)² · Δx_min) (dimensionless stability margin)
WARNING fires when M*(t) < M_critical = ν·λ₁ AND dM/dt < 0 for 3 consecutive steps.
This is the first known implementation of the Beale-Kato-Majda theorem as an operational engineering warning system.
Installation
pip install navier-stability
Quick Start
from navier_stability import StabilityMonitor
import numpy as np
# Initialize monitor
monitor = StabilityMonitor(
nu=0.001, # kinematic viscosity
N=64, # grid resolution
L_domain=1.0, # domain size
)
# At each CFD timestep:
u = get_velocity_x() # your NxN velocity array
v = get_velocity_y() # your NxN velocity array
reading = monitor.step(u, v, timestep=step, t=current_time, dt=dt)
if reading.warning:
print(f"WARNING: singularity approaching at t={current_time:.4f}")
print(f"M*(t) = {reading.M_star:.6f} < M_critical = {reading.M_critical:.6f}")
save_checkpoint()
Run Benchmarks
from navier_stability.benchmarks import run_tgv, run_cavity
# Taylor-Green Vortex (canonical CFD benchmark)
result = run_tgv(Re=1600, N=32, dt=0.05)
print(f"Lead time: {result['lead_time_pct']:.1f}%")
# Lid-driven cavity (Ghia et al. 1982)
result = run_cavity(Re=1600, N=32, dt=0.001)
print(f"Warning at step: {result['warning_step']}")
print(f"Diverged at step: {result['divergence_step']}")
Status Classification
| Status | Meaning |
|---|---|
| STABLE | M*(t) well above threshold — simulation healthy |
| WATCH | M*(t) approaching threshold — monitor closely |
| WARNING | Pre-singularity approach detected — save checkpoint |
| CRITICAL | M*(t) below threshold — divergence imminent |
Why This Matters
Every major CFD solver — Ansys Fluent, OpenFOAM, Siemens STAR-CCM+, NVIDIA PhysicsNeMo — currently has zero real-time pre-singularity warning. When a simulation diverges after 40+ hours of GPU compute, all output is lost.
navier-stability provides the first mathematically grounded runtime warning derived from the Picard-Lindelöf uniqueness theorem. The critical threshold M_critical = ν·λ₁ is not empirically tuned — it is derived from the first eigenvalue of the Stokes operator on the simulation domain.
License
MIT License — free for academic and open-source use.
Commercial license: contact aadam@simulationvitals.com
Citation
If you use navier-stability in research, please cite:
Quraishi, A. (2026). navier-stability: Real-time Picard-Lindelof stability
monitoring for Navier-Stokes CFD simulations. Patent Pending.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters