erizmr / SPH_Taichi

A high-performance implementation of SPH in Taichi.
195 stars 39 forks source link
gpu physics-simulation simulation

SPH Taichi

A high-performance implementation of Smooth Particle Hydrodynamics (SPH) simulator in Taichi. (working in progress)

Examples

Features

Currently, the following features have been implemented:

Note

The GPU parallel prefix sum is only supported by cuda/vulkan backend currently.

Install

python -m pip install -r requirements.txt

To reproduce the demos show above:

python run_simulation.py --scene_file ./data/scenes/dragon_bath.json
python run_simulation.py --scene_file ./data/scenes/armadillo_bath_dynamic.json

Reference

  1. M. Becker and M. Teschner (2007). "Weakly compressible SPH for free surface flows". In:Proceedings of the 2007 ACM SIGGRAPH/Eurographics symposium on Computer animation. Eurographics Association, pp. 209–217.
  2. N. Akinci, M. Ihmsen, G. Akinci, B. Solenthaler, and M. Teschner. 2012. Versatile rigid-fluid coupling for incompressible SPH. ACM Transactions on Graphics 31, 4 (2012), 62:1–62:8.
  3. Miles Macklin, Matthias Müller, Nuttapong Chentanez, and Tae-Yong Kim. 2014. Unified particle physics for real-time applications. ACM Trans. Graph. 33, 4, Article 153 (July 2014), 12 pages.

Acknowledgement

Implementation is largely inspired by SPlisHSPlasH.