This repo contains a simple finite element analysis code for 2D elasticity problems. The code uses as input data simple-to-create text files containing nodal, element, material and load data.
The repo contains 3 main folders:
-
solidspy/stores the package routines:solids_GUI.py: run the program;preprocesor.pymodel input subroutines);assemutil.py(assembly subroutines);femutil.py(general finite element method subroutines);uelutil.py(local matrix subroutines for different elements; andpostprocesor.py(results handling subroutines)
-
meshes/contains input files and meshes in.mshformat corresponding to different examples. -
docs/contains the documentation files. -
examples/contains some examples of the use of the package. -
tests/contains unit testing.
- Juan David Gómez Cataño, Professor at Universidad EAFIT.
- Nicolás Guarín-Zapata, PhD Student at Purdue University.
The code is written in Python and it depends on numpy, scipy and sympy.
To run the examples with GUI input you will need to install
easygui. And, you will
need meshio to automatically read
Gmsh mesh files. These two can be installed with
pip install easygui
pip install meshio
To install SolidsPy use
pip install solidspy
After installation, you can run an analysis in 3 easy steps (see template):
- Create the mesh using Gmsh.
- Generate the model files (eles.txt, nodes.txt, mater.txt and loads.txt) using
a python script with the aid of
meshio. - Run it in Python
import matplotlib.pyplot as plt # load matplotlib
from solidspy import solids_GUI # import our package
solids_GUI() # run the Finite Element Analysis
plt.show() # plot contoursThis project is licensed under the MIT license. The documents are licensed under Creative Commons Attribution License.
Since this project is used to teach Finite Element Methods and Computational Mechanics, we have included some examples and documents and code snippets developed by students. Their license is specified in each particular directory.
