SkillAgentSearch skills...

Pypd

A bond-based peridynamics code written in pure Python

Install / Use

/learn @mark-hobbs/Pypd
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

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 | <a href="https://colab.research.google.com/github/mark-hobbs/pypd/blob/main/examples/crack_branching.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | | Half-notched quasi-brittle beam in three-point bending | <a href="https://colab.research.google.com/github/mark-hobbs/pypd/blob/main/examples/half_notched_beam.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> | | Plate with a hole under tension | <a href="https://colab.research.google.com/github/mark-hobbs/pypd/blob/main/examples/plate_with_hole.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> |

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

<details> <summary>Expand for a summary of the examples provided</summary>

Crack branching

python -m examples.crack_branching

Mixed-mode fracture

python -m examples.mixed_mode_fracture

Example with validation using experimental data.

<span style="font-family: 'Courier New', monospace;"> 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.</span>

Flexural three-point bending test - half-notched beam

python -m examples.half_notched_beam

</details>

Minimal example

:white_check_mark: TODO

Completed tasks

  • [x] feature/animation - add native capabilities to generate animations
  • [x] Implement a surface correction scheme to correct the peridynamic surface effect
  • [x] Implement different influence functions (constant/triangular/quartic)
  • [x] Separate model and simulation logic: simulation.run(model)
  • [x] GPU acceleration using numba cuda

Related Skills

View on GitHub
GitHub Stars24
CategoryDevelopment
Updated13d ago
Forks4

Languages

Python

Security Score

95/100

Audited on Mar 19, 2026

No findings