The basic directory structure for a OpenFOAM case, that contains the minimum set of files required to run an application, is shown in Figure 4.1 and described as follows:
- A constant directory
- that contains a full description of the case mesh in a subdirectory polyMesh and files specifying physical properties for the application concerned, e.g. transportProperties.
- A system directory
- for setting parameters associated with the solution procedure itself. It contains at least the following 3 files: controlDict where run control parameters are set including start/end time, time step and parameters for data output; fvSchemes where discretisation schemes used in the solution may be selected at run-time; and, fvSolution where the equation solvers, tolerances and other algorithm controls are set for the run.
- The ‘time’ directories
- containing individual files of data for particular fields, e.g. velocity and pressure. The data can be: either, initial values and boundary conditions that the user must specify to define the problem; or, results written to file by OpenFOAM. Note that the OpenFOAM fields must always be initialised, even when the solution does not strictly require it, as in steady-state problems. The name of each time directory is based on the simulated time at which the data is written and is described fully in section 4.4. It is sufficient to say now that since we usually start our simulations at time , the initial conditions are usually stored in a directory named 0 or 0.000000e+00, depending on the name format specified. For example, in the cavity tutorial, the velocity field and pressure field are initialised from files 0/U and 0/p respectively.
© 2011-2019 OpenFOAM Foundation