Skip to content

A bond-based peridynamics code written in pure Python

License

Notifications You must be signed in to change notification settings

mark-hobbs/pypd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pypd

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.

Features:

  • 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

Usage

Explore examples using pypd in Google Colab

Example description Notebook
Crack branching in Homalite Open In Colab
Half-notched quasi-brittle beam in three-point bending Open In Colab
Plate with a hole under tension Open In Colab

Getting started

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

Dependencies

  • NumPy
  • Numba
  • scikit-learn
  • Matplotlib
  • tqdm

Development dependencies

  • Black
  • Ruff
  • Jupyter

Code structure

Examples

Expand for a summary of the examples provided

There are multiple examples provided:

Crack branching

python -m examples.2D_notch.py

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.

Flexural three-point bending test - half-notched beam

python -m examples.2D_B4_HN.py

✅ TODO

  • 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)

Releases

No releases published

Packages

No packages published

Languages