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 aerodynamics of a motorbike is simply named motorBike. This name becomes the name of a directory in which all the case files and sub-directories are stored.

When running a simulation, a case directory can be located anywhere on a user’s filing system. However, we recommend putting cases within a run subdirectory of the user’s filing system, i.e.$HOME/OpenFOAM/${USER}-12 as described at the beginning of chapter 2. The $FOAM_RUN environment variable is set to $HOME/OpenFOAM/${USER}-12/run by default and 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.1 File structure of OpenFOAM cases
 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 Units and unit conversion
  4.2.8 Dimensioned types
  4.2.9 Fields
  4.2.10 Macro expansion
  4.2.11 Including files
  4.2.12 Environment variables
  4.2.13 Regular expressions
  4.2.14 Keyword ordering
  4.2.15 Inline calculations
  4.2.16 Inline code
  4.2.17 Conditionals
 4.3 Global controls
  4.3.1 Overriding global controls
 4.4 Time and data input/output control
  4.4.1 Modules
  4.4.2 Time control
  4.4.3 Data writing
  4.4.4 Other settings
 4.5 Numerical schemes
  4.5.1 Time schemes
  4.5.2 Gradient schemes
  4.5.3 Divergence schemes
  4.5.4 Surface normal gradient schemes
  4.5.5 Laplacian schemes
  4.5.6 Interpolation schemes
 4.6 Solution and algorithm control
  4.6.1 Linear solver control
  4.6.2 Solution tolerances
  4.6.3 Preconditioned conjugate gradient solvers
  4.6.4 Smooth solvers
  4.6.5 Geometric-algebraic multi-grid solvers
  4.6.6 Solution under-relaxation
  4.6.7 SIMPLE and PIMPLE algorithms
  4.6.8 Pressure referencing
 4.7 Case management tools
  4.7.1 General file management
  4.7.2 The foamDictionary utility
  4.7.3 The foamSearch script
  4.7.4 The foamGet script
  4.7.5 The foamInfo script
  4.7.6 The foamToC utility
  4.7.7 The foamUnits script
  4.7.8 The foamFind script
OpenFOAM v12 User Guide - Chapter 4 OpenFOAM cases
CFD Direct