Skip to content

taichi-dev/mpm_3d_exercise

Repository files navigation

MPM 3D

The starter code for a 3D material point method simulation demo written in Taichi. This would be a good exercise for you to get used to continuum simulations.

mpm3d_starter.mp4

To implement your own version, click the "Use this template" button on this page and simply modify the mpm_3d_starter.py script.

Installation

Make sure your pip is up-to-date:

$ pip3 install pip --upgrade

Assume you have a Python 3 environment, to install Taichi:

$ pip3 install -U taichi

To run the demo:

$ python mpm_3d_starter.py

TODOs

The main simulation step substep function is intentionally left blank. You shall fill it in with proper code include the P2G, GridOp, and G2P steps. A 2D reference implementation is provided at mpm99.py.

Extra credits are for the extras

There are plenty of room for hacking! We suggest a few of them for you to start with:

  • Higher resolution simulations utilizing sparse data structures
  • More sophisticated boundary handling and better scenes
  • Better particle initialization with arbitrary shapes
  • Faster P2G step without floating point atomic operations (integers are fine)
  • Higher order time integration methods
  • Implicit time integration methods
  • Supporting more material models
  • Reducing the numerical adhesion/friction/fracture artifacts
  • etc.

Show your work

We encourage you to continue developing on this repo and share your work with our community members. To notify us about your work, make sure you use this repo as a template.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages