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:
48// ************************************************************************* //
- Controls the start time of the simulation.
- Start time for the simulation with startFrom startTime;
- Controls the end time of the simulation.
- endTime: Time speciﬁed by the endTime keyword entry.
- writeNow: Stops simulation on completion of current time step and writes data.
- noWriteNow: Stops simulation on completion of current time step and does not write out data.
- nextWrite: Stops simulation on completion of next scheduled write time, speciﬁed by writeControl.
- End time for the simulation when stopAt endTime; is speciﬁed.
- Time step of the simulation.
- Controls the timing of write output to ﬁle.
- timeStep: Writes data every writeInterval time steps.
- runTime: Writes data every writeInterval seconds of simulated time.
- adjustableRunTime: Writes data every writeInterval seconds of simulated time, adjusting the time steps to coincide with the writeInterval if necessary — used in cases with automatic time step adjustment.
- cpuTime: Writes data every writeInterval seconds of CPU time.
- clockTime: Writes data out every writeInterval seconds of real time.
- 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 = 5s and = 1s, then with purgeWrite 2;, data is ﬁrst 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).
- Speciﬁes the format of the data ﬁles.
- Integer used in conjunction with writeFormat described above, 6 by default.
- Switch to specify whether ﬁles are compressed with gzip when written: on/off (yes/no, true/false)
- Choice of format of the naming of the time directories.
- Integer used in conjunction with timeFormat described above, 6 by default.
- Format for graph data written by an application.
- 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.
- List of additional libraries (on $LD_LIBRARY_PATH) to be loaded at run-time, e.g.("libNew1.so" "libNew2.so")
- Dictionary of functions, e.g. probes to be loaded at run-time; see examples in $FOAM_TUTORIALS