diffSPH: Differentiable smoothed particle hydrodynamics for hybrid machine learning solutions in fluid mechanics

• A novel SPH framework built around differentiability and for Machine Learning • The application of our framework to inverse problems and optimization • A novel approach to address particle-shifting using differentiable SPH operators • Easy integration with neural networks for hybrid solver-network solutions • A unified framework for compressible, weakly-compressible and incompressible fluids 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 solving inverse problems 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 applications. 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 simulation steps. Prioritizing readability, usability, flexibility, and extensibility, this work offers a foundational platform for the CFD community to develop and deploy novel neural networks and adjoint optimization applications. Our differentiable SPH framework is available at https://github.com/tum-pbs/diffSPH .

Authors

Institutions

Publication Details

Journal
Journal of Computational Physics
Published
2026-02-15
DOI
https://doi.org/10.1016/j.jcp.2026.114769
Primary Topic
Fluid Dynamics Simulations and Interactions
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

diffSPH: Differentiable smoothed particle hydrodynamics for hybrid machine learning solutions in fluid mechanics

Rene Winchenbach, Nils Thuerey
Journal of Computational Physics
Fluid Dynamics Simulations and Interactions
article

diffSPH: Differentiable smoothed particle hydrodynamics for hybrid machine learning solutions in fluid mechanics

Rene Winchenbach, Nils Thuerey
article en

Abstract

• A novel SPH framework built around differentiability and for Machine Learning • The application of our framework to inverse problems and optimization • A novel approach to address particle-shifting using differentiable SPH operators • Easy integration with neural networks for hybrid solver-network solutions • A unified framework for compressible, weakly-compressible and incompressible fluids 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 solving inverse problems 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 applications. 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 simulation steps. Prioritizing readability, usability, flexibility, and extensibility, this work offers a foundational platform for the CFD community to develop and deploy novel neural networks and adjoint optimization applications. Our differentiable SPH framework is available at https://github.com/tum-pbs/diffSPH .

Journal of Computational PhysicsVol. 555
Technical University of Munich (DE)
Openalex Percentile: Top 51%
Fluid Dynamics Simulations and Interactions
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.