Project and Generate: Divergence-Free Neural Operators for Incompressible Flows

Learning-based models for fluid dynamics often operate in unconstrained function spaces, leading to physically inadmissible, unstable simulations. Penalty-based methods can reduce constraint violations but do not guarantee exact incompressibility. In this work, we introduce a unified framework that enforces the incompressible continuity equation as a hard, intrinsic constraint for both deterministic and generative modeling. We integrate a differentiable spectral Leray projection into neural operators to enforce incompressibility. For flow matching, we construct a divergence-free Gaussian reference measure via a curl-based pushforward, so that the reference samples, interpolation paths, and velocity targets are compatible with the projected dynamics. Experiments on 2D Navier-Stokes equations demonstrate exact incompressibility up to discretization error and substantially improved stability and physical consistency.