openfoam/bin
Henry Weller e4dc50dcb0 postProcessing: Replaced 'foamCalc' and the 'postCalc' utilities
with the more general and flexible 'postProcess' utility and '-postProcess' solver option

Rationale
---------

Both the 'postProcess' utility and '-postProcess' solver option use the
same extensive set of functionObjects available for data-processing
during the run avoiding the substantial code duplication necessary for
the 'foamCalc' and 'postCalc' utilities and simplifying maintenance.
Additionally consistency is guaranteed between solver data processing
and post-processing.

The functionObjects have been substantially re-written and generalized
to simplify development and encourage contribution.

Configuration
-------------

An extensive set of simple functionObject configuration files are
provided in

OpenFOAM-dev/etc/caseDicts/postProcessing

and more will be added in the future.  These can either be copied into
'<case>/system' directory and included into the 'controlDict.functions'
sub-dictionary or included directly from 'etc/caseDicts/postProcessing'
using the '#includeEtc' directive or the new and more convenient
'#includeFunc' directive which searches the
'<etc>/caseDicts/postProcessing' directories for the selected
functionObject, e.g.

functions
{
    #includeFunc Q
    #includeFunc Lambda2
}

'#includeFunc' first searches the '<case>/system' directory in case
there is a local configuration.

Description of #includeFunc
---------------------------

    Specify a functionObject dictionary file to include, expects the
    functionObject name to follow (without quotes).

    Search for functionObject dictionary file in
    user/group/shipped directories.
    The search scheme allows for version-specific and
    version-independent files using the following hierarchy:
    - \b user settings:
      - ~/.OpenFOAM/\<VERSION\>/caseDicts/postProcessing
      - ~/.OpenFOAM/caseDicts/postProcessing
    - \b group (site) settings (when $WM_PROJECT_SITE is set):
      - $WM_PROJECT_SITE/\<VERSION\>/caseDicts/postProcessing
      - $WM_PROJECT_SITE/caseDicts/postProcessing
    - \b group (site) settings (when $WM_PROJECT_SITE is not set):
      - $WM_PROJECT_INST_DIR/site/\<VERSION\>/caseDicts/postProcessing
      - $WM_PROJECT_INST_DIR/site/caseDicts/postProcessing
    - \b other (shipped) settings:
      - $WM_PROJECT_DIR/etc/caseDicts/postProcessing

    An example of the \c \#includeFunc directive:
    \verbatim
        #includeFunc <funcName>
    \endverbatim

postProcess
-----------

The 'postProcess' utility and '-postProcess' solver option provide the
same set of controls to execute functionObjects after the run either by
reading a specified set of fields to process in the case of
'postProcess' or by reading all fields and models required to start the
run in the case of '-postProcess' for each selected time:

postProcess -help

Usage: postProcess [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -constant         include the 'constant/' dir in the times list
  -dict <file>      read control dictionary from specified location
  -field <name>     specify the name of the field to be processed, e.g. U
  -fields <list>    specify a list of fields to be processed, e.g. '(U T p)' -
                    regular expressions not currently supported
  -func <name>      specify the name of the functionObject to execute, e.g. Q
  -funcs <list>     specify the names of the functionObjects to execute, e.g.
                    '(Q div(U))'
  -latestTime       select the latest time
  -newTimes         select the new times
  -noFunctionObjects
                    do not execute functionObjects
  -noZero           exclude the '0/' dir from the times list, has precedence
                    over the -withZero option
  -parallel         run in parallel
  -region <name>    specify alternative mesh region
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -time <ranges>    comma-separated time ranges - eg, ':10,20,40:70,1000:'
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

 pimpleFoam -postProcess -help

Usage: pimpleFoam [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -constant         include the 'constant/' dir in the times list
  -dict <file>      read control dictionary from specified location
  -field <name>     specify the name of the field to be processed, e.g. U
  -fields <list>    specify a list of fields to be processed, e.g. '(U T p)' -
                    regular expressions not currently supported
  -func <name>      specify the name of the functionObject to execute, e.g. Q
  -funcs <list>     specify the names of the functionObjects to execute, e.g.
                    '(Q div(U))'
  -latestTime       select the latest time
  -newTimes         select the new times
  -noFunctionObjects
                    do not execute functionObjects
  -noZero           exclude the '0/' dir from the times list, has precedence
                    over the -withZero option
  -parallel         run in parallel
  -postProcess      Execute functionObjects only
  -region <name>    specify alternative mesh region
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -time <ranges>    comma-separated time ranges - eg, ':10,20,40:70,1000:'
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

The functionObjects to execute may be specified on the command-line
using the '-func' option for a single functionObject or '-funcs' for a
list, e.g.

postProcess -func Q
postProcess -funcs '(div(U) div(phi))'

In the case of 'Q' the default field to process is 'U' which is
specified in and read from the configuration file but this may be
overridden thus:

postProcess -func 'Q(Ua)'

as is done in the example above to calculate the two forms of the divergence of
the velocity field.  Additional fields which the functionObjects may depend on
can be specified using the '-field' or '-fields' options.

The 'postProcess' utility can only be used to execute functionObjects which
process fields present in the time directories.  However, functionObjects which
depend on fields obtained from models, e.g. properties derived from turbulence
models can be executed using the '-postProcess' of the appropriate solver, e.g.

pisoFoam -postProcess -func PecletNo

or

sonicFoam -postProcess -func MachNo

In this case all required fields will have already been read so the '-field' or
'-fields' options are not be needed.

Henry G. Weller
CFD Direct Ltd.
2016-05-28 18:58:48 +01:00
..
tools functionObjects: Moved functionObjects namespace documentation into functionObject.H 2016-05-04 13:56:36 +01:00
Co postProcessing: Replaced 'foamCalc' and the 'postCalc' utilities 2016-05-28 18:58:48 +01:00
engridFoam Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
enstrophy postProcessing: Replaced 'foamCalc' and the 'postCalc' utilities 2016-05-28 18:58:48 +01:00
execFlowFunctionObjects postProcessing: Replaced 'foamCalc' and the 'postCalc' utilities 2016-05-28 18:58:48 +01:00
findEmptyMake scripts: Reformat with consistent section separators 2016-02-15 18:30:24 +00:00
flowType postProcessing: Replaced 'foamCalc' and the 'postCalc' utilities 2016-05-28 18:58:48 +01:00
foamAllHC Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
foamCalc postProcessing: Replaced 'foamCalc' and the 'postCalc' utilities 2016-05-28 18:58:48 +01:00
foamCheckJobs BUG: foamPrintJobs: handle hostnames being strings, not words 2011-11-15 15:08:30 +00:00
foamCleanPath scripts: Reformat with consistent section separators 2016-02-15 18:30:24 +00:00
foamCleanPolyMesh Rename foamClearPolyMesh -> foamCleanPolyMesh for consistency with the other foamClear.* scripts 2015-01-11 15:42:10 +00:00
foamCleanTutorials Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
foamCloneCase Script to clone an OpenFOAM case including system, constant and one time directory. 2015-05-15 10:05:45 +01:00
foamCopySettings scripts: Reformat with consistent section separators 2016-02-15 18:30:24 +00:00
foamCreateVideo foamCreateVideo: add option to specify first image number 2016-01-08 17:49:39 +00:00
foamEbrowse Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
foamEndJob BUG: foamEndJob: incorrect comment (#1435) 2014-11-10 09:55:57 +00:00
foamEtcFile foamEtcFile: Add support for openfoamdev 2015-10-26 17:35:27 +00:00
foamExec Update headers 2015-02-06 10:11:42 +00:00
foamGraphExecTime GIT: Resolve conflict 2011-08-16 16:09:56 +01:00
foamGraphResKE GIT: Resolve conflict 2011-08-16 16:09:56 +01:00
foamGraphResUVWP GIT: Resolve conflict 2011-08-16 16:09:56 +01:00
foamInstallationTest foamInstallationTest: Updated help message 2015-12-03 08:40:56 +00:00
foamJob foamJob: Add -append option to append to the log-file rather than overwriting 2015-04-27 10:25:04 +01:00
foamLog ENH: foamLog: handle variables with '.' in name 2014-03-31 09:27:42 +01:00
foamMonitor foamMonitor: change format to support old gnuplot versions 2015-12-16 20:26:25 +00:00
foamNew Update $* to "$@" 2012-10-27 21:34:09 +01:00
foamNewApp foamNewApp: script to create template for a new application 2015-12-04 14:20:23 +00:00
foamNewBC Update code to use the simpler C++11 template syntax removing spaces between closing ">"s 2016-01-10 22:41:16 +00:00
foamNewCase Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
foamNewFunctionObject etc/codeTemplates/functionObject: Updated to correspond to the new functionObject structure 2016-05-15 21:47:18 +01:00
foamNewSource STYLE: move source templates from bin/templates/ to etc/codeTemplates/ 2010-03-03 09:19:23 +01:00
foamNewTemplate STYLE: move source templates from bin/templates/ to etc/codeTemplates/ 2010-03-03 09:19:23 +01:00
foamPack ENH: foamPack: enforce presence of .build 2012-05-23 11:24:00 +01:00
foamPackBin Update header 2015-01-11 17:16:48 +00:00
foamPackBinAll Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
foamPackDoxygen Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
foamPackSource Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
foamPackThirdParty Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
foamPackThirdPartyBin ENH: update, cleanup foam packing routines 2011-01-02 21:39:41 +01:00
foamPackThirdPartyBinAll ENH: update, cleanup foam packing routines 2011-01-02 21:39:41 +01:00
foamPrintJobs BUG: foamPrintJobs: user name printing 2011-11-15 15:15:09 +00:00
foamProcessInfo Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
foamRunTutorials foamRunTutorials: Removed redundant code and simplified 2016-02-15 16:36:58 +00:00
foamSequenceVTKFiles foamSequenceVTKFiles: Avoid the -s and -a options for basename 2015-12-11 14:21:02 +00:00
foamSolverSweeps Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
foamSystemCheck Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
foamTags ENH: Added usage notes to header of foamTags script 2012-06-01 09:46:44 +01:00
foamUpdateCaseFileHeader scripts: Reformat with consistent section separators 2016-02-15 18:30:24 +00:00
Lambda2 postProcessing: Replaced 'foamCalc' and the 'postCalc' utilities 2016-05-28 18:58:48 +01:00
Mach postProcessing: Replaced 'foamCalc' and the 'postCalc' utilities 2016-05-28 18:58:48 +01:00
mpirunDebug Updated header 2015-12-11 13:12:19 +00:00
org-html promote org-mode conversion utilities from bin/tools -> bin/ 2009-12-04 10:49:04 +01:00
org-latex promote org-mode conversion utilities from bin/tools -> bin/ 2009-12-04 10:49:04 +01:00
org-pdflatex ENH: add org-pdflatex to create pdf files 2010-06-01 10:14:56 +02:00
paraFoam paraFoam: Updated instructions to build the reader modules 2016-03-16 09:24:25 +00:00
Pe postProcessing: Replaced 'foamCalc' and the 'postCalc' utilities 2016-05-28 18:58:48 +01:00
Q postProcessing: Replaced 'foamCalc' and the 'postCalc' utilities 2016-05-28 18:58:48 +01:00
rm~all Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
rmcore Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
supercededByPostProcess postProcessing: Replaced 'foamCalc' and the 'postCalc' utilities 2016-05-28 18:58:48 +01:00
vorticity postProcessing: Replaced 'foamCalc' and the 'postCalc' utilities 2016-05-28 18:58:48 +01:00