Neural SPH: Improved Neural Modeling of Lagrangian Fluid Dynamics
Artur P. Toshev, Jonas A. Erbesdobler, Nikolaus A. Adams, Johannes Brandstetter
TL;DR
This work addresses the challenge of long-horizon accuracy in neural surrogates for Lagrangian fluid dynamics by identifying tensile-instability–driven clustering as a key failure mode in GNN rollouts and introducing Neural SPH. The method combines an external-force correction during training with an SPH relaxation step during inference to improve stability, density distributions, and physical fidelity across diverse 2D and 3D datasets. Empirical results show that Neural SPH variants outperform baseline GNN simulators by substantial margins on rollout metrics such as position error, distributional divergence, and kinetic-energy error, enabling significantly longer and more realistic rollouts. The approach preserves modularity, requiring no differentiable solvers, and demonstrates practical gains by integrating classical SPH techniques with modern graph-based surrogates, with broad implications for scalable, physics-informed simulation in engineering and science.
Abstract
Smoothed particle hydrodynamics (SPH) is omnipresent in modern engineering and scientific disciplines. SPH is a class of Lagrangian schemes that discretize fluid dynamics via finite material points that are tracked through the evolving velocity field. Due to the particle-like nature of the simulation, graph neural networks (GNNs) have emerged as appealing and successful surrogates. However, the practical utility of such GNN-based simulators relies on their ability to faithfully model physics, providing accurate and stable predictions over long time horizons - which is a notoriously hard problem. In this work, we identify particle clustering originating from tensile instabilities as one of the primary pitfalls. Based on these insights, we enhance both training and rollout inference of state-of-the-art GNN-based simulators with varying components from standard SPH solvers, including pressure, viscous, and external force components. All Neural SPH-enhanced simulators achieve better performance than the baseline GNNs, often by orders of magnitude in terms of rollout error, allowing for significantly longer rollouts and significantly better physics modeling. Code available at https://github.com/tumaer/neuralsph.
