DDFKs: Fluid Simulation with Dynamic Divergence-Free Kernels

Jingrui Xing, Yizao Tang, Mengyu Chu, Baoquan ChenarXiv 2026

TL;DR

Enforcing strict incompressibility in modern, memory-efficient fluid simulations remains a major hurdle. This paper introduces Dynamic Divergence-Free Kernels (DDFKs), a grid-free solver that mathematically guarantees zero-divergence by construction, eliminating the need for expensive pressure projections or problematic divergence losses.

What Problem Does This Paper Address?

Recent trends in fluid simulation leverage continuous spatial representations—like Implicit Neural Spatial Representations (INSRs) and Gaussian Spatial Representations (GSR)—to achieve excellent spatial adaptivity and memory compactness. However, ensuring that a fluid behaves like an incompressible liquid (meaning its velocity field has zero divergence, $\nabla \cdot \mathbf{u} = 0$) is incredibly difficult for these methods.

Existing neural solvers rely on operator-splitting with costly PDE-loss optimization or unstable Monte Carlo pressure estimators. Methods like GSR use a physics-informed divergence loss during optimization, but this "soft constraint" rarely hits absolute zero. Under extreme scenarios, such as a piston compressing fluid in a closed box, this imperfect constraint causes unphysical fluid compression and severe volume loss.

Fig. 1. A piston is moving downwards at a constant speed inside a closed vessel, simulated with divergence-free kernels (ours) and GSR, respectively. Left two figures: the vorticity field at frame 50 of our simulation and GSR’s, respectively. The third and fourth figure: visualizations of the velocity field at frame 50 of ours and GSR’s, respectively, with streamlines plotted along the velocity field and background color reflecting the magnitude of velocity. Right: flowrate measured on the orange lines on the third and fourth figure at each timestep, with upward being positive. The flowrate is calculated by integrating the 𝑦-component of the velocity along the orange lines.

Methods

The authors propose Dynamic Divergence-Free Kernels (DDFKs), which build the divergence-free constraint directly into the underlying mathematical basis functions:

  • Divergence-Free Kernels (DFKs): Instead of standard scalar Gaussians, the velocity field is modeled as a sum of matrix-valued kernels derived from a $C^4$-continuous radial basis function. By applying a specific differential operator to the scalar basis, the resulting vector field is analytically guaranteed to be divergence-free, regardless of the particle weights.
  • Vorticity-Form Optimization: Because the representation cannot physically represent a divergent field, traditional advection-projection splitting is invalid. Instead, the solver directly minimizes a loss based on the vorticity form of the Navier-Stokes equations, alongside boundary condition losses.
  • Advection-Based Initial Guess: Before optimization at each timestep, particle positions are advected forward using a 4th-order Runge-Kutta (RK4) scheme to provide a physically grounded starting point for the optimizer.
  • Dynamic Reinitialization: To prevent particles from bunching up or leaving empty gaps over time, the solver periodically re-samples the velocity field and injects new particles into under-fitted regions exhibiting high gradient errors.
  • Hash Grid Acceleration: A spatial hash grid accelerates neighbor lookups, reducing the velocity field query time from $O(N)$ to $O(1)$.
Streamline plot of a single DFK vector field

Datasets

The method is evaluated on several standard fluid mechanics benchmarks and synthetic scenarios:

  • Taylor-Green Vortex: Used for quantitative accuracy verification against an analytical solution.
  • Taylor Vortex: Used to compare vortex preservation and background noise against Eulerian, INSR, and GSR methods.
  • Leapfrog 2D Experiment: Evaluates numerical dissipation via interacting vortex pairs.
  • Karman Vortex Street: Simulates flow past a cylindrical obstacle to test boundary handling and high-Reynolds-number stability.
  • Piston in a Closed Vessel: Tests strict incompressibility under extreme boundary motion.
  • Vortices Passing Gaps: Tests how well the method captures flow through narrow and wide geometric constraints.

Key Insights and Ideas

  • Hard Constraints over Soft Losses: Shifting the divergence-free requirement from an optimization loss to the mathematical definition of the basis functions completely removes gradient conflicts, leading to more stable and physically accurate simulations.
  • Exact Spatial Derivatives: Unlike neural network approaches that require computationally heavy auto-differentiation to find gradients, DFKs allow direct, exact analytical differentiation with $O(1)$ complexity, ensuring smooth $C^1$ continuity without clamping artifacts.
  • Low Numerical Dissipation: Being entirely grid-free, the method avoids the artificial numerical smoothing (dissipation) common in traditional Eulerian grid methods, allowing vortices to persist much longer.

Key Results

  • Unconditional Incompressibility: In the piston experiment, DDFK perfectly maintains the ground-truth flowrate of 4.0 throughout the simulation, whereas GSR fails and allows the fluid to compress unphysically.
  • Superior Accuracy: On the Taylor-Green vortex benchmark, DDFK achieved a Mean Squared Error (MSE) of $3.305 \times 10^{-8}$ at frame 100, significantly outperforming GSR ($2.181 \times 10^{-7}$) and INSR ($1.992 \times 10^{-5}$).
  • Vortex Longevity: In the 2D Leapfrog test, DDFK successfully maintained vortex separation past the fifth half-turn, while Gaussian Fluids (GSR) caused the vortices to prematurely merge before the fourth turn due to higher numerical dissipation.
Qualitative comparison of Leapfrog, Karman vortex street, and gap traversal

Limitations and Future Work

  • Computational Speed: As a first-order optimization-based solver, DDFK is currently slower than traditional highly optimized grid- or particle-based fluid solvers.
  • Scope of Dynamics: The current implementation focuses primarily on inviscid, incompressible flows. Extending the framework to handle highly viscous fluids, multi-phase flows, or complex free-surface tracking remains an open area for future research.

Summary updated

BibTeX
@misc{xing2026ddfks,
  author = {Jingrui Xing and Yizao Tang and Mengyu Chu and Baoquan Chen},
  title = {{DDFKs: Fluid Simulation with Dynamic Divergence-Free Kernels}},
  year = {2026},
  eprint = {2601.17693},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.17693},
}
Figure