Commit graph

87 commits

Author SHA1 Message Date
Henry Weller
129532cbcf functionObjects::Q: Result field named "Q" if the field is "U" otherwise "Q(<fieldName>)" 2016-05-26 15:32:31 +01:00
Henry Weller
f4ecb2ff23 functionObjects::randomise: New functionObject to create a field with a random perturbation 2016-05-26 15:32:10 +01:00
Henry Weller
71addd7bbb functionObjects::magSqr, components: New functionObjects to calculate the 'magSqr' and 'components' of a field 2016-05-26 10:15:14 +01:00
Henry Weller
5badb830e9 functionObjects::fieldExpression: Corrected docs 2016-05-26 10:14:29 +01:00
Henry Weller
5c6a393ead functionObjects:🔍 Removed redundant warning 2016-05-26 10:14:07 +01:00
Henry Weller
640b38bbce functionObjects::blendingFactor: Removed redundant warning 2016-05-26 10:13:36 +01:00
Henry Weller
48e5817039 messageStream: Added 'Log' macro which outputs to 'Info' if 'log' is true
regionFunctionObject: moved 'log_' to public 'log' to support the 'Log' macro
2016-05-25 18:19:46 +01:00
Henry Weller
0477b8f50c regionFunctionObject: Moved the field/object maintenance functions from fvMeshFunctionObject into regionFunctionObject 2016-05-25 16:26:57 +01:00
Henry Weller
6bc00144fc functionObjects: Clear the result field from the objectRegistry if the argument fields are not available
This is needed to handle the processing of many time directories, some
of which may have the required fields and some not.
2016-05-25 15:40:58 +01:00
Henry Weller
9ef803920c functionObjects: Rationalize logging 2016-05-24 10:40:28 +01:00
Henry Weller
70ccff6840 functionObjects::surfaceInterpolateFields: Derive from fvMeshFunctionObject 2016-05-24 10:40:02 +01:00
Henry Weller
131c0eeb84 functionObjects::fieldAverage,turbulenceFields: derive from fvMeshFunctionObject 2016-05-24 09:57:41 +01:00
Henry Weller
b454b7ce43 functionObjects::regionFunctionObject: Added optional 'log' entry (defaults to true) 2016-05-24 09:03:41 +01:00
Henry Weller
aa70b282b4 functionObjects::MachNo: New functionObject to calculate the Mach number volScalarField
of a compressible single-phase flow

See tutorials/compressible/sonicFoam/laminar/forwardStep/system/controlDict
2016-05-23 21:45:41 +01:00
Henry Weller
16284bcd78 functionObjects::enstrophy: new functionObject to calculate the enstrophy of the velocity 2016-05-23 15:22:15 +01:00
Henry Weller
2b07709b74 functionObjects::flowType: new functionObject which calculates and writes the flowType of velocity field
The flow type parameter is obtained according to the following equation:
    \verbatim
                 |D| - |Omega|
        lambda = -------------
                 |D| + |Omega|

        -1 = rotational flow
         0 = simple shear flow
         1 = planar extensional flow
    \endverbatim
2016-05-23 14:59:10 +01:00
Henry Weller
2aec6916f0 functionObjects: Corrected 'grp' entries for 'field' functionObjects 2016-05-23 14:56:06 +01:00
Henry Weller
3ec4370139 functionObjects::pressure: Use the new 'tmp' 'move' constructor
to return unchanged 'tmp' arguments
2016-05-23 12:03:19 +01:00
Henry Weller
f58a48c675 functionObjects::pressureTools: simplified, standardized, rationalized and renamed 'pressure' 2016-05-22 21:29:46 +01:00
Henry Weller
2e399d34bc functionObjects: Corrected member function documentation 2016-05-22 21:28:24 +01:00
Henry Weller
d69c9e3d1a functionObjects/field: link turbulenceModel 2016-05-22 19:02:59 +01:00
Henry Weller
45e3b49c0d functionObjects::blendingFactor: simplified, standardized, rationalized 2016-05-22 16:30:48 +01:00
Henry Weller
2ff102c5db fvMeshFunctionObject: Rename 'write' -> 'writeField' to avoid clash with base-class 2016-05-22 16:30:12 +01:00
Henry Weller
a05001d87f functionObjects: Standardized field template parameter names 2016-05-22 14:29:14 +01:00
Henry Weller
df5955a8fe functionObjects/field/fieldCoordinateSystemTransform: simplified, standardized, rationalized 2016-05-22 14:26:40 +01:00
Henry Weller
d67f296265 functionObjects::Peclet -> functionObjects::PecletNo for consistency with functionObjects::CourantNo 2016-05-22 11:18:16 +01:00
Henry Weller
c5c277f5f9 functionObjects: Cleanup, reorganize and simplify 2016-05-21 23:12:12 +01:00
Henry Weller
e22c65dd8e Standardized the selection of required and optional fields in BCs, fvOptions, functionObjects etc.
In most boundary conditions, fvOptions etc. required and optional fields
to be looked-up from the objectRegistry are selected by setting the
keyword corresponding to the standard field name in the BC etc. to the
appropriate name in the objectRegistry.  Usually a default is provided
with sets the field name to the keyword name, e.g. in the
totalPressureFvPatchScalarField the velocity is selected by setting the
keyword 'U' to the appropriate name which defaults to 'U':

        Property     | Description             | Required    | Default value
        U            | velocity field name     | no          | U
        phi          | flux field name         | no          | phi
        .
        .
        .

However, in some BCs and functionObjects and many fvOptions another
convention is used in which the field name keyword is appended by 'Name'
e.g.

        Property     | Description             | Required    | Default value
        pName        | pressure field name     | no          | p
        UName        | velocity field name     | no          | U

This difference in convention is unnecessary and confusing, hinders code
and dictionary reuse and complicates code maintenance.  In this commit
the appended 'Name' is removed from the field selection keywords
standardizing OpenFOAM on the first convention above.
2016-05-21 20:28:20 +01:00
Henry Weller
c5e05bb79a functionObjects: Simplified and reorganised using the fieldExpression base-class 2016-05-21 20:10:47 +01:00
Henry Weller
6905425467 functionObjects: New abstract base-class 'fieldExpression' for simple field expression evaluation functionObjects
Updated and simplified 'div', 'grad' and 'mag' functionObjects by deriving from 'fieldExpression'.
Corrected the handling of cached gradients in 'grad'.
2016-05-21 13:58:08 +01:00
Henry Weller
4500971827 Further standardization of loop index naming: pointI -> pointi, patchI -> patchi 2016-05-18 21:20:42 +01:00
Henry Weller
aa4b93068b functionObjects: minor reformatting of output 2016-05-18 13:37:08 +01:00
Henry Weller
18725ed3ac 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
4ba3463052 functionObjects: Simply functionObjects requiring access to the fvMesh using fvMeshFunctionObject 2016-05-16 16:21:06 +01:00
Henry Weller
9353abcabe functionObjects: Added regionFunctionObject and fvMeshFunctionObject intermediate base-classes
to simplify writing common functionObjects and avoid unnecessary code duplication
2016-05-16 12:20:44 +01:00
Henry Weller
91aba2db2e functionObjects: rewritten to all be derived from 'functionObject'
- Avoids the need for the 'OutputFilterFunctionObject' wrapper
  - Time-control for execution and writing is now provided by the
    'timeControlFunctionObject' which instantiates the processing
    'functionObject' and controls its operation.
  - Alternative time-control functionObjects can now be written and
    selected at run-time without the need to compile wrapped version of
    EVERY existing functionObject which would have been required in the
    old structure.
  - The separation of 'execute' and 'write' functions is now formalized in the
    'functionObject' base-class and all derived classes implement the
    two functions.
  - Unnecessary implementations of functions with appropriate defaults
    in the 'functionObject' base-class have been removed reducing
    clutter and simplifying implementation of new functionObjects.
  - The 'coded' 'functionObject' has also been updated, simplified and tested.
  - Further simplification is now possible by creating some general
    intermediate classes derived from 'functionObject'.
2016-05-15 16:40:01 +01:00
Henry Weller
758dfc2c1f 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
71290b4d9e 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
Henry Weller
901f6cde1d functionObjects: Removed the redundant "viable" member function
Construction failure and recovery is not handled with exceptions in functionObjectList
2016-05-11 12:57:17 +01:00
Henry Weller
8663237a0f src/postProcessing/functionObjects: Removed unused IOOutputFilter clutter 2016-05-10 12:54:42 +01:00
Henry Weller
71a448d66f functionObjects: Renamed option "adjustableTime" -> "adjustableRunTime" for consistency with Time 2016-05-07 09:32:00 +01:00
Henry Weller
52e79b4703 functionObjects: Updated docs 2016-05-04 08:51:39 +01:00
Henry Weller
c8171fb1e6 functionObjects: Simplified organization and naming 2016-05-03 23:37:28 +01:00
Henry Weller
3cd9b4f5d7 Change field loop index from "fieldI" to "fieldi" 2016-05-02 18:20:48 +01:00
Henry Weller
f83975a701 functionObjects: Moved into the functionObjects namespace and rationalized and simplified failable construction
Rather than requiring each functionObject to handle failed construction
internally (using the active_ flag) the static member function "viable"
is provided which returns true if construction of the functionObject is
likely to be successful.  Failed construction is then handled by the
wrapper-class which constructs the functionObject,
e.g. "OutputFilterFunctionObject".
2016-05-02 16:28:24 +01:00
Henry Weller
66a6700a4b src/postProcessing/functionObjects: Moving the functionObjects into the "functionObjects" namespace 2016-05-01 14:48:30 +01:00
Henry Weller
fe43b80536 GeometricField: Renamed internalField() -> primitiveField() and dimensionedInternalField() -> internalField()
These new names are more consistent and logical because:

primitiveField():
primitiveFieldRef():
    Provides low-level access to the Field<Type> (primitive field)
    without dimension or mesh-consistency checking.  This should only be
    used in the low-level functions where dimensional consistency is
    ensured by careful programming and computational efficiency is
    paramount.

internalField():
internalFieldRef():
    Provides access to the DimensionedField<Type, GeoMesh> of values on
    the internal mesh-type for which the GeometricField is defined and
    supports dimension and checking and mesh-consistency checking.
2016-04-30 21:40:09 +01:00
Henry Weller
7155ef61ae functionObjectFile: Separated into functionObjectFile and functionObjectFiles
functionObjectFile provides basic directory, file and formatting functions
functionObjectFiles provides multi-file cache
2016-04-30 09:18:42 +01:00
Henry Weller
aa09dd3f7b functionObjects/field/histogram: New functionObject to write the volume-weighted histogram of a volScalarField
e.g.
    pressureHistogram
    {
        type            histogram;

        functionObjectLibs ("libfieldFunctionObjects.so");

        field           p;
        nBins           100;
        min             -5;
        max             5;
        setFormat       gnuplot;
    }
2016-04-28 20:40:32 +01:00
Henry Weller
75ea76187b GeometricField::GeometricBoundaryField -> GeometricField::Boundary
When the GeometricBoundaryField template class was originally written it
was a separate class in the Foam namespace rather than a sub-class of
GeometricField as it is now.  Without loss of clarity and simplifying
code which access the boundary field of GeometricFields it is better
that GeometricBoundaryField be renamed Boundary for consistency with the
new naming convention for the type of the dimensioned internal field:
Internal, see commit a25a449c9e

This is a very simple text substitution change which can be applied to
any code which compiles with the OpenFOAM-dev libraries.
2016-04-28 07:22:02 +01:00