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.
git clone https://github.com/fabricix/MPM-Py.git
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.
Note that in Windows the module flag -m
must be used to correctly use pdoc
:
python -m pdoc --html -c latex_math=True modules/
-
Python 3.7.4 or superior
-
Matplotlib 3.3.4 or superior
In the folders verification_problems
and tests
there are examples showing and testing the functionalities of the program.
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
In this case the particles are distributed in some elements.
Run this example as:
python mesh_elements_without_particles_test.py
The file tests/interpolation_functions_test.py
shows the interpolation functions and its derivates over an one 1D element.
In test_interpolation_functions
function of the shape
module, set shape_type="linear"
for linear interpolation functions or shape_type="cpGIMP"
for contiguous particle GIMP (generalized interpolation material point).
Run this example as:
python interpolation-functions-test.py
Linear interpolation functions:
cpGIMP interpolation functions:
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
python mpm-single-mass-bar-vibration_parametric_density.py
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
In this verification problem a wave traveling in a pile is analyzed numerically and then the numerical solution is compared with the analytical one.
Run this example as:
python mpm_wave_in_pile.py
python mpm_wave_in_pile_parametric_young.py
The local damping is a nodal force proportional to the unbalanced nodal total force, acting in opposite nodal velocity direction.
The local damping must be setting up using the model_setup
class. For example:
msetup = setup.model_setup()
msetup.damping_local_alpha=0.1
python mpm-continuum-bar-vibration_damping.py