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 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; and -
MESHUTILS/
stores programs to conduct pre-processing and post-processing from and to GMESH. Since the code has been created for academic purposes it gives as main results the displacement vector corresponding to the nodal points of the domain. These vectors are used, together with the Python function griddata to interpolate and plot the displacement solution all over the domain. Post-processing to compute strain and stress values is left for students projects.
- Juan David Gómez Cataño, Professor at Universidad EAFIT.
- Juan Carlos Vergara, PhD Student at Universidad EAFIT.
- Nicolás Guarín-Zapata, PhD Student at Purdue University.
The code is written in Python 2 dialect (we believe that it will work in Python 3 but we have not tested yet) 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
To run the files in MESHUTILS
you will need to have gfortran
and run the following make
instructions
make --file="CONTOUR Makefile"
make --file="MESHER Makefile"
This project is licensed under the MIT license.