A simple and performant Python implementation of the bond-based peridynamic model. pypd
offers an intuitive class structure with fully interchangeable material models and integration schemes.
- Pure Python: Written entirely in Python, leveraging the power of Numba for optimal performance
- Material Models: Seamlessly switch between various material models including linear, trilinear, and nonlinear
- Integration schemes: Fully interchangeable integration schemes
- Examples: Several examples are provided and validated using published experimental data
Explore examples using pypd
in Google Colab
Example description | Notebook |
---|---|
Crack branching in Homalite | |
Half-notched quasi-brittle beam in three-point bending | |
Plate with a hole under tension |
Development version from GitHub:
$ pip install git+https://github.com/mark-hobbs/pypd.git
or for contributors using Pipenv:
$ git clone https://github.com/mark-hobbs/pypd.git
$ cd pypd/
$ pipenv install --dev
$ pipenv shell
- NumPy
- Numba
- scikit-learn
- Matplotlib
- tqdm
Development dependencies
- Black
- Ruff
- Jupyter
Expand for a summary of the examples provided
There are multiple examples provided:
- Crack branching in notched Homalite sheets
- Plate with a hole in tension
- Three-point bending test of a half-notched concrete beam
- Nuclear graphite ring compression test
- Mixed-mode fracture in concrete
python -m examples.2D_notch.py
Example with validation using experimental data.
García-Álvarez, V. O., Gettu, R., and Carol, I. (2012). Analysis of mixed-mode fracture in concrete using interface elements and a cohesive crack model. Sadhana, 37(1):187–205.
python -m examples.2D_B4_HN.py
- Write unit tests
- Write documentation
- Publish on PyPI
-
feature/space-filling-curve
- sort particles spatially to improve memory access (see this notebook on understanding the Hilbert curve) -
feature/animation
- add native capabilities to generate animations - GPU acceleration (see this notebook where
pytorch
is used to speed up particle simulations) - Implement a volume correction scheme to improve spatial integration accuracy
- Implement a surface correction scheme to correct the peridynamic surface effect
- Implement different influence functions (constant/triangular/quartic)
- Separate model and simulation logic:
simulation.run(model)