The setup is shown schematically here:
For more information please refer to the original publication of the benchmark .
- OpenFOAM. For more information, have a look at the OpenFOAM adapter documentation.
- deal.II. For more information, have a look at the deal.II adapter documentation. This tutorial requires the nonlinear solid solver. Please copy the nonlinear solver executable to the
solid-dealiifolder or make it discoverable at runtime and update the
Running the Simulation
Open two separate terminals and start each participant by calling the respective run script.
cd fluid-openfoam ./run.sh
cd solid-dealii ./run.sh
You can also run OpenFOAM in parallel by
./run.sh -parallel. The default setting here uses 25 MPI ranks. You can change this setting in
For older OpenFOAM versions, the solver name will differ. If you are using OpenFOAM v1712 / 5.x or older have a look in the
fluid-openfoam/system/controlDict file and set the appropriate solver name.
You may adjust the end time in the
precice-config.xml, or interupt the execution earlier if you want.
In the first few timesteps, many coupling iterations are required for convergence. Don’t lose hope, things get better quickly.
You can visualize the results of the coupled simulation using e.g. ParaView. Fluid results are in the OpenFOAM format and you may load the
fluid-openfoam.foam file. Solid results are in VTK format.
If you want to visualize both domains with ParaView, keep in mind that the deal.II solver writes results every few timesteps, while the OpenFOAM solver writes in reference to simulated time. For this reason, make sure that you use compatible write intervals. You may also need to convert the OpenFOAM results to VTK (with the command
There is an known issue that leads to additional “empty” result directories when running with some OpenFOAM versions, leading to inconveniences during post-processing. At the end of
run.sh, we call
openfoam_remove_empty_dirs (provided by
tools/openfoam-remove-empty-dirs) to delete the additional files before importing the results in ParaView.
Moreover, as we defined a watchpoint at the flap tip (see
precice-config.xml), we can plot it with gnuplot using the script
plot-displacement.sh. The resulting graph shows the vertical (y) displacement of the tip of the flap.
Before running the simulation again, you may want to cleanup any result files using the script
fluid-openfoam/system/, we provide three different fluid meshes:
blockMeshDict: the default mesh with approximately 21k cells,
blockMeshDict_refined: a refined mesh with approximately 38k cells,
blockMeshDict_double_refined: a refined mesh with approximately 46k cells.
If you want to use one of the two refined meshes, simply swap the
mv blockMeshDict blockMeshDict_original mv blockMeshDict_refined blockMeshDict
For the double-refined mesh, it is wisely to use local basis functions in the RBF data mapping method instead of global ones. You can use:
<mapping:rbf-compact-tps-c2 direction="read" from="Fluid-Mesh-Centers" to="Solid-Mesh" support-radius="0.011" constraint="consistent" />
You can find more information on RBF data mapping in the documentation.
 S. Turek, J. Hron, M. Madlik, M. Razzaq, H. Wobker, and J. Acker. Numerical simulation and benchmarking of a monolithic multigrid solver for fluid-structure interaction problems with application to hemodynamics. In H.-J. Bungartz, M. Mehl, and M. Schäfer, editors, Fluid Structure Interaction II: Modelling, Simulation, Optimization, page 432. Springer Berlin Heidelberg, 2010.