to specify the path name of the output dictionary to which the expanded and/or
changed dictionary is written.
Usage: foamDictionary [OPTIONS] <dictionary file>
options:
-add <value> Add a new entry
-case <dir> specify alternate case directory, default is the cwd
-dict Set, add or merge entry from a dictionary.
-diff <dict> Write differences with respect to the specified dictionary
-entry <name> report/select the named entry
-expand Read the specified dictionary file and expand the macros
etc.
-fileHandler <handler>
override the fileHandler
-hostRoots <((host1 dir1) .. (hostN dirN))>
slave root directories (per host) for distributed running
-includes List the #include/#includeIfPresent files to standard output
-keywords list keywords
-libs '("lib1.so" ... "libN.so")'
pre-load libraries
-merge <value> Merge entry
-noFunctionObjects
do not execute functionObjects
-output <path name>
Path name of the output dictionary
-parallel run in parallel
-remove Remove the entry.
-roots <(dir1 .. dirN)>
slave root directories for distributed running
-set <value> Set entry value, add new entry or apply list of
substitutions
-value Print entry value
-writePrecision <label>
Write with the specified precision
-srcDoc display source code in browser
-doc display application documentation in browser
-help print the usage
manipulates dictionaries
Now if the -case option is specified the dictionary path provided is treated as
relative to the case path, e.g.
foamDictionary -expand -case shockFluid/shockTube system/controlDict
#includeModel includes an fvModel configuration file into the fvModels file
#includeConstraint includes an fvModel configuration file into the fvConstraints file
These operate in the same manner as #includeFunc does for functionObjects and
search the etc/caseDicts/fvModels and etc/caseDicts/fvConstraints directories
for configuration files and apply optional argument substitution.
Class
Foam::functionEntries::includeFvModelEntry
Description
Specify a fvModel dictionary file to include, expects the
fvModel name to follow with option arguments (without quotes).
Searches for fvModel dictionary file in user/group/shipped
directories allowing for version-specific and version-independent files
using the following hierarchy:
- \b user settings:
- ~/.OpenFOAM/\<VERSION\>/caseDicts/fvModels
- ~/.OpenFOAM/caseDicts/fvModels
- \b group (site) settings (when $WM_PROJECT_SITE is set):
- $WM_PROJECT_SITE/\<VERSION\>/etc/caseDicts/fvModels
- $WM_PROJECT_SITE/etc/caseDicts/fvModels
- \b group (site) settings (when $WM_PROJECT_SITE is not set):
- $WM_PROJECT_INST_DIR/site/\<VERSION\>/etc/caseDicts/fvModels
- $WM_PROJECT_INST_DIR/site/etc/caseDicts/fvModels
- \b other (shipped) settings:
- $WM_PROJECT_DIR/etc/caseDicts/fvModels
The optional field arguments included in the name are inserted in 'field' or
'fields' entries in the fvModel dictionary and included in the name
of the fvModel entry to avoid conflict.
Examples:
\verbatim
#includeModel clouds
#includeModel surfaceFilms
\endverbatim
Other dictionary entries may also be specified using named arguments.
See also
Foam::includeFvConstraintEntry
Foam::includeFuncEntry
Class
Foam::functionEntries::includeFvConstraintEntry
Description
Specify a fvConstraint dictionary file to include, expects the
fvConstraint name to follow with option arguments (without quotes).
Searches for fvConstraint dictionary file in user/group/shipped
directories allowing for version-specific and version-independent files
using the following hierarchy:
- \b user settings:
- ~/.OpenFOAM/\<VERSION\>/caseDicts/fvConstraints
- ~/.OpenFOAM/caseDicts/fvConstraints
- \b group (site) settings (when $WM_PROJECT_SITE is set):
- $WM_PROJECT_SITE/\<VERSION\>/etc/caseDicts/fvConstraints
- $WM_PROJECT_SITE/etc/caseDicts/fvConstraints
- \b group (site) settings (when $WM_PROJECT_SITE is not set):
- $WM_PROJECT_INST_DIR/site/\<VERSION\>/etc/caseDicts/fvConstraints
- $WM_PROJECT_INST_DIR/site/etc/caseDicts/fvConstraints
- \b other (shipped) settings:
- $WM_PROJECT_DIR/etc/caseDicts/fvConstraints
The optional field arguments included in the name are inserted in 'field' or
'fields' entries in the fvConstraint dictionary and included in the name
of the fvConstraint entry to avoid conflict.
Examples:
\verbatim
#includeConstraint limitPressure(minFactor=0.1, maxFactor=2)
#includeConstraint limitTemperature(min=101, max=1000)
\endverbatim
or for a multiphase case:
\verbatim
#includeConstraint limitLowPressure(min=1e4)
#includeConstraint limitTemperature(phase=steam, min=270, max=2000)
#includeConstraint limitTemperature(phase=water, min=270, max=2000)
\endverbatim
Other dictionary entries may also be specified using named arguments.
See also
Foam::includeFvModelEntry
Foam::includeFuncEntry
Multiple substitutions can be made using the convenient -set "<substitutions>"
option which combines the selection of the entries with the substitutions made
on them using the same argument syntax used by #includeFunc, e.g.
foamDictionary system/controlDict -set "startTime=2000, endTime=3000"
so that foamDictionary conveniently supports the same format as the #includeFunc
argument list, e.g.
foamDictionary -set 'fieldAverage(U, p, prime2Mean = yes)' fieldAverage
The unnamed field arguments 'U' and 'p' are ignored by foamDictionary.
foamDictionary operates on individual dictionary files irrespective of their
location or case they may be associated with and hence a case database is not
needed to read them.
functionEntry expansion is enabled for dictionary expansion with the -expand
option. The disableFunctionEntries option is no longer needed and has been removed.
by introducing a new specialised type, variable, derived from word with
additional valid characters. This avoids some complex type-juggling in the
parser and keyType in which string was used to represent either a string or a
variable.
When running in parallel the decomposed dictionary files are read from the
case directory in either un-collated or collated format and changed dictionaries
written in the form specified by the selected fileHandler.
The instance directory of the dictionary file is obtained from the file path
argument, e.g.
mpirun -np 4 foamDictionary 0.5/U \
-entry boundaryField.movingWall.value \
-set "uniform (2 0 0)" -parallel
If the -case option is specified time is created from the case
system/controlDict enabling support for parallel operation, e.g.
mpirun -np 4 \
foamDictionary -case . 0/U -entry boundaryField.movingWall.value \
-set "uniform (2 0 0)" \
-parallel
This will read and modify the 0/U field file from the processor directories even
if it is collated. To also write the 0/U file in collated format the collated
fileHandler can be specified, e.g.
mpirun -np 4 \
foamDictionary -case . 0/U -entry boundaryField.movingWall.value \
-set "uniform (2 0 0)" \
-fileHandler collated -parallel
This provides functionality for field manipulation equivalent to that provided
by the deprecated changeDictionary utility but in a more flexible and efficient
manner and with the support of fileHandlers for collated parallel operation.
This generalizes and replaces the previous "noBanner" option provided by argList
and is extended to include the messages printed by Time.
Resolves bug-report https://bugs.openfoam.org/view.php?id=2782
- provides support for manipulating polyMesh/boundary
- changed behaviour of disableFunctionEntries option to preserve
#include
- dictionary: added reading of lists of dictionaries.
+ each list element may be accessed using the 'entryDDD' keyword
according to their list index.
Patch contributed by Mattijs Janssens
- Write differences with respect to the specified dictionary
(or sub entry if -entry specified)
- Write the differences with respect to a template dictionary:
foamDictionary 0/U -diff $FOAM_ETC/templates/closedVolume/0/U
- Write the differences in boundaryField with respect to a
template dictionary:
foamDictionary 0/U -diff $FOAM_ETC/templates/closedVolume/0/U \
-entry boundaryField
Patch contributed by Mattijs Janssens
Replaces the dictionary access functionality of foamInfoExec and
provides additional options to edit individual entries.
Contributed by Mattijs Janssens