Giter VIP home page Giter VIP logo

sph_taichi's Introduction

SPH Taichi

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

Examples

  • Dragon Bath (~420 K particles, ~280 FPS on RTX 3090 GPU, with timestep 4e-4)

  • Armadillo Bath (~1.74 M particles, ~80 FPS on RTX 3090 GPU, with timestep 4e-4)

Features

Currently, the following features have been implemented:

  • Cross-platform: Windows, Linux
  • Support massively parallel GPU computing
  • Weakly Compressible SPH (WCSPH)[1]
  • One-way/two-way fluid-solid coupling[2]
  • Shape-matching based rigid-body simulator[3]
  • Neighborhood search accelerated by GPU parallel prefix sum + counting sort

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.