pyoomph - a multi-physics finite element framework based on oomph-lib and GiNaC
Project description
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:
- In
src/thirdparty/oomph-lib/include
, you find the necessary main files ofoomph-lib
, (LGPL v2.1 or later license). Minor modifications, as mentioned in src/thirdparty/INFO_oomph-lib, had to be made. Furthermore, code parts of these oomph-lib files had been copied to corresponding derived classes of pyoomph. - A copy of the header-only library
nanoflann
is located insrc/thirdparty/nanoflann.hpp
, (BSD license). - A copy of the header-only library
delaunator-cpp
is located insrc/thirdparty/delaunator.hpp
, (MIT license). - The file src/pyginacstruct.hpp is strongly based on the file structure.h of GiNaC (GPL v2 or later license).
- A copy of the library Project Nayuki/smallest enslosing circle (LGPL v3 license or later) is added (after adding type specifications) to pyoomph/utils/smallest_circle.py.
- When using materials or the thermodynamic activity models AIOMFAC, original UNIFAC or modified UNIFAC (Dortmund), please see below.
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:
GiNaC
(GPL v2 or later license), GiNaC is statically included in the distribution as wheels.CLN
(GPL v2 or later license), CLN is statically included in the distribution as wheels.MPI
, depending on the system e.g.OpenMPI
(3-clause BSD license),MPICH
(MPICH license),Microsoft MPI
(MIT license), the wheels distributions are compiled without MPI support.python3.8 or higher
, (PSF license).pybind11
, (BSD-style license).pybind11-stubgen
, (BSD-style license).pip
, (MIT license).
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.
python core libraries
, (PSF license).numpy
, (BSD license).pygmsh
, (GPL v3 license).gmsh
, (GPL v2 or later license).meshio
, (MIT license).mpi4py
, (BSD 2-Clause "Simplified" license).scipy
, (BSD-3-Clause license).matplotlib
, (PSF-based license).mkl
, (Intel Simplified Software license).petsc
andpetsc4py
, (BSD 2-Clause license).slepc
andslepc4py
, (BSD 2-Clause license).vtk
, (BSD 3-clause license).paraview
, (BSD 3-clause license). Only used for the includedParaview filter for visualizing azimuthal perturbations
.setuptools
(MIT license) is used for installation, wheel generation and to invoke the system's C compilercibuildwheel
, (BSD 2-Clause license) is used to compile the provided wheelspybind11-stubgen
, (BSD 3-Clause license) is used to generate python stubs from the C++ coretccbox
used as wrapper for theTinyC
compiler, (LPGL 2 or later license)
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 c.diddens@utwente.nl or d.rocha@utwente.nl.
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
- pyoomph includes some parameters of the AIOMFAC activity model in pyoomph/materials/UNIFAC/aiomfac.py. These are based on the source code of AIOMFAC (GPL v3 license). Cite the relevant scientific publications when publishing results based on the AIOMFAC activity model.
- Alternatively, you can choose the original UNIFAC model or the modified UNIFAC model (Dortmund). In that case, cite the publications listed under these links if you use these models.
- For more accurate results, it is advised to obtain the updated parameters for the UNIFAC Consortium. Such updated parameter sets can be implemented by hand following the templates for the free parameters in pyoomph/materials/UNIFAC/. The usage of such updated parameters of the UNIFAC Consortium are restricted to the terms of use of the UNIFAC Consortium.
- When using the material properties from pyoomph/materials/default_materials.py, please have a look at the comments in this file to cite the correct papers.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file pyoomph-0.1.3-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: pyoomph-0.1.3-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 198f5444ac505655b99e90ce2dbbf018730a0b544fe7a5b894ddbc41b4e8cb78 |
|
MD5 | 80cfde03b9f12de87a2ed8c1ae6bdd3d |
|
BLAKE2b-256 | 802e7e981adce5aae7f18a591e4a0705ee715e5fe14d8479fa84f8fa0e420f68 |
File details
Details for the file pyoomph-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyoomph-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 5.2 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac49dd27c4e0eb44b745d71b24de8b5f2643e1316ea9d68367bff6b2a30f35e3 |
|
MD5 | b55b5c81dd34bd53455dab00b253063c |
|
BLAKE2b-256 | 4926805f9294c3bd10c5d69b8ac4415029a6a8a8e62d0f4603b585e3e9d845f1 |
File details
Details for the file pyoomph-0.1.3-cp312-cp312-macosx_10_13_x86_64.whl
.
File metadata
- Download URL: pyoomph-0.1.3-cp312-cp312-macosx_10_13_x86_64.whl
- Upload date:
- Size: 4.8 MB
- Tags: CPython 3.12, macOS 10.13+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b02c03c99b1115c93ea90b01367fe2eb0a6a712e0276287de51deee6bcea7e6 |
|
MD5 | d0dda036a993e60855b8b5cfcfe77a8a |
|
BLAKE2b-256 | b60307ac3b33fedbbcb3c477adfff27ebe8778571d1af296a2a5ab03190038cb |
File details
Details for the file pyoomph-0.1.3-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: pyoomph-0.1.3-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9470763bfa375dc4cfa9c54445ef5629b9a6a17b771c19524fe0a9f7a9057a67 |
|
MD5 | 5bd67d156bba9e07f53fa4e2212b434b |
|
BLAKE2b-256 | 96f78970d7383a0efaeb19029e8b65057eb00b524b5519525ea6f0be63d3720d |
File details
Details for the file pyoomph-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyoomph-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 5.2 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c03d0e5f42087868c46968d3a3c09f63cf7252394abdde5c1691cd40f1b8fae0 |
|
MD5 | d2878c6e8ddc33fa6ee8c04fbf3c1d4e |
|
BLAKE2b-256 | f27514d893f3c29dfd69d581ab241744e6601c5d6335e4fdc3aecc53264be257 |
File details
Details for the file pyoomph-0.1.3-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyoomph-0.1.3-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 4.8 MB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21deae0668fd0525bc6301a5a240454ae0b140748eb493dcd16830b6c9def5e6 |
|
MD5 | 5b7ac43d83313e8336b25691f1d11469 |
|
BLAKE2b-256 | 74d15d756260c38868d83e424c629e953e8ab6ae7d45395e3db7cf443203f82b |
File details
Details for the file pyoomph-0.1.3-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: pyoomph-0.1.3-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 620f530bc11ef4f698eeb23493bc5b3f2a931c08a1c2ceebc5f2f85c28ca5063 |
|
MD5 | 0297624de94d1f05c428a842a6fe442a |
|
BLAKE2b-256 | 17185337a834bd7fa460638ab4d36fd1e371902e4917ef6f03b46bd88b1549a4 |
File details
Details for the file pyoomph-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyoomph-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 5.2 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e208bc08617852598c99699054523d24658d176f394c0d4012ed403ed5f6eb1f |
|
MD5 | ee3d571a39da4a3710c155187cbbb858 |
|
BLAKE2b-256 | 21d6666e8dfe34fecf9315ce2d76d15af3346c8310edd15dc61a3b56168161ae |
File details
Details for the file pyoomph-0.1.3-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyoomph-0.1.3-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 4.8 MB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a135eba3155f53e3bc7a8945fd7a1567440694069a13411adb90d8186aa680ca |
|
MD5 | 7638a304efe5007ea4599dcd2ccc0df4 |
|
BLAKE2b-256 | 6ca9ffe0db3ab0fcdc648b6a2858e8cd1456385ce981b418cb0c523b5e1c9d10 |
File details
Details for the file pyoomph-0.1.3-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: pyoomph-0.1.3-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0101d2e218cdaee79e820200abecc8f6989dc5c5fe461586d2210286e77b3f8 |
|
MD5 | 18e2c5b5e3b7ce975f4647b501eba672 |
|
BLAKE2b-256 | 31dcab1451e677409318e8030e33e563d450c9316eb5a8c0e8b5670eefd92a8a |
File details
Details for the file pyoomph-0.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: pyoomph-0.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 5.2 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e41d0c03cfe7402a2bb8947bb6ac13ed9f24ce3c1c97b25b3c574ba60f412c62 |
|
MD5 | 9de6357d521846ce60eaaaa1debae2e5 |
|
BLAKE2b-256 | 2911c81d39ab0c346c1e0effd23c7aff70a3ac8e5dc1fe660df0d82adbdd20c4 |
File details
Details for the file pyoomph-0.1.3-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: pyoomph-0.1.3-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 4.8 MB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10c680bae7b57d90bceed402980b21a849cc1a4ff85685daa9b554c1ee0248e1 |
|
MD5 | bb964f419431daee57c1c94c136affc1 |
|
BLAKE2b-256 | 70c0cedc01fd5ef513a4bf49fb6981387485efef935fb8b1de7da184a31441d1 |
File details
Details for the file pyoomph-0.1.3-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: pyoomph-0.1.3-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 664f5f2506b6fa1ae087181a273b166245b10da89bc190cf51c8fcbc2a3dfe39 |
|
MD5 | 7ade6a84b8f3af3743daf4444b551a10 |
|
BLAKE2b-256 | 9247c78781bec5d1d5adb73b05137cb061a73bbceb3546616db2509e0a005f09 |