TNL-SPH: Open-source modular SPH solver for modern computing platforms based on GPU accelerators

Read full text
Authors: Tomáš Halada, Luděk Beneš, Jakub Klinkovský, Tomáš Oberhuber
Cited by: 0
References: 28

Abstract

TNL-SPH is a novel open-source implementation of Smoothed Particle Hydrodynamics (SPH), integrated as a submodule of the Template Numerical Library (TNL), designed for modern distributed computing platforms with GPU accelerators. Focusing on hydrodynamic problems using weakly compressible formulations, TNL-SPH offers a modular, high-performance framework for implementing various SPH schemes and particle methods. Developed in C++17, it leverages TNL’s templated vectors and expression templates to provide compact, algebraic representations of numerical schemes, simplifying the development of complex physical models. Its multilayered design separates parallelism, performance, and numerical methods, enabling seamless execution across diverse hardware, including multi-GPU and distributed systems. TNL-SPH outperforms existing SPH codes for free-surface flows and supports scalable, high-performance simulations. This paper presents the design, implementation, and performance of TNL-SPH, alongside its applications in hydraulic problems, demonstrating its versatility and efficiency for scientific and engineering computations. PROGRAM SUMMARY Program Title: TNL-SPH CPC Library link to program files: https://doi.org/10.17632/9zgr6dyznf.1 Developer’s repository link: https://gitlab.com/tnl-project/tnl-sph Licensing provisions(please choose one): MIT Programming language: C++, Python Nature of problem: Particle methods are a family of numerical algorithms in which point-like objects (particles) interact pairwise and evolve based on those interactions. We focus on the high-performance implementation of the particle methods, primarily targeting GPU accelerators. Building on general particle concepts, we utilize particles to solve hydraulic problems involving free surface flow using the Smoothed Particle Hydrodynamics (SPH) method. Solution method: We propose an implementation based on a Unifying definition of the particle method. By building on the Template Numerical Library (TNL) and utilizing template metaprogramming, the framework enables a single code to run efficiently across diverse hardware architectures. TNL’s expression templates provide a simple and compact approach to implementing numerical schemes, ensuring a clear correspondence between the algebraic form of the equations and the resulting code. Additional comments including restrictions and unusual features (approx. 50–250 words): TNL-SPH provides a general framework for implementing short-range interaction particle methods. The SPH solver within this framework offers multiple formulations of the method – δ -WCSPH, RSPH, and SHTC-SPH schemes, along with various boundary conditions for solid walls, including also open boundaries. The code supports multi-GPU computing and, for hydrodynamic problems, it surpasses the performance of other available SPH codes.

Fields of Study & Subjects

Fluid Dynamics Simulations and Interactions DNA and Biological Computing Metaheuristic Optimization Algorithms Research

Publication details

Journal / source
Computer Physics Communications
Volume
326
Pages
110174–110174
Publication date
30 April 2026
Language
EN