OpenFOAM v12 User Guide - 4.4 Time and data input/output control

The OpenFOAM solvers begin all runs by setting up a database. The database controls I/O and, since output of data is usually requested at intervals of time during the run, time is an inextricable part of the database. The controlDict dictionary sets input parameters essential for the creation of the database. The keyword entries in controlDict are listed in the following sections. Only the time control and writeInterval entries are mandatory, with the database using default values for any of the optional entries that are omitted. Example entries from a controlDict dictionary are given below:

16 17   18 19     20 21    latestTime; 22 23    0; 24 25     26 27     0.3; 28 29     30 31   adjustableRunTime; 32 33  34 35   36 37   38 39 6; 40 41 off; 42 43   44 45  46 47 yes; 48 49 yes; 50 51      5; 52 53 // 

4.4.1 Modules

Choice of solver module for the simulation, e.g. incompressibleFluid

Dictionary of solvers for different domain regions, e.g. heat transfer of water flowing over a plate might use the fluid and solid modules as follows:

regionSolvers
<
water fluid;
plate solid;
>

List of additional libraries (existing on $ LD _LIBRARY _PATH ) to be loaded at run-time, e.g. ("libNew1.so" "libNew2.so")

4.4.2 Time control

Controls the start time of the simulation.

Start time for the simulation with startFrom startTime;

Controls the end time of the simulation.

End time for the simulation when stopAt endTime; is specified.

Time step of the simulation.

4.4.3 Data writing


writeControl

Controls the timing of write output to file.

Scalar used in conjunction with writeControl described above.

Integer representing a limit on the number of time directories that are stored by overwriting time directories on a cyclic basis. For example, if the simulations starts at eqn= 5s and eqn= 1s, then with purgeWrite 2; , data is first written into 2 directories, 6 and 7 , then when 8 is written, 6 is deleted, and so on so that only 2 new results directories exists at any time. To disable the purging, specify purgeWrite 0; (default).

Specifies the format of the data files.

Integer used in conjunction with writeFormat described above, 6 by default.

Switch to specify whether files are compressed with gzip when written: on/off ( yes/no , true/false )

Choice of format of the naming of the time directories.


timePrecision

Integer used in conjunction with timeFormat described above, 6 by default.

Format for graph data written by an application.

4.4.4 Other settings

Optional entry to for cases with an unusual start time that causes inconvenient write times. With beginTime , the write times are multiples of writeInterval , starting at the beginTime . For example, if the start time of 1.52 and a writeInterval of 1 , results would be written at 2.52 , 3.52 , …If beginTime is set to 0 (or 1 ), the write times would be 2 , 3 , etc.

Switch used by some solvers to adjust the time step during the simulation, usually according to maxCo .

Switch used by some solvers to adjust the time step during the simulation, usually according to maxCo .

Maximum Courant number, e.g. 0.5

Switch for whether dictionaries, e.g. controlDict , are re-read during a simulation at the beginning of each time step, allowing the user to modify parameters during a simulation.

Dictionary of functions, e.g. probes to be loaded at run-time; see examples in $ FOAM _TUTORIALS