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 pdoc3And 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.pyIn this case the particles are distributed in some elements.
Run this example as:
python mesh_elements_without_particles_test.pyThe 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.pyLinear 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.pypython mpm-single-mass-bar-vibration_parametric_density.pyIn 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.pyIn 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.pypython mpm_wave_in_pile_parametric_young.pyThe 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.1python mpm-continuum-bar-vibration_damping.py








