Journey into SPH Simulation: A Comprehensive Framework and Showcase
Haofeng Huang, Li Yi
TL;DR
The paper addresses the challenge of realistic, large-scale SPH fluid simulation with rigid-fluid interactions and high-viscosity fluids in computer graphics. It presents a unified framework that integrates multiple SPH formulations (EOS/WCSPH, PPE-based PCISPH/DFSPH) and a rigid-fluid coupling scheme, implemented on GPUs via CUDA and Taichi. The pipeline supports core simulation, post-processing, and rendering, and demonstrates large-scale results (e.g., 1.23M particles) and complex interactions, with performance benchmarking showing CUDA superiority. Key contributions include flexible solvers, explicit/implicit viscosity, robust fluid-solid coupling, and a scalable implementation for millions of particles, enabling realistic simulations for visual effects and scientific visualization. The framework solves the incompressible Navier–Stokes equations with the divergence-free constraint $\nabla \cdot \mathbf{v} = 0$ and momentum balance $\rho \frac{D \mathbf{v}}{D t} = - \nabla p + \mu \nabla^2 \mathbf{v} + \mathbf{f}_{ext}$, leveraging operator splitting to separate non-pressure and pressure steps and to support large time steps through PPE-based solvers. This work offers a practical, GPU-accelerated SPH toolkit that scales to millions of particles while supporting complex interactions and high-viscosity phenomena.
Abstract
This report presents the development and results of an advanced SPH (Smoothed Particle Hydrodynamics) simulation framework, designed for high fidelity fluid dynamics modeling. Our framework, accessible at https://github.com/jason-huang03/SPH_Project, integrates various SPH algorithms including WCSPH, PCISPH, and DFSPH, alongside techniques for rigid-fluid coupling and high viscosity fluid simulations. Leveraging the computational power of CUDA and the versatility of Taichi, the framework excels in handling large-scale simulations with millions of particles. We demonstrate the capability of our framework through a series of simulations showcasing rigid-fluid coupling, high viscosity fluids, and large-scale fluid dynamics. Furthermore, a detailed performance analysis reveals CUDA's superior efficiency across different hardware platforms. This work is an exploraion into modern SPH simulation techniques, showcasing their practical implementation and capabilities.
