FREYA (Finite element based Radically ElementarY Applied mathematics library) is a Python library for numerical solution of partial differential equations (PDEs) by the finite element method (FEM), in one and two space dimensions, with C0 or C1 continuity across element interfaces. Given an element type, it discretizes weak forms automatically. more…

The focus is on simplicity, and ease of use from the viewpoint of the programmer using the library. FREYA includes some features of a domain-specific language, enabling the user to write the equations directly in their weak form. The software then automatically discretizes the equations, numbers the unknowns, and builds and solves the discrete equations.

In two dimensions, quadrangular elements are used; the reference element is built as a cartesian product of two 1D elements of the same type.

FREYA is a work in progress; currently, only topologically cartesian meshes (“meshgrid” in common software terminology) are supported in 2D. However, the geometry can be arbitrarily distorted via the coordinate mapping, as long as the quads stay convex.

P0 and Q0 cannot support derivatives, and are only provided for special cases such as some discretizations of the pressure term in Navier-Stokes.

FREYA is designed to handle up to 4th order problems (in terms of spatial derivatives of the corresponding strong form); the beam/BFS elements provide the required C1 continuity over the element seams.

MPI support is available. MPI can be utilized for parallel processing of the matrix assembly, half-integrand term generation (basis or test parts of integrands), and evaluation of known fields.

The aim of the project is to make a suite of solvers for a variety of equations (depending on the needs of the FSI team at JYU), hence the name.