# CraftSPH: A high-accuracy and composable differentiable SPH solver implemented in PyTorch

arXiv: https://arxiv.org/abs/2609.38208 · HTML: https://mlsanity.com/paper/2609.38208/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 13 of its 70 references that are in the map.
- First posted on arXiv 24 Sep 2026.

## Builds on (most cited first, 13 of 13)

- [Adam: A Method for Stochastic Optimization](https://mlsanity.com/paper/1412.6980/) (2014)
- [PyTorch: An Imperative Style, High-Performance Deep Learning Library](https://mlsanity.com/paper/1912.01703/) (2019)
- [Automatic differentiation in machine learning: a survey](https://mlsanity.com/paper/1502.05767/) (2015)
- [DiffTaichi: Differentiable Programming for Physical Simulation](https://mlsanity.com/paper/1910.00935/) (2019)
- [Weak baselines and reporting biases lead to overoptimism in machine learning for fluid-related partial differential equations](https://mlsanity.com/paper/2407.07218/) (2024)
- [SPNets: Differentiable Fluid Dynamics for Deep Neural Networks](https://mlsanity.com/paper/1806.06094/) (2018)
- [JAX-FEM: A differentiable GPU-accelerated 3D finite element solver for automatic inverse design and mechanistic data science](https://mlsanity.com/paper/2212.00964/) (2022)
- [Physics-Embedded Neural Networks: Graph Neural PDE Solvers with Mixed Boundary Conditions](https://mlsanity.com/paper/2205.11912/) (2022)
- [Isometric Transformation Invariant and Equivariant Graph Convolutional Networks](https://mlsanity.com/paper/2005.06316/) (2020)
- [PICT -- A Differentiable, GPU-Accelerated Multi-Block PISO Solver for Simulation-Coupled Learning Tasks in Fluid Dynamics](https://mlsanity.com/paper/2505.16992/) (2025)
- [JAX-MPM: A Learning-Augmented Differentiable Meshfree Framework for GPU-Accelerated Lagrangian Simulation and Geophysical Inverse Modeling](https://mlsanity.com/paper/2507.04192/) (2025)
- [JAX-SPH: A Differentiable Smoothed Particle Hydrodynamics Framework](https://mlsanity.com/paper/2403.04750/) (2024)
- [A remedy to mitigate tensile instability in SPH for simulating large deformation and failure of geomaterials](https://mlsanity.com/paper/2405.09654/) (2024)

## Abstract (arXiv)

Smoothed Particle Hydrodynamics (SPH) is well suited to a range of problems, particularly those involving large deformations in fluid dynamics. In recent years, in addition to the advancement of SPH formulations, the development of differentiable solvers has also progressed. However, unified frameworks that flexibly accommodate diverse numerical schemes, including advanced and implicit methods, while supporting continuous extension and updating remain limited. In this study, a high-accuracy and composable differentiable SPH solver, CraftSPH, has been developed. In CraftSPH, major computational operations are implemented as independent modules, which can be combined according to the intended purpose of constructing a solver. This design enables different computational schemes to be intuitively constructed from combinations of common components and allows newly developed high-accuracy discretization methods to be flexibly incorporated and extended. Furthermore, each module supports automatic differentiation, enabling applications to physical-parameter estimation and to optimization that combines SPH solvers with deep learning models. Accordingly, CraftSPH provides an SPH computational framework in which high-accuracy discretization, explicit and implicit computations, and automatic differentiation can be handled in a unified and extensible manner. To demonstrate the applicability of CraftSPH to a wide range of problems, forward analyses are conducted for Poiseuille flow, two- and three-dimensional dam-break problems, and a rising-bubble problem. In addition, the performance of automatic differentiation is evaluated through inverse problems involving parameter estimation for the Taylor-Green vortex and lid-driven cavity flow.
