Run-time Post-processing

Run-time Post-processing

Users can configure an OpenFOAM case to carry out post-processing automatically while the simulation is running using function objects. The range of available functionality is extensive: e.g. files of sampled data can be written for graph plotting; files of force coefficients can be written; files containing elements for visual post-processing, e.g. cutting planes and isosurfaces can be written.

One major advantage is that this post-processing can run in parallel. This largely removes the need for visualisation in parallel, because data files of the post-processed elements, e.g. cutting plane, are themselves small enough to post-process in serial.

Below is a list of available functionality that can be called at run-time.

  • fieldAverage - temporal averaging of fields.
  • fieldMinMax - writes min/max values of fields.
  • fieldValue - averaging/integration across sets of faces/cells, e.g. for flux across a plane.
  • readFields - loads fields to the database for post-processing.
  • surfaceInterpolateFields - generates surfaceFields from volFields for further postprocessing.
  • forces - calculates pressure/viscous forces and moments.
  • forceCoeffs - calculates lift, drag and moment coefficients.
  • sampledSet - data sampling along lines, e.g. for graph plotting.
  • probes - data probing at point locations.
  • isoSurface - generation of an isosurface of given fields in one of the standard sample formats, e.g. VTK.
  • cuttingPlane - generation of a cuttingPlane with field data in one of the sample formats.
  • sampledPatch - generation of a surface of a patch with field data in one of the sample formats.
  • systemCall - execute any system call, e.g. email you to tell you your job is finished.
  • abortCalculation - Watches for presence of the named file in the case directory and aborts the calculation if it is present.
  • partialWrite - allows registered objects, e.g. fields, to be written at different times (frequencies).
  • nearWallFields - generates a volField with boundary values from interpolated internal field.
  • streamLine - generates streamlines in one of the sample formats.
  • timeActivatedFileUpdate - modifies case settings at specified times in a simulation.
  • writeRegisteredObject - writes registered objects, e.g. fields that are not scheduled to be written in the application, i.e. created with NO_WRITE.

Below is an example of an image the elements of which are created from data files generated by function objects, rather than by post-processing the actual OpenFOAM solution data itself. The image includes a cutting plane, coloured by pressure, and streamlines coloured by flow speed.

Motorbike with cutting plane and streamtubes