Skip to main content

A Taichi-powered high-performance numerical simulator for multiscale geophysical problems

Project description

GeoTaichi

Github License Github stars Github forks PRs Welcome

Quick start | Examples | Paper | Citation | Contact

Brief description

A Taichi-based numerical package for high-performance simulations of multiscale and multiphysics geophysical problems. Developed by Multiscale Geomechanics Lab, Zhejiang University.

Overview

GeoTaichi is a collection of several numerical tools, currently including Discrete Element Method (DEM), Material Point Method (MPM), Material Point-Discrete element method (MPDEM), and Finite Element Method (FEM), that cover the analysis of the Soil-Gravel-Structure-Interaction in geotechnical engineering. The main components of GeoTaichi is illustrated as follows:

GeoTaichi is a research project that is currently under development. Our vision is to share with the geotechnical community a free, open-source (under the GPL-3.0 License) software that facilitates the relevant computational research. In the Taichi ecosystem, we hope to emphasize the potential of Taichi for scientific computing. Furthermore, GeoTaichi is high parallelized, multi-platform (supporting for Windows, Linux and Macs) and multi-architecture (supporting for both CPU and GPU).

Examples

Have a cool example? Submit a PR!

Material point method (MPM)

Column collapse Dam break Strip footing
Column collapse Dam break Strip footing

Discrete element method (DEM)

Granular packing Heap formation Triaxial shear test
Granular packing Heap formation Triaxial shear test

Debris Flow

The performance of GeoTaichi is compared with similar simulator in the field, such as MUSEN and CoSim, showing a notable improvement in both computational efficiency and memory usage.

Coupled material point-discrete element method (MPDEM)

A sphere impacting granular bed Granular column impacting cubic particles
A sphere impacting granular bed Granular column impacting cubic particles

Quick start

Dependencies

  • Python packages
Package name Version Features
python >=3.8 Programming language
psutil lastest Get GPU memory
taichi ==1.6.0 High performance computing
numpy ==1.23.5 Pre-processing
scipy ==1.10.1 Pre-processing
pybind11 ==2.10.4 Warp C++ code
trimesh ==3.20.1 Import stl/obj files
shapely ==1.8.0 Delaunay triangulation

Installation

Install from source code (recommand)

  1. Change the current working directory to the desired location and download the GeoTaichi code:
cd /path/to/desired/location/
git clone https://github.com/Yihao-Shi/GeoTaichi
cd GeoTaichi
  1. Install essential dependencies
# Install python and pip
sudo apt-get install python3.8
sudo apt-get install python3-pip

# Install python packages (recommand to add package version)
python3 -m pip install taichi==1.6.0 imageio pybind11 numpy trimesh psutil shapely 

# Install Eigen in C++ (if necessary)
sudo apt-get install libeigen3-dev cmake==3.18.2

# Install pybind11 (if necessary)
git clone https://github.com/pybind/pybind11.git
cd  pybind11
mkdir build
cd build
cmake ..
make check -j 4 
sudo make install
  1. Install CUDA, detailed information can be referred to official installation guide
  2. Set up environment variables
sudo gedit ~/.bashrc
$ export PYTHONPATH="$PYTHONPATH:/path/to/desired/location/GeoTaichi"
source ~/.bashrc

Install from pip (easy)

pip install geotaichi

Working with vtu files

To visualize the VTS files produced by some of the scripts, it is recommended to use Paraview. It can be freely downloaded from: http://www.paraview.org/ To visualize the output in ParaView, use the following procedure:

  1. Open the .vts or .vtu file in ParaView
  2. Click on the "Apply" button on the left side of the screen
  3. Make sure under "Representation" that "Surface" or "Surface with Edges" is selected
  4. Under "Coloring" select variables and the approriate measure (i.e. "Magnitude", X-direction displacement, etc.)

Document

Currently, only the tutorial of DEM in Chinese version is available in doc. Users can set up simulations by specifying numerical parameters and configuring the desired simulation settings in a Python script. More detailed about Python scripts can be found in the example floder.

Features

Discrete Element Method

Discrete element method is a powerful tool to simulate the movement of granular materials through a series of calculations that trace individual particles constituting the granular material.

  • Sphere and multisphere particles
  • Generating particle packings by specifying initial void ratio or particle number in a box/cylinder/sphere/triangular prism
  • Two neighbor search algorithms, brust search/linked-cell
  • Two velocity updating schemes, symlectic Euler/velocity Verlet
  • Three contact models, including linear elastic, hertz-mindlin and linear rolling
  • Supporting plane (infinite plane)/facet (servo wall)/triangle patch (suitable for complex boundary condition)

Material Point Method

The material point method (MPM) is a numerical technique used to simulate the behavior of solids, liquids, gases, and any other continuum material. Unlike other mesh-based methods like the finite element method, MPM does not encounter the drawbacks of mesh-based methods (high deformation tangling, advection errors etc.) which makes it a promising and powerful tool in computational mechanics.

  • Nine Constitutive Models, including linear elastic/neo-hookean/Von-Mises/isotropic hardening plastic/Mohr-Coulomb/Drucker-Prager/(cohesive) modified cam-clay/Newtonian fluid/Bingham fluid
  • Two improved velocity projection techniques, including MLS/APIC
  • Three stress update schemes, including USF/USL/MUSL/APIC
  • Three stabilization techniques, including mix integration/B-bar method/F-bar method
  • Two smoothing mehod, including strain/stress smoothing
  • Supporting Dirichlet (Fix/Reflect/Friction)/Neumann boundary conditions
  • Supporting total/updating Lagrangian explicit MPM and implicit MPM (Newmark-$\beta$ method)
  • Free surface detection

MPDEM coupling

  • Two contact models, including linear elastic, hertz-mindlin
  • Support DEM-MPM-Mesh contact, feasible simulating complex boundary conditions
  • Multilevel neighbor search
  • Two way or one way coupling

Postprocessing

  • Restart from a specific time step
  • A simple GUI powered by Taichi
  • VTU(Paraview) and NPZ(binary files) files are generated in the process of simualtion
  • Supporting force chain visualization

Under development

  • Developing level set DEM modules
  • Developing a well-structured IGA modules
  • Optimizing code structures
  • Simulating soil-gravel-structure problems in geotechnical engineering

License

This project is licensed under the GNU General Public License v3 - see the LICENSE for details.

Citation

Please kindly star :star: this project if it helps you. We take great efforts to develope and maintain it :grin::grin:.

If you publish work that makes use of GeoTaichi, we would appreciate if you would cite the following reference:

@article{shi2024geotai,
  author    = {Y. H. Shi, N. Guo., Z. X. Yang},
  title     = {GeoTaichi: a Taichi-powered high-performance numerical simulator for multiscale geophysical problems},
  year      = {2024},
  journal   = {Computer Physics Communications},
  pages     = {109219},
  publisher = {Elsevier},
  doi       = {https://doi.org/10.1016/j.cpc.2024.109219}
}

Acknowledgements

We thank all amazing contributors for their great work and open source spirit. We welcome all kinds of contributions to file an issue at GitHub Issues.

Contributors

Contact us

  • If you spot any issue or need any help, please mail directly to shiyh@zju.edu.cn.

Release Notes

V0.2.2 (July 22, 2024)

  • Fix computing the intersection area between circles and triangles
  • Add "Destory" and "Reflect" boundaries in DEM modules, see examples

V0.2 (July 1, 2024)

  • Fix some bugs in DEM and MPM modules, see details
  • Add some advanced constitutive model

V0.1 (January 21, 2024)

  • First release GeoTaichi

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geotaichi-0.2.6.tar.gz (439.5 kB view details)

Uploaded Source

Built Distribution

geotaichi-0.2.6-py3-none-any.whl (561.6 kB view details)

Uploaded Python 3

File details

Details for the file geotaichi-0.2.6.tar.gz.

File metadata

  • Download URL: geotaichi-0.2.6.tar.gz
  • Upload date:
  • Size: 439.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for geotaichi-0.2.6.tar.gz
Algorithm Hash digest
SHA256 c32dbc3d1b2acdc5e140e32e4734ad57d7cda284332e2f72b370b0d429dd7925
MD5 338ede1a73f7e896f2327050ab7bd8bd
BLAKE2b-256 33711e47e1888122c8069d2c8a44e7547d354faaeda16cbc01de999f7e25433a

See more details on using hashes here.

File details

Details for the file geotaichi-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: geotaichi-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 561.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for geotaichi-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 da78bc21bcf87ddae72c66a72a9ee4ad2c09446fdaec4604cd2738ca45261dbf
MD5 a811ebeb573a6c07be5cc2cb4a6320e1
BLAKE2b-256 0df4d1bf2b711ff1ed24c2ae1675dc46b61f01e3a778b331f5896a79b3ebc1c6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page