Run CFD simulation

The particle trajectory code is capable of being coupled with steady state CFD simulation results, specifically those generated by OpenFOAM. As an example case of CFD simulation, let's copy squareBend case directory from OpenFOAM tutrial by the following command:

cp -r $FOAM_TUTORIALS/compressible/rhoSimpleFoam/squareBend ~/

After that, you should have a squareBend directory on your home directory. The command:

./Allrun

from the created ~/squareBend directory generates a mesh and performs the steady-state CFD simulation (using rhoSimpleFoam solver) with considering compressibility and with kāˆ’Ļµk-\epsilon turbulent model. It takes couple of minuts to obtain your final result (the gif image below is stopped before done the simulation). The simulation should be done with 156 steps, meaning the directory named 156 is generated under your ~/squareBend/ directory. The detail of this CFD simulation is not discussed here since taht is out of focus in this manual.

Note for Fluent user: In order to use Fluent format results, it is necessary to transform the mesh geometry to the OpenFOAM mesh format using the fluentToFoam command from OpenFOAM. Additionally, the Fluent simulation results must be transformed to the OpenFOAM format using the datToFoam.py Python script located in the src directory. However, the Fluent result format is limited in comparison to the OpenFOAM format. OpenFOAM installation is required regardless of which simulation software you choose. You can find installation guides for OpenFOAM through a web search and learn how to run simulations from manuals and tutorials. It is highly recommended to learn how to run CFD simulations with OpenFOAM in order to gain a deeper understanding of the simulation process, rather than merely being familiar with the software.

Last updated