Information

pyoomph is a object-oriented multi-physics finite element framework. It is mainly a custom high level python frontend for the main functionalities (but by far not all) of the powerful C++ library oomph-lib.

For performance reasons, pyoomph uses GiNaC and CLN to automatically generate C code for the equations you have entered in python. It automatically generates C code for symbolically derived Jacobian matrices, parameter derivatives and Hessians. These even include the complicated derivatives with respect to the moving mesh coordinates on a symbolical level. The generated code is compiled and linked back to the running python script, either with the TinyC compiler (invoked by tccbox) or, when installed, with a more performant alternative like gcc, LLVM/clang or MSBuild.

Features

  • • Temporal ordinary differential equations •
  • • Spatial boundary value problems •
  • • Spatio-temporal problems •
  • • Moving mesh (ALE) problems •
  • • Automatic mesh reconstruction •
  • • Spatial & temporal adaptivity •
  • • Mixed elements •
  • • Additional fields at interfaces  •
  • • Stability analysis & bifurcation tracking •
  • • Azimuthal stability analysis  •
  • • Linear response to periodic driving •
  • • Fully symbolically derived Jacobian/Hessian •
  • • Automatic non-dimensionalization  •
  • • Continuous and Discontinuous Galerkin Methods •
  • • Multi-Domain and Multi-Physics •
  • • Coordinate-system-agnostic formulation of equations •
  • • Constraints via Lagrange multipliers •
  • • Free surface dynamics with Marangoni flow •
  • • Multi-component flow with mass transfer •
  • • Vapor-liquid equilibria by group contribution models •
  • • Surfactants with versatile isotherms •
  • • Contact line dynamics •

How it works

Formulating custom equations, meshes, problems and materials properties is directly done in Python. Subsequently, once the problem is assembled, the monolithic Jacobian matrix is symbolically derived. To speed up the assembly process, C code is automatically generated, compiled and loaded. Thereby, pyoomph is on par with hand-written implementations in a compiled programming language.

[From our paper Christian Diddens and Duarte Rocha, Bifurcation tracking on moving meshes and with consideration of azimuthal symmetry breaking instabilities, J. Comput. Phys. 518, 113306, (2024).]

This approach allows for rapid development of complicated multi-physics and multi-domain problems, including physical dimensions (units) and realistic material properties, varying e.g. with the temperature or the composition.