Execute

To set the number of threads used in the simulation with OpenMP, you need to set the OMP_NUM_THREADS variable. For example, if you want to run the simulation with 8 threads, you can set the variable as follows:

export OMP_NUM_THREADS = 8

This command will set the number of threads to 8 for the current terminal session. If you want to set this variable permanently as a default value, you can add this line to your .bashrc file.

After setting the variable, you can run the particle trajectory simulation by typing "./trajectory.out" from your working directory. The simulation will run in parallel with the number of threads that you specified.

./trajectory.out

As displayed in the example movie (GIF), several lines are generated after executing the command "./trajectory.out". The first four lines show the calculation conditions, including the time step, the selected drag model, whether dispersion is turned on or off, and whether compressibility is conducted or not. The subsequent lines display the amount of time taken for, reading the geometry (mesh), reading the CFD result, constructing cells, and finding initial cells for all particles. During trajectory calculations, the simulation may stall for some time. At the end of the trajectory simulation, the number of particles that did not exit the domain or deposit on the wall during the maximum calculation time is displayed, followed by the time taken for the trajectory calculations.

Last updated