Skip to content

FPChaim/peridynamics

Repository files navigation

peridynamics

Python code for solving some 2D peridynamic problems based on Tulio Patriota's PDLAB. It was done for my mechanical engineergin college's degree and it's not complete and probably contains a few bugs here and there.

Mesh displacement Displacement plot

Language License

Requirements

  • Python 3.10 or newer;
  • numpy;
  • scipy;
  • matplotlib.

Instalation

  • Clone this repository with any git tool, such as GitHub Desktop;

  • Make sure the peridynamics folder is in your IDE search path or in the same folder as your current working directory;

  • Test it by importing the peridynamics module by typing:

      import peridynamics as pd
    
  • If there are no errors, the instalation should be complete.

Usage

One can follow the following diagram when using the code. For a more in-depth explanation, please see examples in the folder notebooks.

Diagram

Libraries

Consist of importing the peridynamics library and any other needed library such as numpy and matplotlib.

Material constants and peridynamics parameters

It's needed to specify the material Young's modulus, Poisson's ratio, density and energy release rate. The peridynamics parameters needed are: horizon, mesh ratio and two influence function parameters.

Influence function example: cubic polynomial

Mesh

The mesh is an instantiated object containing the mesh points, plus with conventional attributes and methods, such as plotting. It's possible to create both rectangular and non rectangular meshes.

Rectangular mesh Non rectangular mesh

Family and Partial Area

The peridynamic family is also an instantiated object containing useful information regarding family and partial area. One particular interesting feature is the implementation of vectorized algorithms found in the literature, which can be much faster than standard ones!

Boundary conditions

Here we put a combination of prescribed body forces, displacements or velocities, dependind on the application and the solver used. It's also possible to define the initial crack segment.

Boundary Conditions

Model

It's necessary to choose a peridynamic model used in the calculations considerations.

Solver

It's possible to choose between a quasi-static solver and a dynamic one.

Model specific calculations

Requires no user input, but most of the calculations happens there.

Results

It's possible to generate 2D and 3D graphics with the calculated numbers and also save the resulting images using a convenient function and also save objects using the provided pickle based function (warning: pickle might containg vulnerabilites and it's only recomended to save and open your own files).

  • Displacement;
  • Strain;
  • Energy;
  • Damage index;
  • Track crack.

About

Python code for solving some 2D peridynamic problems

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published