Close

16th June 2011

OpenFOAM 2.0.0: Post-processing

Function Objects

OpenFOAM can carry out post-processing (and run-time control) automatically while the simulation is running using function objects. In v2.0.0, the range of available functionality has been extended to include the following:

  • abortCalculation – Watches for presence of the named file in the case directory and aborts the calculation if it is present.
  • coded – See Run-time Control: Code Compilation
  • fieldValuefaceSource extended to integrals (e.g. mass flux) over any sampleSurface, e.g. triSurfaceMesh.
  • nearWallFields – generates a volField with boundary values from interpolated internal field, at a given distance from the wall.
  • partialWrite – allows registered objects, e.g. fields, to be written at different times (frequencies).
  • 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 streamlines, a cutting plane, coloured by velocity, and the motor bike surface, coloured by pressure.

motorBikeSampledTriSurface

Source code

  • fieldFunctionObjects library
    $FOAM_SRC/postProcessing/functionObjects/field
  • IOFunctionObjects library
    $FOAM_SRC/postProcessing/functionObjects/IO
  • jobControl library
    $FOAM_SRC/postProcessing/functionObjects/jobControl
  • utilityFunctionObjects library
    $FOAM_SRC/postProcessing/functionObjects/utilities

Examples

  • Example controlDict files in the source code, listed with the command:
    find $FOAM_SRC/postProcessing -name controlDict
  • Examples in the tutorials, listed with the command:
    find $FOAM_TUTORIALS -name controlDict | xargs grep -l functions

Other Changes to Post-Processing

Other new features and improvements in post-processing include the following.

  • Paraview and the foamToVTK utility now include full support for polyhedral cells.
  • The foamToEnsight utility supports parallel continuous data so that isosurfaces, etc., are continuous across processor boundaries, and includes a new -nodeValues option to generate and output nodal field data.
  • A new singleCellMesh utility converts a mesh and fields to a single cell mesh, so that only boundary data is preserved; useful for post-processing large cases.
  • A steadyParticleTracks utility generates VTK tracks from data for a particle cloud.
  • The sampling library includes a new ensight output format for surface sampling and a new patchInternalField sampling surface that operates like patch samples the internal field, instead of the boundary (patch) field.