This tutorial illustrates volume coupling with a simple example.
Updated 12 Jul 24


This case illustrates how to implement volume coupling in a simple toy problem. Two diffusion problems are coupled via volume terms. One domain (the source) has constant non-zero Dirichlet boundary conditions. The other domain (the drain) has Neumann boundary conditions and a zero Dirichlet boundary condition at the right edge of the domain. The quantity u flows from the source to the drain.

Case setup of volume-coupled-diffusion case


preCICE configuration (image generated using the precice-config-visualizer):

preCICE configuration visualization

Available solvers and dependencies

Both participants (Source and Drain):

  • FEniCS. Install FEniCS and the FEniCS-adapter. Additionally, you will need to have preCICE and the python bindings installed on your system.

Running the simulation

FEniCS is used to run the simulation. Open two separate terminals and start the source and drain participant by calling the respective run script located in the participant directory. For example:

cd source-fenics


cd drain-fenics

in order to use FEniCS for both participants in this test case.