OpenFoamBuilder.org
Available function objects


Probes or monitor points
Line sampling
Cutting plane sampling
Surface sampling based on patches
Field averaging
Frequent writing of selected variables
Streamlines
Field min/max
Mass flow at patches and other operations on cell faces
Volume averaging/integration in whole domain or a cell zone

Flame center point calculation (*** swak4foam needed ***)
Panic dump (*** swak4foam needed ***)
How to add function objects?

Function objects are added by pasting the code into the functions() section of the controlDict file. For a large number of objects it is recommended to include them from separate files. This allows to keep track of the function objects in use and to comment or uncomment them easily. The function objects are executed during rum time. This on-the-fly post-processing doesn't require to keep the field data.

function objects

Probes or monitor points

Probes are the simplest way to monitor your simulation without loading the result fields. Everytime the simulation is (re)started a new time folder is generated and the probe file created.



Line sampling

Line sampling can be used to monitor velocity profiles, etc. Each written time step is saved in a new time folder. Each line and variable is saved to a separate file. If the resulting lines have missing points, the interpolation setting should be set to a simpler scheme.



Cutting plane sampling

This code writes a VTK surface file periodically into the postProcessing folder. If interpolate is set to true, the data is saved at the nodes of the surface mesh. It's stored in the cell centers otherwise. The first option looks smoother, but produces slightly larger files. The option triangulate allows to convert all surface mesh elements into triangles. A triangle surface is easier to post-process, because all elements have the same number of nodes.
It's not possible to make cuts other than planes with this function object.



Surface sampling based on patches

In many cases, the planar sampling method is unefficient due to the large number of planes needed. The sampling of a single or multiple patches (boundary conditions) might be a good alternative, especially when monitoring air foils, blades, etc. Specifying all patches will save just the outside surface of the domain.



Field averaging

Field averaging is a must in transient simulations. Here prime2Mean means the average of the squared perturbations and is related to the standard deviation. This field is usually not needed in basic simulations.
Averaging should be enabled once the simulations stabilised after the initialisation phase. New foam versions have several features to control the averaging window.



Frequent writing of selected variables

When making movies or debugging a selected variable needs to be saved on the disk with a small time step. This function object allows to do it without saving all other variables.
Be careful with the settings. You can fill up your disk within minutes!



Streamlines

This code generates stream lines during run time. Refer to the motorcycle tutorial for more information.



Field min/max

This function object allows to track the min and max values of selected variables during run time. The location where the min and max were found is returned. An abnormal behaviour of the simulation can be detected quickly.



Mass flow at patches and other operations on cell faces

OpenFoam provides a general function object to perform calculation on cell faces. These faces are commonly grouped to a patch (boundary condition) or a face zone created by the user. The operations can be various types of integration or averaging. The sumation of the flux phi on a patch will result in a mass flow rate, a value commonly monitored in transient simulations.



Volume averaging/integration in whole domain or a cell zone

This is a general function object which allows to perform a mathematical operation like average, itegration, min, max, etc on cells: the whole mesh or just a cell zone. A cell zone is a group of cells defined by the user before the simulation using topoSet.
Example applications are: integration of (local) heat release in combustion simulations, averaging in regions of interest, etc.



Flame center point calculation (*** swak4foam needed ***)

This swak4foam based object calculates the integrated heat release times coordinate product needed to track the center of a flame. To get the flame center the value needs to be divided by the total heat relese which is done as post-processing.
This function object is a generalisation of the standard foam function object for cells and faces, but with an extended set of operations. The specification of own expressions makes it very flexible, once the syntax is understood.



Panic dump (*** swak4foam needed ***)

This is a simple function object for dumping fields when some extreme conditions are reached. It's usually used for debugging diverging cases.



© 2018 OpenFoamBuilder.org