What is FEniCS
From the FEniCS website: FEniCS is a popular open-source (LGPLv3) computing platform for solving partial differential equations (PDEs). FEniCS enables users to quickly translate scientific models into efficient finite element code. With the high-level Python and C++ interfaces to FEniCS, it is easy to get started, but FEniCS offers also powerful capabilities for more experienced programmers. FEniCS runs on a multitude of platforms ranging from laptops to high-performance clusters. More details can be found at fenicsproject.org.
How to get FEniCS
You can install FEniCS on your system by several ways as mentioned on fenicsproject.org. The simplest way to install FEniCS on Ubuntu is using the official PPA repository of FEniCS:
sudo apt install software-properties-common sudo add-apt-repository ppa:fenics-packages/fenics sudo apt-get update sudo apt-get install --no-install-recommends fenics
Aim of this adapter
This adapter supports the Python interface of FEniCS and offers an API that allows the user to use FEniCS-style data structures for solving coupled problems. We provide usage example for the adapter for heat transport, conjugate heat transfer and fluid-structure interaction. However, the adapter is designed in a general fashion and can be used to couple any code using the FEniCS library.
How to install the adapter
The adapter requires FEniCS and preCICE version 2.0 or greater and the preCICE language bindings for Python.
The adapter is published on PyPI. After installing preCICE and the python language bindings one can simply run
pip3 install --user fenicsprecice to install the adapter via your Python package manager.
You can alternatively use
conda to install the adapter. Please refer to
conda-forge/fenicsprecice for installation instructions. Bonus, if you use
conda: You don’t have to worry about the dependencies, because
conda takes care of this for you.
Please refer to the installation instructions provided here for alternative installation procedures.
Examples for coupled codes
The following tutorials can be used as a usage example for the FEniCS adapter:
- Solving the heat equation in a partitioned fashion (heat equation solved via FEniCS for both participants)
- Flow over plate (heat equation solved via FEniCS for solid participant)
- Perpendicular flap (structure problem solved via FEniCS)
- Cylinder with flap (structure problem solved via FEniCS)
For more details please consult the references given in the reference section.
How can I use my own solver with the adapter
The FEniCS adapter does not couple your code out-of-the-box, but you have to call the adapter API from within your code. You can use the tutorials from above as an example. The API of the adapter and the design is explained and usage examples are given in the reference paper.
You need more information?
How to cite
If you are using our adapter, please consider citing our paper:
Richard Hertrich Bachelor's thesis, Munich School of Engineering, Technical University of Munich, 2019.Publisher's site