Talk SfePy - Introduction, Examples, and Plans


SfePy (simple finite elements in Python) is a software, distributed under the BSD license, for solving systems of coupled partial differential equations (PDEs) by the finite element method in 2D and 3D. It can be viewed both as black-box PDE solver, and as a Python package which can be used for building custom applications. The word "simple" means that complex FEM problems can be coded very easily and rapidly. The code base is already quite mature but under active development to make it a full featured modern FEM package.

The primary programming language used for SfePy development is Python while the time-demanding parts of the finite element computations are implemented in C, making thus SfePy sufficiently fast and efficient for our purposes. The code is based mainly on NumPy and SciPy packages, making use of their fast array-based functions and numerical algorithms. Certain features rely on SymPy for symbolic computations.

The code is multi-platform - it is known to work on flavors of Linux, Mac OS X and Windows.

One of the key features from a user's point of view is that the definition of a problem is very similar to the weak formulation of the problem one would use on paper. This definition involves the equations, boundary conditions of various kinds (Dirichlet, Neumann, periodic, general linear combinations of degrees of freedom etc.), finite element approximations, and other necessary ingredients. Equations are built using terms, which correspond directly to the integral forms of weak formulation of a problem to be solved. A user writes this definition into a problem description file, which is a regular Python module. In the black-box usage, however, no real programming is involved, only setting several compulsory keywords. Examples are included with the package that illustrate the basic requirements. On the other hand, the whole power of Python and the available packages is at hand for advanced users. The code includes very simple meshing routines as well as functions to post process results and generate output plots. Alternatively, output from SfePy can be pulled into visualization packages such as Mayavi or ParaView.

So far, SfePy has been successfully employed for modelling in materials science, including, for example, multiscale biomechanical modelling (bone, muscle tissue with blood perfusion), computation of acoustic transmission coefficients across an interface of arbitrary microstructure geometry, thermoelastic analysis of car disc brakes, and other.

In the presentation we will give the overview of SfePy capabilities, as well as some non-trivial examples.