Setup
We model a two-dimensional incompressible fluid flowing through a channel with an obstacle. The fluid problem is coupled to a simple transport problem in a uni-directional fashion. The transport problem is initialized with a circular blob close to the inflow. The density of the species is denoted with T
(like temperature). The convected and diffused blob after 23 timesteps:
The behavior of the blob over the full 200 timesteps looks as follows:
The transport solver also supports the use of adaptive mesh refinement.
Configuration
preCICE configuration (image generated using the precice-config-visualizer):
Available solvers
Fluid participant:
-
Nutils. For more information, have a look at the Nutils adapter documentation. This Nutils solver requires at least Nutils v7.0.
-
OpenFOAM (pimpleFoam). For more information, have a look at the OpenFOAM adapter documentation.
Transport participant:
- Nutils with support for adaptive mesh refinement. For more information, have a look at the Nutils adapter documentation. This Nutils solver requires at least Nutils v7.0 and a preCICE release with remeshing support.
Running the simulation
For the fluid solver, use Nutils for ease of installation and OpenFOAM for speed.
Open two separate terminals and start one fluid and one transport participant by calling the respective run scripts run.sh
located in each of the participants’ directory. For example:
cd fluid-nutils
./run.sh
and either the non-adaptive mesh transport solver
cd transport-nutils
./run.sh
or the adaptive mesh transport solver
cd transport-nutils
./run.sh remesh=True
The mesh refinement frequency can also be adjusted:
cd transport-nutils
./run.sh remesh=True frequency=4 # refine every 4 time-windows
Post-processing
All solvers generate vtk
files which can be visualized using, e.g., ParaView.