SPHinXsys: an open-source multi-physics and multi-resolution library based on smoothed particle hydrodynamics

Chi Zhang, Massoud Rezavand, Yujie Zhu, Yongchuan Yu, Dong Wu, Wenbin Zhang, Jianhang Wang, Xiangyu HuarXiv 2020 · DOI

Abstract

SPHinXsys (Smoothed Particle Hydrodynamics for industrial compleX sysstems) is an open-source, multi-resolution, and multi-physics library designed to model coupled industrial dynamic systems. Developed under the Apache License (2.0), SPHinXsys provides a unified C++ API for simulating fluids, solids, multi-body dynamics, and electromechanics. By leveraging a multi-resolution framework, the library allows different physical components to operate at distinct spatial and temporal scales, significantly enhancing computational efficiency. This paper details the library's architecture, its core numerical formulations—including Riemann-based SPH and Total Lagrangian formulations—and its performance across various validation benchmarks.

Introduction

Modern industrial design increasingly requires the simulation of complex systems where multiple physical domains interact. Examples range from automotive engineering, involving fluid-thermal-structural interactions, to biomechanics, where electrical signals trigger muscle contractions and blood flow. Traditional mesh-based methods, such as Finite Element Analysis (FEA), often encounter difficulties when dealing with large deformations or complex moving boundaries.

Smoothed Particle Hydrodynamics (SPH), a meshless Lagrangian particle method, offers a robust alternative for these challenges. However, the adoption of SPH in industrial contexts has been hindered by the lack of unified, efficient, and open-source tools. SPHinXsys addresses this gap by providing a flexible C++ library capable of handling multi-physics interactions within a single, cohesive framework.

Core Methodology

SPHinXsys is built upon a Lagrangian particle-based framework where the computational "mesh" moves with the material. This approach is inherently suited for tracking interfaces and handling large deformations. The library introduces several key technical innovations:

Riemann-based SPH for Fluids

To minimize numerical dissipation—a common issue in traditional SPH—SPHinXsys employs Riemann solvers. This is particularly effective for capturing high-energy, violent free-surface flows, such as breaking waves or dambreak scenarios, with high fidelity.

Total Lagrangian Formulation for Solids

For solid mechanics, the library utilizes a Total Lagrangian formulation. This allows for the accurate modeling of large deformations and the implementation of complex constitutive laws, such as the Holzapfel-Ogden model used in cardiac tissue simulation.

Multi-Resolution FSI Coupling

The defining feature of SPHinXsys is its multi-resolution capability. In Fluid-Structure Interaction (FSI) problems, the fluid and solid components can be assigned different particle spacings and time steps. This allows researchers to use a coarse resolution for large fluid domains while maintaining a fine resolution for thin or complex elastic structures, optimizing computational resources.

Numerical Stability and Integration

To ensure physical accuracy, the library uses a Position-Based Verlet scheme for time integration, which maintains strict momentum conservation during FSI. Additionally, for "stiff" equations found in reaction-diffusion problems (e.g., cardiac electrophysiology), an operator-splitting method is employed to handle reaction terms efficiently.

Validation and Performance

The library has been rigorously validated against a suite of established benchmarks:

  • Fluid Dynamics: 2D and 3D dambreak flows and sloshing tank simulations.
  • Solid Dynamics: Oscillating beams and 3D cantilever bending.
  • Fluid-Structure Interaction (FSI): Hydrostatic water columns acting on elastic plates and flow-induced vibrations of flexible beams.
  • Diffusion & Electromechanics: Isotropic/anisotropic mass diffusion and a complex biventricular heart model simulating excitation-induced contraction.

The multi-resolution approach provides dramatic performance improvements. In FSI benchmarks, increasing the fluid-to-structure resolution ratio from 2 to 4 resulted in speedups ranging from 240x to 960x compared to traditional single-resolution solvers.

Conclusion and Future Directions

SPHinXsys v0.2.0 establishes a powerful, open-source foundation for multi-physics simulation. By decoupling spatial and temporal scales, it allows for high-fidelity modeling of complex systems without the prohibitive computational costs of uniform high-resolution grids.

Future development focuses on three main areas: implementing GPGPU (General-Purpose Graphics Processing Unit) acceleration to further increase performance, expanding industrial modules for applications like wave energy converters, and evolving the electromechanics module into a full-scale "open heart simulator."

Reference: Zhang, C., et al. (2020). SPHinXsys: an open-source multi-physics and multi-resolution library based on smoothed particle hydrodynamics. Computer Physics Communications.

Summary updated

Abstract

In this paper, we present an open-source multi-resolution and multi-physics library: SPHinXsys (pronunciation: s'finksis) which is an acronym for \underline{S}moothed \underline{P}article \underline{H}ydrodynamics (SPH) for \underline{in}dustrial comple\underline{X} \underline{sys}tems. As an open-source library, SPHinXsys is developed and released under the terms of Apache License (2.0). Along with the source code, a complete documentation is also distributed to make the compilation and execution easy. SPHinXsys aims at modeling coupled multi-physics industrial dynamic systems including fluids, solids, multi-body dynamics and beyond, in a multi-resolution unified SPH framework. As an SPH solver, SPHinXsys has many advantages namely, (1) the generic design provides a C++ API showing a very good flexibility when building domain-specific applications, (2) numerous industrial or scientific applications can be coupled within the same framework and (3) with the open-source philosophy, the community of users can collaborate and improve the library. SPHinXsys presently (v0.2.0) includes validations and applications in the fields of fluid dynamics, solid dynamics, thermal and mass diffusion, reaction-diffusion, electromechanics and fluid-structure interactions (FSI).
BibTeX
@misc{zhang2020sphinxsys,
  author = {Chi Zhang and Massoud Rezavand and Yujie Zhu and Yongchuan Yu and Dong Wu and Wenbin Zhang and Jianhang Wang and Xiangyu Hu},
  title = {{SPHinXsys: an open-source multi-physics and multi-resolution library based on smoothed particle hydrodynamics}},
  year = {2020},
  eprint = {2010.12375},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2010.12375},
}
Figure