DOC: elaborate the usage of function objects

ENH: update libs of etc/caseDicts/postProcess items
  ENH: ensure destructor=default
  ENH: ensure constness
  ENH: ensure no 'copy construct' and 'no copy assignment' exist
  TUT: add examples of function objects with full set
       of settings into a TUT if unavailable
  TUT: update pisoFoam/RAS/cavity tutorial in terms of usage
This commit is contained in:
Kutalmis Bercin
2020-03-13 18:49:58 +00:00
committed by Andrew Heather
parent b549116588
commit a5c6516e23
264 changed files with 7120 additions and 2830 deletions

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2016 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -42,13 +42,7 @@ namespace Foam
namespace functionObjects
{
defineTypeNameAndDebug(streamFunction, 0);
addToRunTimeSelectionTable
(
functionObject,
streamFunction,
dictionary
);
addToRunTimeSelectionTable(functionObject, streamFunction, dictionary);
}
}
@ -435,7 +429,7 @@ Foam::functionObjects::streamFunction::streamFunction
{
setResultName(typeName, "phi");
label nD = mesh_.nGeometricD();
const label nD = mesh_.nGeometricD();
if (nD != 2)
{
@ -446,10 +440,4 @@ Foam::functionObjects::streamFunction::streamFunction
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::functionObjects::streamFunction::~streamFunction()
{}
// ************************************************************************* //

View File

@ -6,6 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2016 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -30,12 +31,51 @@ Group
grpFieldFunctionObjects
Description
This function object calculates and outputs the stream-function as a
pointScalarField.
Computes the stream function (i.e. https://w.wiki/Ncm).
Operands:
\table
Operand | Type | Location
input | surfaceScalarField | $FOAM_CASE/\<time\>/\<inpField\>
output file | - | -
output field | pointScalarField | $FOAM_CASE/\<time\>/\<outField\>
\endtable
Usage
Minimal example by using \c system/controlDict.functions:
\verbatim
streamFunction1
{
// Mandatory entries (unmodifiable)
type streamFunction;
libs (fieldFunctionObjects);
// Optional (inherited) entries
...
}
\endverbatim
where the entries mean:
\table
Property | Description | Type | Req'd | Dflt
type | Type name: streamFunction | word | yes | -
libs | Library name: fieldFunctionObjects | word | yes | -
\endtable
The inherited entries are elaborated in:
- \link functionObject.H \endlink
- \link fieldExpression.H \endlink
Minimal example by using the \c postProcess utility:
\verbatim
postProcess -func streamFunction
\endverbatim
See also
Foam::functionObjects::fieldExpression
Foam::functionObjects::fvMeshFunctionObject
- Foam::functionObject
- Foam::functionObjects::fieldExpression
- Foam::functionObjects::fvMeshFunctionObject
- ExtendedCodeGuide::functionObjects::field::streamFunction
SourceFiles
streamFunction.C
@ -66,7 +106,8 @@ class streamFunction
{
// Private Member Functions
tmp<pointScalarField> calc(const surfaceScalarField& phi) const;
//- Return the stream function field
tmp<pointScalarField> calc(const surfaceScalarField& phi) const;
//- Calculate the stream-function and return true if successful
virtual bool calc();
@ -89,9 +130,15 @@ public:
const dictionary& dict
);
//- No copy construct
streamFunction(const streamFunction&) = delete;
//- No copy assignment
void operator=(const streamFunction&) = delete;
//- Destructor
virtual ~streamFunction();
virtual ~streamFunction() = default;
};