Skip to content

Simple Finite Element code curtesy of Cedric Thieulot. Modified from F90 to Python.

Notifications You must be signed in to change notification settings

jobmos/simPyFEM

Repository files navigation

SimPyFEM

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.

To do

  • Put adaptations of original simPyFEM into separate branches
  • PEP-8 compliance across all branches
  • Add branch: restructure repetitive code blocks into functions

Getting Started

To run simPyFEM, copy the one or all of the files to your local machine.

Prerequisites

Python 3.x

Installing/Running

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.

Uzawa methods

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

Uzawa results

Convergence of the three different uzawa methods is as follows:

alt text

Authors

  • Job Mos - Translation from Fortran 90 to Python 3
  • Cedric Thieulot - Provided the original Fortran 90 Code - SimpleFEM

About

Simple Finite Element code curtesy of Cedric Thieulot. Modified from F90 to Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages