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.gitor for contributors using Pipenv:
$ git clone https://github.com/mark-hobbs/pypd.git
$ cd pypd/
$ pipenv install --dev
$ pipenv shellBuild and install pypd:
uv pip install -e .Run examples:
uv run -m examples.crack_branching- NumPy
- Numba
- scikit-learn
- Matplotlib
- tqdm
Development dependencies
- Black
- Ruff
- Jupyter
Expand for a summary of the 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.crack_branching
python -m examples.mixed_mode_fracture
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.half_notched_beam
- Write unit tests
- Write documentation
- Publish on PyPI
- Add support for different compute backends:
numba-cudajaxwarp
-
feature/space-filling-curve- sort particles spatially to improve memory access (see this notebook on understanding the Hilbert curve) - GPU acceleration (see this notebook where
pytorchis used to speed up particle simulations) - Implement a volume correction scheme to improve spatial integration accuracy
-
feature/animation- add native capabilities to generate animations - 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)



