Skip to content

A finite element framework in Python, based on oomph-lib and GiNaC

License

Notifications You must be signed in to change notification settings

duarterocha/pyoomph

 
 

Repository files navigation

Description

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.

If you want to use the full flexibility of oomph-lib, you are probably better suited using oomph-lib directly. If your want to use python to solve equations on a single static mesh, you might want to check out FEniCS instead. Also, have a look at NGSolve or nutils which have similar and complementary features. If you are looking for a python framework for multi-physics problems formulated on (potentially multiple) moving meshes, including the possibility of (azimuthal) bifurcation tracking, pyoomph might be the right choice for you.

pyoomph is still in an early stage of development: While most features work nicely, it is neither feature-complete, nor free of bugs.

Installation

Please consult the file INSTALL.md in the git repository for installation instructions. Alternatively, follow the instructions in our tutorial.

Documentation and Examples

Documentation of the API and tons of examples can be found at pyoomph.readthedocs.io. A PDF version of the tutorial is also available.

Some more examples can be found in our repository pyoomph_examples.

License

pyoomph itself is distributed as combined work under the GPL v3 license. However, mind the third-party licences stated below, in particular when distributing derived work or redistributing pyoomph. The full license file can be found in COPYING.

Third-Party-Licenses

The distribution of pyoomph contains code taken from other authors/projects:

The third-party licenses/acknowledgement files can be found in src/thirdparty. In the provided python wheels, these requirements are statically included.

During compilation, pyoomph includes/links against or makes use of the following libraries:

Beyond that, pyoomph makes use of the following libraries at runtime. During installation with pip, many (but not all) of these libraries are automatically fetched as requirements.

Be aware that some of these libraries can have further dependencies.

Authors and acknowledgements

pyoomph was founded in 2021 by Christian Diddens. Later, Duarte Rocha joined the team.

The authors gratefully acknowledge financial support by the Industrial Partnership Programme Fundamental Fluid Dynamics Challenges in Inkjet Printing of the Netherlands Organisation for Scientific Research (NWO) & High Tech Systems and Materials (HTSM), co-financed by Canon Production Printing Netherlands B.V., IamFluidics B.V., TNO Holst Centre, University of Twente, Eindhoven University of Technology and Utrecht University.

Contributing

If you want to contribute by e.g. adding new equations, meshes, problems, materials or additional features, get in contact with us or send us a pull request. If you encounter a bug, please also let us know at [email protected] or [email protected].

How to cite

At the moment, just cite the following paper for pyoomph:

Christian Diddens and Duarte Rocha, Bifurcation tracking on moving meshes and with consideration of azimuthal symmetry breaking instabilities, J. Comput. Phys. 518, 113306, (2024), doi:10.1016/j.jcp.2024.113306.

Please mention that pyoomph is based on oomph-lib and GiNaC, i.e. also cite at least:

oomph-lib: M. Heil, A. L. Hazel, oomph-lib - An Object-oriented multi-physics finite-element library, Lect. Notes Comput. Sci. Eng. 53, 19-49, (2006), doi:10.1007/3-540-34596-5_2.

GiNaC: C. Bauer, A. Frink, R. Kreckel, Introduction to the GiNaC framework for symbolic computation within the C++ programming language, J. Symb. Comput. 33(1), 1-12, (2002), doi:10.1006/jsco.2001.0494.

Citing of material properties and activity models

About

A finite element framework in Python, based on oomph-lib and GiNaC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 53.1%
  • C++ 46.1%
  • Other 0.8%