OpenFOAM® v2.3.0: Pre-Processing

OpenFOAM® v2.3.0: Pre-Processing

17th February 2014

Field Mapping

The mapFields utility has been re-written to enable parallel operation and a mapping mode has been introduced which can be specified using the -mapMethod command line option. The mapping mode can be:

  • direct: the meshes are assumed to be of identical topology, with one-to-one correspondence between cells, but perhaps with different addressing, e.g. order of points, faces, cells; mapping is volume conservative
  • mapNearest: cell values on the new mesh are sampled based on the nearest cell to the source mesh; not volume conservative
  • cellVolumeWeight (default): volume weighted for internal cells, using face area weight AMI for boundaries.

Source code
mapFields $FOAM_UTILITIES/preProcessing/mapFields

Dictionary Macro Expansion

OpenFOAM dictionary files include a macro syntax (variables preceded by $) to allow convenient configuration of case files. The capability of macro expansion was extended in v2.2.0. In v2.3.0, it has been further extended so that keywords in dictionaries can now be expanded from macros, e.g. 

inletName inlet;

boundaryField
{
    $inletName
    {
        type        fixedValue;
        value       uniform (1 0 0);
    }
}

Patch Groups

OpenFOAM supports the concept of patchGroups to allow users to group patches for pre- and post-processing, introduced in v2.2.0. Some additional changes have been made to formalise this functionality. Firstly, all patches of wall geometry type, are now grouped by default into a patchGroup named wall.

Secondly, the rules for setting patch fields, i.e. boundary conditions, in an input field file are:

  1. an exact match of a patch name, e.g. inlet, takes precedence; followed by,
  2. a match with a patchGroup, e.g. inletPatches; followed by,
  3. regular expressions, e.g. "inlet.*".

Wherever there are matches with multiple patchGroup names or multiple regular expression entries, the last name or entry in the file takes precedence.