|
| 1 | +# GeoTaichi |
| 2 | + |
| 3 | +    |
| 4 | + |
| 5 | +## Breif description |
| 6 | + |
| 7 | +A [Taichi](https://github.com/taichi-dev/taichi)-based numerical package for high-performance simulations of multiscale and multiphysics geophysical problems. |
| 8 | +Developed by [Multiscale Geomechanics Lab](https://person.zju.edu.cn/en/nguo), Zhejiang University. |
| 9 | + |
| 10 | +## Overview |
| 11 | + |
| 12 | +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: |
| 13 | +<p align="center"> |
| 14 | + <img src="https://github.com/Yihao-Shi/GeoTaichi/blob/main/images/main_component.png" width="50%" height="50%" /> |
| 15 | +</p> |
| 16 | + |
| 17 | +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). |
| 18 | + |
| 19 | +## Examples |
| 20 | +### Material point method (MPM) |
| 21 | +- Soil and fluid dynamics |
| 22 | +<p align="center"> |
| 23 | + <img src="https://github.com/Yihao-Shi/GeoTaichi/blob/main/images/soil.gif" width="50%" height="50%" /><img src="https://github.com/Yihao-Shi/GeoTaichi/blob/main/images/newtonian.gif" width="50%" height="50%" /> |
| 24 | +</p> |
| 25 | + |
| 26 | +- Strip footing penetration |
| 27 | +<p align="center"> |
| 28 | + <img src="https://github.com/Yihao-Shi/GeoTaichi/blob/main/images/footing.gif" width="50%" height="50%" /> |
| 29 | +</p> |
| 30 | + |
| 31 | +### Discrete element method (DEM) |
| 32 | +- Granular packings (more than 1.6 milloin particles) |
| 33 | +<p align="center"> |
| 34 | + <img src="https://github.com/Yihao-Shi/GeoTaichi/blob/main/images/clump.gif" width="50%" height="50%" /><img src="https://github.com/Yihao-Shi/GeoTaichi/blob/main/images/heap_formation.gif" width="50%" height="50%" /> |
| 35 | +</p> |
| 36 | + |
| 37 | +- Triaxial shear test |
| 38 | +<p align="center"> |
| 39 | + <img src="https://github.com/Yihao-Shi/GeoTaichi/blob/main/images/shear.gif" width="50%" height="50%" /><img src="https://github.com/Yihao-Shi/GeoTaichi/blob/main/images/force_chain.gif" width="50%" height="50%" /> |
| 40 | +</p> |
| 41 | + |
| 42 | +### Coupled material point-discrete element method (MPDEM) |
| 43 | +<p align="center"> |
| 44 | + <img src="https://github.com/Yihao-Shi/GeoTaichi/blob/main/images/mpdem1.gif" width="50%" height="50%" /><img src="https://github.com/Yihao-Shi/GeoTaichi/blob/main/images/mpdem2.gif" width="50%" height="50%" /> |
| 45 | +</p> |
| 46 | + |
| 47 | +## Quick start |
| 48 | +### Dependencies |
| 49 | + |
| 50 | +- Python packages |
| 51 | + |
| 52 | +|Package name|Version|Features| |
| 53 | +|:----------:|:-----:|:------:| |
| 54 | +|[python](https://www.python.org/)|>=3.8|Programming language| |
| 55 | +|[psutil](https://pypi.org/project/psutil/)|lastest|Get GPU memory| |
| 56 | +|[taichi](https://pypi.org/project/taichi/)|>=1.6.0|High performance computing| |
| 57 | +|[numpy](https://pypi.org/project/numpy/)|==1.23.5|Pre-processing| |
| 58 | +|[scipy](https://pypi.org/project/SciPy/)|==1.10.1|Pre-processing| |
| 59 | +|[pybind11](https://pypi.org/project/pybind11/)|==2.10.4|Warp C++ code| |
| 60 | +|[trimesh](https://pypi.org/project/trimesh/)|==3.20.1|Import stl/obj files| |
| 61 | + |
| 62 | +- C++ packages |
| 63 | + |
| 64 | +|Package name|Version|Features| |
| 65 | +|:----------:|:-----:|:------:| |
| 66 | +|[cmake](https://cmake.org/)|==3.18.2|/| |
| 67 | +|[eigen](https://eigen.tuxfamily.org/)|==3.4.0|Nurbs function| |
| 68 | + |
| 69 | +### Installation |
| 70 | + |
| 71 | +1. Change the current working directory to the desired location and download the GeoTaichi code: |
| 72 | +``` |
| 73 | +cd /path/to/desired/location/ |
| 74 | +git clone https://github.com/Yihao-Shi/GeoTaichi |
| 75 | +cd GeoTaichi |
| 76 | +``` |
| 77 | +2. Install essential dependencies |
| 78 | +``` |
| 79 | +# Install python and pip |
| 80 | +sudo apt-get install python3.8 |
| 81 | +sudo apt-get install python3-pip |
| 82 | +
|
| 83 | +# Install python packages |
| 84 | +python3 -m pip install taichi imageio pybind11 numpy trimesh psutil -i https://pypi.douban.com/simple |
| 85 | +
|
| 86 | +# Install Eigen in C++ |
| 87 | +sudo apt-get install libeigen3-dev cmake==3.18.2 |
| 88 | +
|
| 89 | +# Install pybind11 |
| 90 | +git clone https://github.com/pybind/pybind11.git |
| 91 | +cd pybind11 |
| 92 | +mkdir build |
| 93 | +cd build |
| 94 | +cmake .. |
| 95 | +make check -j 4 |
| 96 | +sudo make install |
| 97 | +``` |
| 98 | +3. Install CUDA, detailed information can be referred to [official installation guide](https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html) |
| 99 | +4. Set up environment variables |
| 100 | +``` |
| 101 | +sudo gedit ~/.bashrc |
| 102 | +$ export PYTHONPATH="$PYTHONPATH:/path/to/desired/location/GeoTaichi" |
| 103 | +source ~/.bashrc |
| 104 | +``` |
| 105 | +5. If you want to use IGA (Isogeometric analysis) modulus. Note that some of programs are written in C++, which need to be compiled for your architecture: |
| 106 | +``` |
| 107 | +python src/utils/NURBS/setup.py install --user |
| 108 | +``` |
| 109 | + |
| 110 | +### Working with vtu files |
| 111 | + |
| 112 | +To visualize the VTS files produced by some of the scripts, it is recommended to use Paraview. It can be |
| 113 | +freely downloaded from: http://www.paraview.org/ To visualize the output in ParaView, use the following |
| 114 | +procedure: |
| 115 | +1. Open the .vts or .vtu file in ParaView |
| 116 | +2. Click on the "Apply" button on the left side of the screen |
| 117 | +3. Make sure under "Representation" that "Surface" or "Surface with Edges" is selected |
| 118 | +4. Under "Coloring" select variables and the approriate measure (i.e. "Magnitude", X-direction displacement, etc.) |
| 119 | + |
| 120 | +### Document |
| 121 | + |
| 122 | +Currently, only the tutorial of DEM in Chinese version is available in [doc](https://github.com/Yihao-Shi/GeoTaichi/blob/main/docs/GeoTaichi_tutorial_DEM_Chinese_version.pdf). |
| 123 | +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](https://github.com/Yihao-Shi/GeoTaichi/tree/main/example). |
| 124 | + |
| 125 | +## Features |
| 126 | +### Discrete Element Method |
| 127 | +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. |
| 128 | + - Sphere and multisphere particles |
| 129 | + - Generating particle packings by specifying initial void ratio or particle number in a box/cylinder/sphere/triangular prism |
| 130 | + - Two neighbor search algorithms, brust search/linked-cell |
| 131 | + - Two velocity updating schemes, symlectic Euler/velocity Verlet |
| 132 | + - Three contact models, including linear elastic, hertz-mindlin and linear rolling |
| 133 | + - Supporting plane (infinite plane)/facet (servo wall)/triangle patch (suitable for complex boundary condition) |
| 134 | + |
| 135 | +### Material Point Method |
| 136 | +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. |
| 137 | + - 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 |
| 138 | + - Two improved velocity projection techniques, including MLS/APIC |
| 139 | + - Three stress update schemes, including USF/USL/MUSL/APIC |
| 140 | + - Three stabilization techniques, including mix integration/B-bar method/F-bar method |
| 141 | + - Two smoothing mehod, including strain/stress smoothing |
| 142 | + - Supporting Dirichlet (Fix/Reflect/Friction)/Neumann boundary conditions |
| 143 | + - Supporting total/updating Lagrangian explicit MPM and implicit MPM (Newmark-$\beta$ method) |
| 144 | + - Free surface detection |
| 145 | + |
| 146 | +### MPDEM coupling |
| 147 | + - Two contact models, including linear elastic, hertz-mindlin |
| 148 | + - Support DEM-MPM-Mesh contact, feasible simulating complex boundary conditions |
| 149 | + - Multilevel neighbor search |
| 150 | + - Two way or one way coupling |
| 151 | + |
| 152 | +### Postprocessing |
| 153 | + - Restart from a specific time step |
| 154 | + - A simple GUI powered by [Taichi](https://github.com/taichi-dev/taichi) |
| 155 | + - VTU([Paraview](http://www.paraview.org/)) and NPZ(binary files) files are generated in the process of simualtion |
| 156 | + - Supporting force chain visualization |
| 157 | + |
| 158 | +## Under development |
| 159 | + - Developing level set DEM modulus |
| 160 | + - Developing a well-structured IGA modulus |
| 161 | + - Optimizing code structures |
| 162 | + - Simulating soil-gravel-structure problems in geotechnical engineering |
| 163 | + |
| 164 | +## License |
| 165 | +This project is licensed under the GNU General Public License v3 - see the [LICENSE](https://www.gnu.org/licenses/) for details. |
| 166 | + |
| 167 | +## Citation |
| 168 | +If you find GeoTaichi is helpful, you can [star it](https://github.com/Yihao-Shi/GeoTaichi). |
| 169 | + |
| 170 | +## Acknowledgements |
| 171 | +This is the release version of GeoTaichi, if you need more features such as implicit material point/level set DEM, please contact authors. |
| 172 | +We thank all contributors for their great work and open source spirit. |
| 173 | + |
| 174 | +## Release Notes |
| 175 | +V0.1 (January 21, 2024) |
| 176 | + |
| 177 | +- First release GeoTaichi |
0 commit comments