SimPyFEM is a simple finite element Python 3 code built for educational purposes. This is a direct translation from the Fortran 90 version of simpleFEM by Cedric Thielot. It showcases functional illustrations of the various features of a FEM code: the mesh and its connectivity, the shape functions and their derivatives, the numerical integration, the assembly phase, imposing the boundary conditions, and the system solve.
- Put adaptations of original simPyFEM into separate branches
- PEP-8 compliance across all branches
- Add branch: restructure repetitive code blocks into functions
To run simPyFEM, copy the one or all of the files to your local machine.
Python 3.x
A step by step series of examples that tell you have to get a development env running
Change directory to the location you downloaded the file(s) in, for example:
cd Users/<Your name>/Documents/simPyFEM/
To run one of the programs:
python simPyFEM.py
You will see some output in the terminal describing the actions that are in progress, for example:
Build F.E. matrix
simPyFEM_K_G_GT has some plotting functionality. Simple close both plots to end the program.
simPyFEM_K_G_GT has the option to test for three different Uzawa outer solve methods. To choose one, simple (un)comment the one you desire with a '#' symbol
Convergence of the three different uzawa methods is as follows:
- Job Mos - Translation from Fortran 90 to Python 3
- Cedric Thieulot - Provided the original Fortran 90 Code - SimpleFEM