Table of Contents
Fetching ...

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.

Neural SPH: Improved Neural Modeling of Lagrangian Fluid Dynamics

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.
Paper Structure (54 sections, 10 equations, 31 figures, 4 tables)

This paper contains 54 sections, 10 equations, 31 figures, 4 tables.

Figures (31)

  • Figure 1: Neural SPH improves Lagrangian fluid dynamics, showcased by physics modeling of the 2D dam break example after 80 rollout steps. Different models exhibit different physics behaviors. From top to bottom: GNS Sanchez:20, GNS with corrected force only (GNS$_g$), full SPH enhanced GNS (GNS$_{g,p}$), and the ground truth SPH simulation. The colors correspond to the density deviation from the reference density; the system is considered physical within 0.98-1.02.
  • Figure 2: Number of neighbors mismatch due to particle clustering. Histogram of the number of neighbors of the 2D lid-driven cavity experiment after 400 rollout steps (average over all test rollouts).
  • Figure 3: Ablations on RPF 2D with GNS-10-128 over the simulation length. Adapted from \ref{['fig:rpf2d_gns_ext']} in \ref{['app:ablations_rpf']}.
  • Figure 4: Velocity magnitudes histogram of 2D reverse Poiseuille flow after 400 rollout steps (averaged over all rollouts). Our $\text{GNS}_{g,p,\nu}$ matches the ground truth distribution of SPH.
  • Figure 5: Density and velocity magnitude of 2D lid-driven cavity after 400 rollout steps (left to right): GNS, GNS$_p$, SPH. The colors in the first row correspond to the density deviation from the reference density; the system is considered physical within 0.98-1.02.
  • ...and 26 more figures