[version 12][version 11][version 10][version 9][version 8][version 7][version 6]
Chapter 4 OpenFOAM cases
This chapter deals with the file structure and organisation of OpenFOAM cases. Normally, a user would assign a name to a case, e.g. the tutorial case of flow in a cavity is simply named cavity. This name becomes the name of a directory in which all the case files and subdirectories are stored. The case directories themselves can be located anywhere but we recommend they are within a run subdirectory of the user’s project directory, i.e.$HOME/OpenFOAM/${USER}-6 as described at the beginning of chapter 2. One advantage of this is that the $FOAM_RUN environment variable is set to $HOME/OpenFOAM/${USER}-6/run by default; the user can quickly move to that directory by executing a preset alias, run, at the command line.
The tutorial cases that accompany the OpenFOAM distribution provide useful examples of the case directory structures. The tutorials are located in the $FOAM_TUTORIALS directory, reached quickly by executing the tut alias at the command line. Users can view tutorial examples at their leisure while reading this chapter.
4.2 Basic input/output file format
4.2.1 General syntax rules
4.2.2 Dictionaries
4.2.3 The data file header
4.2.4 Lists
4.2.5 Scalars, vectors and tensors
4.2.6 Dimensional units
4.2.7 Dimensioned types
4.2.8 Fields
4.2.9 Macro expansion
4.2.10 Including files
4.2.11 Regular expressions
4.2.12 Keyword ordering
4.2.13 Inline calculations and code
4.3 Time and data input/output control
4.3.1 Time control
4.3.2 Data writing
4.3.3 Other settings
4.4 Numerical schemes
4.4.1 Time schemes
4.4.2 Gradient schemes
4.4.3 Divergence schemes
4.4.4 Surface normal gradient schemes
4.4.5 Laplacian schemes
4.4.6 Interpolation schemes
4.5 Solution and algorithm control
4.5.1 Linear solver control
4.5.2 Solution under-relaxation
4.5.3 PISO, SIMPLE and PIMPLE algorithms
4.5.4 Pressure referencing
4.5.5 Other parameters
4.6 Case management tools
4.6.1 File management scripts
4.6.2 foamDictionary and foamSearch
4.6.3 The foamGet script
4.6.4 The foamInfo script