Link Search Menu Expand Document

Fempy - finite element method in python

Fempy is an open-source, pure-python and cross-platform package for solving systems of partial differential equations using finite element method. It provides tools for dealing with discretized domains, fields defined on these domains, weak forms and linear, non-linear and time dependent solvers. Models can be created, solved and analysed without leaving the Python console, while still having access to graphical preview.

Minimal example

from fempy.geometry import Rectangle
from fempy.models.elastic import PlaneStrain

g = Rectangle(a=2., b=3., elsize=0.1)
d = g.domain(order=2)
m = PlaneStrain(d)
m.ev(200, 0.3)
m.bcs['bottom'] = True
m.p['top'] = -20.
m.solve()
m.preview('all')

Preview