These are utilities that start and control OpenFOAM-Runs. Apart from the features described below they start a little XMLRPC-server through which these runs can be controlled (see Network-Utilities).
Most of the utilities can be used to start parallel runs (the number of processors and a host-file have to be provided, depending on the MPI-implementation. The parallel environment is set up automatically).
These utilities can be used to analyze the output of an OpenFOAM-solver that has been written to a file
Most Runner-Utilities start a Server-thread that makes it possible to contact control an OpenFOAM-run and get information about it. These utilities help to access these servers.
Notes:
These utilities are beta-qualitiy. They work for my network but have not been tested in other environments
The address of the
pyFoamMetaServer.py
is hardcoded into the sources, but can be overwritten using system-wide configuration-files
pyFoamNetShell.py
doesn't need any additional infrastructure. Only the address and the port have to be known
These utilities are used for manipulating case date. They are especially useful in scripts that automatically set up simulation runs.
Adds an empty patch to the boundary file. Such a patch is needed for some mesh-manipulation utilities.
pyFoamAddEmptyBoundary.py <case> <patch>
DeepFlame
# /<case>/constant/polyMesh/boundary
<patch>
{
nFaces 0;
startFace <str(lastFace)>
type wall;
}
Changes the type of a boundary patch.
pyFoamChangeBoundaryType.py <case> <patch> <type>
DeepFlame
# /<case>/constant/polyMesh/boundary
<patch>
{
type <type>;
nFaces 0;
startFace 3300
}
Changes the name of a boundary patch.
pyFoamChangeBoundaryName.py <case> <patch> <newname>
DeepFlame
# /<case>/constant/polyMesh/boundary
<newname>
{
type wall;
nFaces 0;
startFace 3300
}
Creates boundary patches in a field-file by looking at the boundary-file.
?
Removes all the timesteps except for the first from a case directory.
pyFoamClearCase.py <case>
Todo: DeepFlame
Packs the essential files (the ones that are needed to run it) of a case into a tar-file for archiving/mailing-purposes
pyFoamPackCase.py <case>
Todo: + .yaml & Inference.py
Creates a copy of a case with only the most essential files
pyFoamCloneCase.py <case> <newdirectory>
Todo: + .yaml & Inference.py
Copy last time-step from one case to the first one of another (making it the initial condition)
pyFoamCopyLastToFirst.py <sourcecase> <destinationcase>
Todo: DeepFlame
Clears the solution from the internal field
Clear non-uniform values from the boundary-fields
Initialize the case for the use with the Version Control System (VCS) of your choice
This utility replaces a symlink with a copy of the file/directories it points to. To be used after a pyFoamCloneCase.py
in --symlink-mode
Goes through a case and compresses single files that are bigger than a certain threshold. Purpose is to shrink cases that were run with the setting uncompressed
in the controlDict
For more complex cases these utilities require an understanding of the syntax/semantics of Python-lists and dictionaries
Reads data from the root of a OpenFOAM-dictionary and prints it. To access subexpressions of a dictionary entry Python-expressions can be used (note: the expression is evaluated by the Python-interpreter, so quoting has to be used for strings, otherwise Python confuses them with variables)
Writes data to the root of a OpenFOAM-dictionary and writes it to disk. Subexpressions can be selected (see note: pyFoamReadDictionary.py
)
Thes utilities require a paraview that is compiled with python-support. They have been only tested with ParaView 3.4 and may not work with other versions.
Utilities that don't fit any of the other categories.
Stuff that is not purely command-line oriented
Utilities for special applications