3.1 Running applications
Each application is designed to be executed from a terminal command line, typically reading and writing a set of data files associated with a particular case. The data files for a case are stored in a directory named after the case as described in section 2.1; the directory name with full path is here given the generic name <caseDir>.
For any application, the form of the command line entry for any can be found by simply entering the application name at the command line with the -help option, e.g. typing
blockMesh -help
Usage: blockMesh [OPTIONS]
options:
-blockTopology write block edges and centres as .obj files
-case <dir> specify alternate case directory, default is the cwd
-dict <file> specify alternative dictionary for the blockMesh description
-fileHandler <handler>
override the file handler type
-noClean keep the existing files in the polyMesh
-noFunctionObjects
do not execute function objects
-region <name> specify alternative mesh region
-sets write cellZones as cellSets too (for processing purposes)
-doc display application documentation in browser
-doc-source display source code in browser
-help print usage information and exit
-help-full print full usage information and exit
Block description
For a given block, the correspondence between the ordering of
vertex labels and face labels is shown below.
For vertex numbering in the sequence 0 to 7 (block, centre):
faces 0 (f0) and 1 are left and right, respectively;
faces 2 and 3 are bottom and top;
and faces 4 and 5 are front the back:
7 ---- 6
f5 |\ |\ f3
| | 4 ---- 5 \
| 3 |--- 2 | \
| \| \| f2
f4 0 ---- 1
Z f0 ----- f1
| Y
| /
O --- X
Using: OpenFOAM-v1806 (see www.OpenFOAM.com)
Build: v1806
Arch: "LSB;label=32;scalar=64"
The -help-full offers additional application options. For example the simpleFoam solver offers following extra options:
-listFunctionObjects
List functionObjects
-listFvOptions List fvOptions
-listRegisteredSwitches
List switches registered for run-time modification
-listScalarBCs List scalar field boundary conditions (fvPatchField<scalar>)
-listSwitches List switches declared in libraries but not set in
etc/controlDict
-listTurbulenceModels
List turbulenceModels
-listUnsetSwitches
List switches declared in libraries but not set in
etc/controlDict
-listVectorBCs List vector field boundary conditions (fvPatchField<vector>)
3.1.1 Command line options
Starting from OpenFOAM v1706 the set of command line options can be readily obtained by command-line completion. For example, by pressing the <TAB> key after typing e.g.blockMesh will prompt the list of options.
blockMesh <TAB> <TAB>
blockMesh -
-blockTopology -dict -help -noFunctionObjects -sets
-case -doc -noClean -region -srcDoc
3.1.2 Running in the background
Like any UNIX/Linux executable, applications can be run as a background process, i.e. one which does not have to be completed before the user can give the shell additional commands. If the user wished to run the blockMesh example as a background process and output the case progress to a log file, they could enter:
blockMesh > log &