[version 10][version 9][version 8][version 7][version 6]
4.1 File structure of OpenFOAM cases
The basic directory structure for a OpenFOAM case, that contains the minimum set of ﬁles 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 ﬁles 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 ﬁles: 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 ﬁles of data for particular ﬁelds, e.g. velocity and pressure. The data can be: either, initial values and boundary conditions that the user must specify to deﬁne the problem; or, results written to ﬁle by OpenFOAM. Note that the OpenFOAM ﬁelds 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 suﬃcient 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 speciﬁed. For example, in the cavity tutorial, the velocity ﬁeld and pressure ﬁeld are initialised from ﬁles 0/U and 0/p respectively.
OpenFOAM v9 User Guide - 4.1 File structure of OpenFOAM cases