Skip to content

Running the simulation

Gerasimos Chourdakis edited this page Jun 7, 2018 · 12 revisions

In order to start the simulation, you may start both solvers normally, in arbitrary order, in their own terminals. A tiling terminal emulator or a terminal multiplexer may be handy in this case.

First of all, you must be in the directory that contains the two cases (openfoam-adapter/tutorials/CHT/flow-over-plate/buoyantPimpleFoam-laplacianFoam/). Both cases need to be started from the same directory. Open two different terminals for this.

To prepare and start the Fluid participant, run:

blockMesh -case Fluid
buoyantPimpleFoam -case Fluid

or simply run the script runFluid.

To prepare and start the Solid participant, run:

blockMesh -case Solid
laplacianFoam -case Solid

or simply run the script runSolid.

Each participant will prepare itself and will pause at the preCICE initialization phase, waiting for the other participant. Then, the simulation will continue. The simulated time is 1s and results are written every 0.2s.

Start of the simulation

After a few seconds/minutes, the simulation will end:

End of the simulation

One easy script

Alternatively, you may start everything in one terminal, using the Allrun script. This script waits for both participants to exit and stores their output in the log files Fluid.log and Solid.log. You may inspect these files at runtime in another terminal using e.g. tail -f Solid.log.

After you run the tutorial in serial, you can also try it also in parallel! The case is already set up and the script Allrun_parallel does everything for you. In the parallel case, the configuration file precice-config_parallel.xml is used, which incorporates all the changes described in the preCICE wiki page: Changes for Parallel Solvers.

After running the simulation, execute ./Allclean if you want to clean-up.