Learning-based models for fluid dynamics often operate in unconstrained function spaces, leading to physically inadmissible, unstable simulations. While penalty-based methods offer soft regularization, they provide no structural guarantees, resulting in spurious divergence and long-term collapse. 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. First, to project deterministic models onto the divergence-free subspace, we integrate a differentiable spectral Leray projection grounded in the Helmholtz-Hodge decomposition, which restricts the regression hypothesis space to physically admissible velocity fields. Second, to generate physically consistent distributions, we show that simply projecting model outputs is insufficient when the prior is incompatible. To address this, we construct a divergence-free Gaussian reference measure via a curl-based pushforward, ensuring the entire probability flow remains subspace-consistent by construction. Experiments on 2D Navier-Stokes equations demonstrate exact incompressibility up to discretization error and substantially improved stability and physical consistency.
翻译:基于学习的流体动力学模型通常在无约束函数空间中运作,导致物理上不可接受的、不稳定的模拟。虽然基于惩罚的方法提供了软正则化,但它们缺乏结构保证,导致虚假散度和长期崩溃。在本文中,我们引入了一个统一框架,将不可压缩连续性方程作为确定性和生成性建模的硬性内在约束。首先,为了将确定性模型投影到无散度子空间,我们集成了基于亥姆霍兹-赫奇分解的可微谱勒雷投影,该投影将回归假设空间限制在物理上允许的速度场中。其次,为了生成物理上一致的分布,我们表明当先验不兼容时,仅投影模型输出是不够的。为解决这一问题,我们通过基于旋度的前向映射构建了一个无散度高斯参考测度,确保整个概率流在构造上保持子空间一致。在二维纳维-斯托克斯方程上的实验表明,该方法在离散误差范围内实现了精确的不可压缩性,并显著提高了稳定性和物理一致性。