CS Paper Radar

CraftSPH: A composable framework for differentiable smoothed particle hydrodynamics implemented in PyTorch

Gen Matono, Shujiro Fujioka, Mayuko Nishio

cs.LG physics.flu-dynmath.NA ·submitted 2026-09-24 05:00 UTC · v2
code/data

Abstract

Smoothed particle hydrodynamics (SPH) is well suited to large-deformation fluid problems, and the growing use of automatic differentiation in engineering applications has motivated interest in differentiable SPH solvers. In this study, a composable differentiable SPH framework, CraftSPH, has been developed. In CraftSPH, major computational operations are implemented as independent modules that users can combine to construct solvers for different purposes. This design supports high-accuracy discretization and both explicit and implicit computation within a common framework, while allowing individual components to be maintained and extended. Selected numerical operations also support automatic differentiation (AD) for physical-parameter estimation and potential coupling with deep learning models. These capabilities were demonstrated through forward and inverse analyses. Forward analyses using an implicit SPH scheme with high-accuracy discretization showed good agreement with analytical and reference solutions for Poiseuille flow and a rising bubble, while capturing the key experimental trends in two- and three-dimensional dam-break problems. In inverse analyses, explicit and implicit SPH schemes were used to estimate kinematic viscosity in Taylor-Green vortex flow and Reynolds number in lid-driven cavity flow. The results also showed that the choice of operations included in the computational graph affects the computed gradients. Together, these findings demonstrate that CraftSPH enables users to assemble problem-specific solvers for forward and inverse analyses within a common framework.

Comment
The code is publicly available at https://github.com/GenMNL/CraftSPH 43 pages, 14 figures

Closest papers

Nearest neighbours by meaning across the whole index.

A differentiable Lagrangian-coupled 3D Gaussian Splatting-SPH model for forward simulation and inverse analysis in solid mechanics

cs.CV physics.comp-ph ·2026-10-03 ·Tian Xu, Soroush Atashi, Tianju Xue
similarity 0.65
Abstract

Recent advances in generative world models have increased interest in digital models that reproduce both the appearance of real objects and their response to physical interaction. Three-dimensional reconstruction techniques, including 3D Gaussian Splatting, capture detailed surface geometry and appearance from images and videos. However, extending these representations beyond plausible animation to mechanically interpretable models for constitutive behavior, boundary conditions, and inverse parameter identification remains less explored. In this work, a differentiable Lagrangian-coupled 3DGS-smoothed particle hydrodynamics (SPH) model is proposed for forward simulation and inverse analysis of deformable solids. The observed object is first reconstructed from multi-view calibrated visual dataset as a 3DGS rendering model. An envelope-based procedure then generates an independent SPH support for the solid-mechanics model, avoiding the direct use of rendering primitives as mechanical particles. A reference-configuration Lagrangian transfer maps SPH deformation to Gaussian positions and covariances, thereby coupling the physical model and the image observation model while preserving a differentiable computational path. The SPH formulation supports linear elastic, hyperelastic, and Kelvin--Voigt viscoelastic responses, together with fixed, free, and Robin-type boundary conditions. Numerical studies validate the SPH response against finite-element results, assess accuracy and efficiency against a conventional model using Gaussian centers as surface SPH particles, and demonstrate forward simulations on beam, bridge, and liver-shaped examples. Inverse analyses further estimate constitutive and boundary parameters from rendered deformation observations, including noisy cases, demonstrating the feasibility of the proposed model for mechanics-based parameter identification from image data.

0.39

Verification, Sensitivity, and Operating Limits of a GPU-Accelerated Planar WCSPH Model for Hydrodynamic Ram

cs.CE math.NAphysics.flu-dyn ·2026-08-26 ·Md Mujahid Alam, Debojit Biswas, Sukanta Chakraborty
similarity 0.62
Abstract · 47 pages, 12 figures

Hydrodynamic ram (HRAM) loading remains a persistent challenge in impact mechanics, less due to exotic physics than to the difficulty of achieving convincing quantitative agreement in reduced-order representations. Prevailing studies typically employ a single mesh and boundary treatment validated against one experimental dataset, leaving unresolved whether agreement reflects genuine fidelity or compensating discretization errors. This work presents a planar 2D, GPU-accelerated WCSPH solver employing an Adami-type ghost-particle boundary condition, extended for the first time to a moving, decelerating disk penetrating a confined liquid channel at ballistic velocity. The boundary condition is examined against a purpose-derived potential-flow added-mass solution and the analytical acoustic reflection coefficient at the steel-water interface; this exploration reveals that the stiff equation of state and cavitation cutoff impose identifiable delineation of the solver's operating regime on quantitative agreement. A three-point resolution convergence study reveals a non-monotone near-probe pressure peak, attributed to a bounded ghost-fluid density inconsistency. A comprehensive coefficient sweep, conservation diagnostics, and O(N) GPU throughput scaling enable exhaustive characterization impractical in 3D. Qualitative comparison against literature evidence at 900 and 600m/s clarifies load bearing versus approximate elements. Notably, energy diagnostics reveal a modest total energy growth over the simulated window, with the fluid absorbing disproportionately more energy than the projectile relinquishes - an instructive signature of prescribed, non-back-reacting projectile kinematics that helps map the formulation's operating envelope. The resulting solver, while confined to planar geometry, delivers verified, convergence-checked performance well suited for rapid parametric design exploration.

0.32

A Systematic Analysis of Automatic Differentiation versus Discretization-based Constraints for Physics-Informed PDE Solvers

cs.LG math.NAphysics.flu-dyn ·2026-09-07 ·Xing Guo, Hongwei Tang, Zewei Meng, Yidong Zhang, Shaoqiu Xiao +1 more
code/data similarity 0.60
Abstract

Physics-informed neural networks (PINNs) represent a growing frontier in using artificial intelligence to solve partial differential equations (PDEs). Automatic differentiation (AD) plays a central role in this paradigm, which is mesh-free and replaces traditional iterative solvers with gradient-based optimization in continuous space. However, the inherent limitations of AD, particularly in handling higher-order derivatives and discontinuous solutions, pose significant challenges for complex problems. This has motivated a growing number of researchers to explore discretization-based constraints as an alternative path. Yet, the respective applicability of these two paradigms remains largely unexplored. In this work, we conduct systematic experiments across a wide spectrum of problems, from simple linear Poisson to high-Mach hypersonic flows with strong discontinuities. Through a rigorous decomposition of approximation, optimization, and truncation errors, we systematically elucidate the fundamental trade-offs and error-governing mechanisms of both paradigms, as well as two representative network architectures: multi-layer perceptron (MLP) and graph neural network (GNN). Our results reveal a consistent trend: as nonlinearity strengthens, the accuracy advantage of discretization-based constraints becomes increasingly pronounced, with smaller optimization errors compensating for the truncation errors. Moreover, the more complex the nonlinearity and boundary conditions, the greater the advantage of GNN over MLP. These insights offer a robust practical guideline for configuring neural PDE solvers in demanding engineering applications. Our source data and code are available at https://github.com/guoxing0809/neuropde_analysis.

0.29

Torch-DPhys: A Torch-Native, MOOSE-Compatible Framework for Differentiable Physics Simulation and Hybrid Machine Learning Integration

cs.LG ·2026-10-16 ·Akzhol Almukhametov, Yang Liu
similarity 0.60
Abstract

We present Torch-DPhys, a Torch-native framework implemented in PyTorch for differentiable physics simulation and hybrid physics-machine learning. It implements selected thermal-hydraulic modeling concepts and discretizations from MOOSE's Thermal Hydraulics Module and the System Analysis Module (SAM), with a preliminary extension to continuum mechanics. Native tensor residuals support CPU and GPU execution, compilation of selected numerical kernels, and sparse direct linear solves. Sensitivities are obtained by differentiating executed numerical operations or through discrete adjoints of converged residual equations. Verification combines analytical solutions, reference-code comparisons, and derivative checks. Demonstrations cover plane-strain elasticity, one- and two-loop thermal-hydraulic transients, and an axisymmetric molten-salt fast reactor. For the reactor, comparison with SAM-Lite gives a maximum normalized field discrepancy of 1.13 x 10^-5 over 200 adaptive time steps, demonstrating agreement between the tested discrete implementations. Selected transient sensitivities are assessed using tangent-linear calculations and finite differences on fixed time schedules. Two applications illustrate the framework's connection between simulation and optimization. A residual-adjoint parameter-identification calculation recovers nominal pump head and heating power with relative errors below 0.06% from noiseless synthetic MOOSE observations. A separate three-loop plant demonstration uses solver-in-the-loop training of a predictive controller by differentiating trajectory-level objectives through the thermal-hydraulic simulation. These examples illustrate a foundation for gradient-based inference, control, and coupled physics-machine learning models in nuclear engineering.

0.41

CompFlowLab: A Python code to develop and prototype new data-driven models for challenging compressible flow problems with shocks and chemical reactions

cs.CE ·2026-09-26 ·Ali Mohaghegh, Cheng Huang
code/data similarity 0.59
Abstract

CompFlowLab is an open-source Python environment that is capable of modeling different classes of compressible flow problems (including shocks, flames, and detonation waves) using a one-dimensional compressible Navier-Stokes solver with multi-species transport and chemical-reaction models. It is designed specifically for the data-driven modeling community as a lightweight, accessible prototyping platform to test, develop, and evaluate new modeling methods on numerically and physically challenging compressible flow problems, especially those featuring shocks and chemical reactions. Specifically, CompFlowLab aims at (1) providing computationally efficient calculations on advection-dominanted problems that are well-recognized to be difficult for conventional data-driven modeling techniques, such as shocks, flames, and detonation waves, and more importantly (2) enabling rapid testing and prototyping of new data-driven models. The code serves three primary purposes: (1) generating high-fidelity full order model data for training of data-driven modeling, (2) providing a modular platform for implementing and testing novel data-driven algorithms (e.g., machine learning methods and reduced-order modeling techniques) on challenging physics, and (3) offering a standalone Computational Fluid Dynamics (CFD) solver with validated test cases that can also support numerical method development in the broader CFD community. By unifying these capabilities in a clean, extensible Python codebase, CompFlowLab lowers barriers to innovation at the intersection of model reduction and complex fluid dynamics.

0.64

Hard Constraint Projection in a Physics Informed Neural Network (Burgers)

cs.LG physics.flu-dyn ·2026-10-30 ·Miranda J S Horne, Peter K Jimack, Amirul Khan, He Wang
publishedhighly cited similarity 0.59
Abstract · 6 pages, 3 figures, In proceedings of 1st international Symposium on AI and Fluid Mechanics 2025 (Paper No. S11P2)

Physics informed machine learning provides a framework to study and simulate fluid dynamics, potentially at a fraction of the computational cost of traditional numerical methods, with the goal of improving the explainability, accuracy and robustness of purely data driven machine learning methods. In this work, we extend the hard constraint projection (HCP) method developed by Chen et al. [Journal of Computational Physics, 445, 110624, 2021] from a linear partial differential equation (PDE) to a nonlinear PDE: the 1D Burgers' equation. To strictly impose a discrete approximation of the governing equation, the Burgers' equation is first locally discretised (using a finite difference stencil) then decomposed into a constraint matrix and a prediction matrix. Using tools from linear algebra, the constraint matrix is used to construct a projection matrix. A physics informed neural network (PINN) [Raissi et al. Journal of Computational Physics, 378, 686, 2019] is used to predict the velocity, and a final unlearnable layer projects the velocity prediction to the hyperplane of exact solutions to a discretised form of the Burgers' equation. Our initial results indicate that the HCP-PINN initially trains similarly to an equivalent PINN, and as the PINN loss plateaus, the HCP-PINN loss continues to decline. When tested on a previously unseen uniform grid of points covering the domain, the HCP-PINN exhibits higher accuracy, converging to a data error approximately an order of magnitude lower than the comparable PINN. We also observe that the inclusion of the HCP layer results in better observance of the governing PDE. Our findings suggest that the HCP-PINN can be more robust to the selection of physics collocation points, and less dependent on collocation point quantity.

0.39

Solving the Discretised Shallow Water Equations on Distorted Structured Grids with Neural Physics

cs.CE physics.comp-phphysics.flu-dyn ·2026-11-15 ·Boyang Chen, Claire E. Heaney, Christopher C. Pain
similarity 0.59
Abstract · 43 pages, 12 figures, 2 tables

This paper presents a method for solving the shallow water equations on highly distorted structured grids using convolution-based operators following the Neural Physics approach. By mapping distorted physical grids to a uniform computational domain with Jacobian transformations, the governing advection and diffusion operators are reformulated in a structured convolutional form. This enables the use of efficient stencil-based operations and, following the Neural Physics concept, we do this through convolutional layers whose weights are determined by the chosen numerical methods rather than by training. The method introduces consistent mass-lumped formulations, conservative and non-conservative advection forms, and a diffusion operator, all expressed as convolutions. A nonlinear Petrov-Galerkin stabilisation is incorporated to control numerical oscillations on distorted meshes. Two approximations for the Laplacian operator are also proposed to accelerate pressure and diffusion solves. The framework is validated using the Carlisle 2005 flood event, demonstrating accurate predictions of water depth and velocity on distorted meshes for both linear and quadratic discretisations. The results show that distorted structured grids can retain conservation, stability and accuracy, whilst adapting the mesh statically. The convolutional formulation makes the method well suited to Neural Physics implementations and GPU acceleration, offering a scalable approach for flood modelling and large-scale geophysical simulations.

0.37

Variational Parameter Calibration with Physics-Aware Latent-Space Surrogates

cs.LG physics.comp-phphysics.data-anphysics.flu-dyn ·2026-08-11 ·Qiyao Zhou, Xujia Zhu, Pierre Joli, Yu Cong, Sibo Cheng
similarity 0.57
Abstract

Forward and inverse modeling of parametric dynamical systems requires surrogate models that are not only accurate for state prediction, but also informative for parameter calibration. However, a systematic end-to-end differentiable formulation for coupling deep-learning-based reduced-order surrogates with variational parameter estimation remains underdeveloped. In this work, we introduce a physics-aware neural-network-based latent-space framework for reduced-order forward modeling and variational parameter estimation. The proposed autoencoder-based approach yields a differentiable surrogate that maps physical parameters to predicted flow fields through a latent representation. The observable supervision is used during offline training to encourage the latent variables to retain information correlated with system parameters, while the online inverse problem is solved in the parameter space through the surrogate-induced observation operator. The method is evaluated on two computational-fluid-dynamics benchmarks. The results show that reconstruction accuracy alone is insufficient for inverse modeling, owing to the lack of end-to-end differentiability or physics awareness for variational parameter calibration. Quantitative latent-space analysis further shows that observable supervision improves case-level separability and temporal organization of latent representations. Experiments with realistic measurement settings, including noisy, low-resolution, randomly masked, and block-wise partial observations, demonstrate the robustness of the proposed framework and show that it generally reduces calibration error and variability compared with the standard surrogate models.

0.04