Commit Graph

68 Commits

Author SHA1 Message Date
Andrew Heather
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
Mark Olesen
1988e4bb60 STYLE: avoid backticks for getApplication 2016-06-27 17:50:55 +02:00
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
Henry Weller
83bae2efd3 functionObjects: Renamed dictionary entry 'functionObjectLibs' -> 'libs'
This changes simplifies the specification of functionObjects in
controlDict and is consistent with the 'libs' option in controlDict to
load special solver libraries.

Support for the old 'functionObjectLibs' name is supported for backward compatibility.
2016-05-16 22:09:01 +01:00
Henry Weller
6164c2f262 Standardized the naming of functions which control the writing of fields etc.
to have the prefix 'write' rather than 'output'

So outputTime() -> writeTime()

but 'outputTime()' is still supported for backward-compatibility.

Also removed the redundant secondary-writing functionality from Time
which has been superseded by the 'writeRegisteredObject' functionObject.
2016-05-12 17:38:01 +01:00
Henry Weller
c983670c91 functionObjects: Changed options 'outputControl' -> 'writeControl' and 'outputInterval' -> 'writeInterval'
for consistency with the time controls in controlDict and to avoid
unnecessary confusion.  All code and tutorials have been updated.

The old names 'outputControl' and 'outputInterval' are but supported for
backward compatibility but deprecated.
2016-05-12 11:38:11 +01:00
andy
fd9d801e2d GIT: Initial commit after latest foundation merge 2016-04-25 11:40:48 +01:00
Henry Weller
350d03246e scripts: Reformat with consistent section separators 2016-02-15 18:30:24 +00:00
Henry Weller
caf3c353d3 tutorials: Simplified the Allrun and Allclean scripts 2016-02-14 18:32:34 +00:00
Henry Weller
daf44fda3d tutorials and templates: Updated wall BC for velocity to noSlip 2016-02-09 20:08:34 +00:00
Henry Weller
451cc4e620 fieldAverage: Added periodicRestart option and rationalized naming of restart options
When restarting form a previous calculation, the averaging is continuous or
    may be restarted using the \c restartOnRestart option.

    The averaging process may be restarted after each calculation output time
    using the \c restartOnOutput option or restarted periodically using the \c
    periodicRestart option and setting \c restartPeriod to the required
    averaging period.

    Example of function object specification:
    \verbatim
    fieldAverage1
    {
        type fieldAverage;
        functionObjectLibs ("libfieldFunctionObjects.so");
        ...
        restartOnRestart  false;
        restartOnOutput   false;
        periodicRestart false;
        restartPeriod   0.002;
        fields
        (
            U
            {
                mean            on;
                prime2Mean      on;
                base            time;
                window          10.0;
                windowName      w1;
            }
            p
            {
                mean            on;
                prime2Mean      on;
                base            time;
            }
        );
    }
    \endverbatim

    \heading Function object usage
    \table
        Property        | Description           | Required    | Default value
        type            | type name: fieldAverage | yes |
        restartOnRestart  | Restart the averaging on restart | no | no
        restartOnOutput   | Restart the averaging on output | no | no
        periodicRestart | Periodically restart the averaging | no | no
        restartPeriod   | Periodic restart period | conditional |
        fields          | list of fields and averaging options | yes |
    \endtable
2016-01-30 11:23:38 +00:00
Henry Weller
b3d47f0423 bin/tools/RunFunctions: runParallel now obtains the number of processors from numberOfSubdomains
in decomposeParDict.

This default number of processors may be overridden by the new "-np"
option to runParallel which must be specified before the application
name e.g.:

runParallel -np 4 pisoFoam
2016-01-27 14:19:25 +00:00
Andrew Heather
f0c3e8d599 STYLE: Updated version to 'plus' 2015-12-22 23:14:17 +00:00
Andrew Heather
8837a89237 STYLE: Updated links from openfoam.org to openfoam.com 2015-12-09 15:03:05 +00:00
Henry Weller
37cfc3ab46 tutorials: Removed unnecessary spaces between parentheses and values in vectors 2015-07-21 20:55:44 +01:00
Henry Weller
4c21f24a8c Input of dimensionedScalars: update read-construction of dimensionedScalar in applications
so that the specification of the name and dimensions are optional in property dictionaries.

Update tutorials so that the name of the dimensionedScalar property is
no longer duplicated but optional dimensions are still provided and are
checked on read.
2015-07-20 22:52:53 +01:00
Henry Weller
0fb6a01280 fluxRequired: Added setFluxRequired function to fvSchemes class
Added calls to setFluxRequired for p, p_rgh etc. in all solvers which
avoids the need to add fluxRequired entries in fvSchemes dictionaries.
2015-07-15 21:57:16 +01:00
Henry
50ada7c994 blockMesh: Change default location of blockMeshDict from constant/polyMesh to system
For multi-region cases the default location of blockMeshDict is now system/<region name>

If the blockMeshDict is not found in system then the constant directory
is also checked providing backward-compatibility
2015-04-24 22:29:57 +01:00
Henry
41368addc9 Minor change to comment 2014-12-14 21:50:14 +00:00
OpenFOAM-admin
9fb26d59d3 GIT: Repo update 2014-12-11 08:35:10 +00:00
OpenFOAM-admin
fbb3ddf2c4 Updated for release 2.3.0 2014-02-17 10:21:46 +00:00
Henry
3f5eda25f0 symmetryPlane: add symmetryPlane as a special type of symmetry condition applied to a single plane
The standard/previous general symmetry type is now named symmetry
    both in class and lookup name for consistency.  The rigorous
    symmetryPlane type is needed for moving-mesh cases in which the
    motion it constrained by one or two planes.
2013-12-06 15:45:11 +00:00
mattijs
c4a65259ad GIT: boundary: remove usued file 2013-08-07 11:27:34 +01:00
andy
d568f1bf6e ENH: Tutorial updates 2013-05-28 17:36:10 +01:00
Henry
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
OpenFOAM-admin
c720299876 ENH: Reverted back to version dev 2011-06-17 10:08:20 +01:00
andy
29c485361a STYLE: renamed version 2.0 -> 2.0.0 2011-06-08 16:31:07 +01:00
andy
d2d91bb84f STYLE: Updated tutorial headers to version 2.0 2011-06-07 11:18:46 +01:00
Henry
b6f8897268 tutorials: Upgraded all of the blockMeshDict files to the new format
Upgraded other files as necessary for consistency with the blockMeshDict, in
particular cases with cyclic patches.
2011-05-26 12:43:16 +01:00
graham
6a96e4a326 ENH: Shorten dsmc tut. 2011-04-21 18:01:38 +01:00
graham
18c3647524 BUG: Wrong application name. 2011-04-01 15:46:52 +01:00
Henry
a93e63e7b7 tutorials: use getApplication rather than hard-coded application name 2011-03-25 12:06:18 +00:00
Henry
ee67c2640c Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev 2011-03-24 21:42:20 +00:00
Henry
e1c9f43c08 tutorials: Use getApplication to set the application rather than hard-coding it 2011-03-24 21:42:09 +00:00
graham
2fb374b61d STYLE: README for dsmcFoam cases explaining the fields. 2011-03-24 15:52:00 +00:00
Henry
0a6c711664 Tutorials: removed all references to metis to protect the innocent from persecution. 2011-01-07 12:01:08 +00:00
mattijs
65a1c94630 ENH: decomposeParDict : use scotch 2010-12-08 11:46:12 +00:00
Henry
c078ab9dee DSMC tutorials: remove temporary files 2010-10-13 17:08:10 +01:00
graham
f2842e76b9 BUG: discrete tut tweaks and fixes to make them run. 2010-10-08 20:34:59 +01:00
graham
ebb9a9e1ac ENH: tet decomposed particle tracking.
Squashed merge of particleInteractions up to
commit e7cb5bcf0315c359539ef1e715e1d51991343391
2010-09-17 16:59:17 +01:00
graham
67136c25ee STYLE: Remove tabs. 2010-07-27 12:24:27 +01:00
henry
ccfb6e32a6 Corrected headers. 2010-06-23 16:54:54 +01:00
Mark Olesen
895a077cb1 STYLE: fixup some dictionary headers 2010-05-18 11:38:07 +02:00
henry
068b6b1d14 Resolved unexpected merge problem. 2010-05-25 18:49:10 +01:00
henry
361b153343 Final iteration information now available in mesh::data (used to be mesh::fvData)
Relaxation and solution parameters for the final iteration in PIMPLE loops are
now selected according to the value of the "finalIteration" entry in the
mesh::data dictionary.

rhoPimpleFoam significantly updates and now replaces rhoPisoFoam.
2010-05-25 18:45:25 +01:00
graham
51c8c307eb ENH: Adding actve flag to dsmc binary collision submodels to allow
collision step to be skipped for the NoBinaryCollision model.
2010-05-20 17:34:01 +01:00
graham
0368f38a7c ENH. Update dsmc submodels to allow models with no coeffs dictionary.
Updated dsmc and md tuts, including new cyclic handling.
2010-05-20 16:49:03 +01:00
graham
23b5edd02d ENH: molecularDynamics now using new InteractionLists. 2010-04-29 20:14:54 +01:00
Mark Olesen
3fef72510e STYLE: use switch value for 'writeCompression' in controlDict's
- simpler/clearer to use "on/off" instead of "compressed/uncompressed"
2010-04-09 13:12:35 +02:00
Mark Olesen
10141f907b STYLE: use dict entry for function objects in controlDict 2010-04-09 12:23:25 +02:00