04 Moretutorials
04 Moretutorials
• We will now learn how to search the installation for information on how to use
solvers and utilities.
• Type:
tree -d -L 2 $FOAM_TUTORIALS
to get a list of for which solvers there are tutorial cases available.
• Type:
tree -d -L 2 $FOAM_TUTORIALS/incompressible/icoFoam
to get a list of which tutorial cases are available for the icoFoam solver.
• All the solver tutorials have Allrun scripts that describe the use of those
tutorials. We will now have a look at the Allrun script of the
$FOAM_TUTORIALS/incompressible/icoFoam tutorials. This is actu-
ally what you will do manually when you do the cavity tutorials in the
UserGuide. In other words, you can use the Allrun script as a short
summary of the description in the UserGuide.
Looking in the Allrun script, you can see a list of cases that will be executed:
cavityCases="cavity cavityFine cavityGrade cavityHighRe cavityClipped"
Some of those cases are actually created by the script.
At the end of the script it also runs the elbow case.
The script contains Linux commands and calls for OpenFOAM applications in order to set up
and run the simulations.
• You can also run another Allrun script, located in the $FOAM_TUTORIALS direc-
tory. This script will run through ALL the tutorials (calls Allrun in each solver
directory). It can also check the log files for errors, using a test loop (have a look
at the Allrun script).
• Use the Allclean script to clean up when you no longer need the results from
all the tutorials (only removes files that are created when running the cases).
• You can use this script as a tutorial of how to generate the meshes, how to run
the solvers, how to clone cases, how to map the results between different cases
etc.
• Again, I suggest that you copy the files to your run directory:
cp -r $FOAM_TUTORIALS $FOAM_RUN
You will get a list of example dictionaries for the utilities that use a dictionary. Some of
those examples can be found next to the source code of each particular utility, and some
are also used in the solver tutorials. The ones that don’t use a dictionary are usually
easier to learn how to use, in particular when using the -help flag.