arXiv:2507.21684physics.flu-dyncs.AI2025-07被引 2

将SPH流体模拟变为可微分框架,支持机器学习与优化设计。

diffSPH: Differentiable Smoothed Particle Hydrodynamics for Adjoint Optimization and Machine Learning

  • 基于PyTorch实现可微分SPH,支持压缩、弱压缩和不可压缩流体模拟。
  • 通过最小化物理与正则化损失,有效解决粒子偏移问题。
  • 适用于参数优化、形状设计及求解器嵌入式训练,适合流体建模研究者。

我们提出diffSPH,一个完全基于PyTorch的开源可微分光滑粒子流体动力学(SPH)框架,支持GPU加速。该框架以可微分为核心,服务于计算流体动力学(CFD)中的优化与机器学习(ML)应用,包括神经网络训练与混合模型开发。其可微分的SPH核心支持压缩性(含激波捕捉与多相流)、弱压缩性(含边界处理与自由表面流)及不可压缩物理模型,覆盖广泛应用场景。我们展示了多项能力:通过新提出的靶向优化方法,最小化物理与正则化损失项,解决传统求解器难以处理的粒子偏移问题;优化初始条件与物理参数以匹配目标轨迹;实现形状优化;构建求解器在环架构以模拟高阶积分;并验证梯度可沿数百步完整模拟传播。本工作注重可读性、易用性与可扩展性,为CFD领域提供开发新型神经网络与伴随优化应用的基础平台。

原文摘要 · Abstract (English)

We present diffSPH, a novel open-source differentiable Smoothed Particle Hydrodynamics (SPH) framework developed entirely in PyTorch with GPU acceleration. diffSPH is designed centrally around differentiation to facilitate optimization and machine learning (ML) applications in Computational Fluid Dynamics~(CFD), including training neural networks and the development of hybrid models. Its differentiable SPH core, and schemes for compressible (with shock capturing and multi-phase flows), weakly compressible (with boundary handling and free-surface flows), and incompressible physics, enable a broad range of application areas. We demonstrate the framework's unique capabilities through several applications, including addressing particle shifting via a novel, target-oriented approach by minimizing physical and regularization loss terms, a task often intractable in traditional solvers. Further examples include optimizing initial conditions and physical parameters to match target trajectories, shape optimization, implementing a solver-in-the-loop setup to emulate higher-order integration, and demonstrating gradient propagation through hundreds of full simulation steps. Prioritizing readability, usability, and extensibility, this work offers a foundational platform for the CFD community to develop and deploy novel neural networks and adjoint optimization applications.

流体模拟可微分机器学习优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。