Skip to content

mark-hobbs/pypd

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

Usage with uv

Build and install pypd:

uv pip install -e .

Run examples:

uv run -m examples.crack_branching

Dependencies

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

Development dependencies

  • Black
  • Ruff
  • Jupyter

Examples

Expand for a summary of the examples provided

Crack branching

python -m examples.crack_branching

Mixed-mode fracture

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.

Flexural three-point bending test - half-notched beam

python -m examples.half_notched_beam

Minimal example

✅ TODO

Completed tasks

  • 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)
  • GPU acceleration using numba cuda

About

A bond-based peridynamics code written in pure Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages