Stable Fluids splitting
Each step adds your forcing, advects velocity and dye semi-Lagrangianly (midpoint RK2 backtracking), solves implicit diffusion (I − νΔt Δ)u = u*, and projects onto divergence-free fields with a DCT-II Neumann Poisson solve.
Kernelized Stable Fluids with sparse Cholesky preconditioning, simulated live on a GPU
Each step adds your forcing, advects velocity and dye semi-Lagrangianly (midpoint RK2 backtracking), solves implicit diffusion (I − νΔt Δ)u = u*, and projects onto divergence-free fields with a DCT-II Neumann Poisson solve.
KSF-Chol replaces Stam's linear interpolation at the departure points with Matérn-5/2 kernel interpolation, u(y) = K(y,X)K(X,X)-1uX. That cuts the numerical diffusion, so vortices live longer. Pick Stable Fluids to see the linear-interpolation baseline.
The kernel systems are solved by PCG with the sparse inverse-Cholesky preconditioner M-1 = PTLLTP (multilevel ordering, ρ = 7.5). Products with K(X,X) use a Toeplitz FFT, and off-grid values use an exact near field plus a Chebyshev–SVD–FFT far field.
The comparison method (Nabizadeh, Wang, Ramamoorthi & Chern, SIGGRAPH 2022) transports velocity as a covector, unew = ∇ΨT u∘Ψ, which preserves circulation. It runs as in the authors' code: MAC grid, RK4 flow maps from a midpoint velocity, BFECC correction, and an exact projection. Cells, scene, viscosity and forcing match KSF-Chol.
Side by side runs KSF-Chol on the left and the selected method on the right, from the same state. Every stroke, scene source and time step is applied to both. The chart tracks kinetic energy and enstrophy, so you can see which method dissipates less.
All steps are captured as CUDA graphs in double precision on an NVIDIA V100. Frames are rendered on the GPU and streamed as H.264 (hardware NVENC) or JPEG. KSF-Chol dye is drawn from its kernel expansion on a refined lattice.