Skip to content

MPM-Py: A program for learning the Material Point Method using Python

License

Notifications You must be signed in to change notification settings

fabricix/MPM-Py

Repository files navigation

MPM-Py

A Material Point Method implementation using Python: MPM-Py. This program uses objected-oriented programming paradigm to represent and modeling the elements and its interaction in the material point method context.

Installation

git clone https://github.com/fabricix/MPM-Py.git

Documentation

To create the documentation, install pdoc:

pip3 install pdoc3

And then run

pdoc --html -c latex_math=True modules/

To read the documentation, open the file /html/modules/index.html using a web browser.

Requirements

  • Python 3.7.4 or superior

  • Matplotlib 3.3.4 or superior

Running tests and examples

In the folders verification_problems and tests there are examples showing and testing the functionalities of the program.

Mesh test

The file tests/mesh-test.py tests the mesh generations module by plotting the mesh and showing the number of elements, nodes and material points.

Run this example as:

python mesh-test.py

Alt text

Interpolation function test

The file tests/interpolation_functions_test.py shows the interpolation functions and its derivates over an one 1D element.

Run this example as:

python interpolation-functions-test.py

Alt text

Single mass vibration problem

In this verification problem a single mass vibration is analyzed numerically and then the numerical solution is compared with the analytical one.

Run this example as:

python mpm-single-mass-bar-vibration.py

Alt text

Continuum bar vibration problem

In this verification problem a continuum bar vibration is analyzed numerically and then the numerical solution is compared with the analytical one.

Run this example as:

python mpm-continuum-bar-vibration.py

Alt text