This tutorial illustrates volume coupling with a simple example.
Note: Get the case files of this tutorial. Read how in the tutorials introduction.
Setup
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.
Available solvers and dependencies
- 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
This tutorial is for FEniCS. You can find the corresponding run.sh
script in the folder fenics
.
To choose whether you want to run the source or the drain solver, please provide the following command line input:
-s
flag will create a source.-d
flag will create a drain.
For running the case, open two terminals run:
cd fenics
./run.sh -s
and
cd fenics
./run.sh -d