Loading...
Searching...
No Matches
streamFunction.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2016 OpenFOAM Foundation
9 Copyright (C) 2020 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27Class
28 Foam::functionObjects::streamFunction
29
30Group
31 grpFieldFunctionObjects
32
33Description
34 Computes the stream function (i.e. https://w.wiki/Ncm).
35
36 Operands:
37 \table
38 Operand | Type | Location
39 input | surfaceScalarField | <time>/inputField
40 output file | - | -
41 output field | pointScalarField | <time>/outputField
42 \endtable
43
44Usage
45 Minimal example by using \c system/controlDict.functions:
46 \verbatim
47 streamFunctionFO
48 {
49 // Mandatory entries
50 type streamFunction;
51 libs (fieldFunctionObjects);
52
53 // Inherited entries
54 ...
55 }
56 \endverbatim
57
58 where the entries mean:
59 \table
60 Property | Description | Type | Reqd | Deflt
61 type | Type name: streamFunction | word | yes | -
62 libs | Library name: fieldFunctionObjects | word | yes | -
63 \endtable
64
65 The inherited entries are elaborated in:
66 - \link fieldExpression.H \endlink
67
68SourceFiles
69 streamFunction.C
70
71\*---------------------------------------------------------------------------*/
72
73#ifndef Foam_functionObjects_streamFunction_H
74#define Foam_functionObjects_streamFunction_H
75
76#include "fieldExpression.H"
77#include "surfaceFieldsFwd.H"
78#include "pointFieldsFwd.H"
79
80// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
81
82namespace Foam
83{
84namespace functionObjects
85{
86
87/*---------------------------------------------------------------------------*\
88 Class streamFunction Declaration
89\*---------------------------------------------------------------------------*/
90
92:
93 public fieldExpression
94{
95 // Private Member Functions
96
97 //- Return the stream function field
98 tmp<pointScalarField> calc(const surfaceScalarField& phi) const;
99
100 //- Calculate the stream-function and return true if successful
101 virtual bool calc();
102
103
104public:
105
106 //- Runtime type information
107 TypeName("streamFunction");
108
109
110 // Constructors
111
112 //- Construct for given objectRegistry and dictionary.
113 // Allow the possibility to load fields from files
115 (
116 const word& name,
117 const Time& runTime,
118 const dictionary& dict
119 );
121 //- No copy construct
122 streamFunction(const streamFunction&) = delete;
123
124 //- No copy assignment
125 void operator=(const streamFunction&) = delete;
126
127
128 //- Destructor
129 virtual ~streamFunction() = default;
130};
131
132
133// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134
135} // End namespace functionObjects
136} // End namespace Foam
137
138// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139
140#endif
141
142// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition Time.H:75
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
const word & name() const noexcept
Return the name of this functionObject.
Intermediate class for handling field expression function objects (e.g. blendingFactor etc....
fieldExpression(const word &name, const Time &runTime, const dictionary &dict, const word &fieldName=word::null, const word &resultName=word::null)
Construct from name, Time and dictionary.
virtual bool calc()=0
Calculate the components of the field and return true if successful.
Computes the stream function (i.e. https://w.wiki/Ncm).
virtual ~streamFunction()=default
Destructor.
streamFunction(const word &name, const Time &runTime, const dictionary &dict)
Construct for given objectRegistry and dictionary.
void operator=(const streamFunction &)=delete
No copy assignment.
streamFunction(const streamFunction &)=delete
No copy construct.
TypeName("streamFunction")
Runtime type information.
A class for managing temporary objects.
Definition tmp.H:75
A class for handling words, derived from Foam::string.
Definition word.H:66
engineTime & runTime
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
Namespace for OpenFOAM.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
Forwards and collection of common point field types.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68