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:
main/
stores the python scripts divided in
solids_ISO.py
(the main program),preprocesor.py
(model 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.msh
format corresponding to different examples. -
template/
contains a simple Gmsh mesh and a python script to generate the model ready for solids_ISO.
- 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 use it clone the repo with
git clone https://github.com/jgomezc1/FEM_PYTHON.git
uncompress the zip folder an run the main file in the Python console of your preference.
If you want 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
After downloading 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 solids_ISO.py
This 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.