flowType.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::flowType
29
30Group
31 grpFieldFunctionObjects
32
33Description
34 Computes the flow type indicator of an input velocity field.
35
36 The flow type indicator is obtained according to the following equation:
37 \f[
38 \lambda = \frac{|D| - |\omega|}{|D| + |\omega|}
39 \f]
40
41 where
42 \vartable
43 \lambda | Flow type indicator
44 D | Symmetric part of the gradient tensor of velocity
45 \omega | Skew-symmetric part of the gradient tensor of velocity
46 \endvartable
47
48 The flow type indicator values mean:
49 \verbatim
50 -1 = rotational flow
51 0 = simple shear flow
52 1 = planar extensional flow
53 \endverbatim
54
55 Operands:
56 \table
57 Operand | Type | Location
58 input | volVectorField | $FOAM_CASE/<time>/<inpField>
59 output file | - | -
60 output field | volScalarField | $FOAM_CASE/<time>/<outField>
61 \endtable
62
63Usage
64 Minimal example by using \c system/controlDict.functions:
65 \verbatim
66 flowType1
67 {
68 // Mandatory entries (unmodifiable)
69 type flowType;
70 libs (fieldFunctionObjects);
71
72 // Optional (inherited) entries
73 ...
74 }
75 \endverbatim
76
77 where the entries mean:
78 \table
79 Property | Description | Type | Req'd | Dflt
80 type | Type name: flowType | word | yes | -
81 libs | Library name: fieldFunctionObjects | word | yes | -
82 \endtable
83
84 The inherited entries are elaborated in:
85 - \link functionObject.H \endlink
86 - \link fieldExpression.H \endlink
87
88 Minimal example by using the \c postProcess utility:
89 \verbatim
90 postProcess -func flowType
91 \endverbatim
92
93See also
94 - Foam::functionObject
95 - Foam::functionObjects::fieldExpression
96 - Foam::functionObjects::fvMeshFunctionObject
97 - ExtendedCodeGuide::functionObjects::field::flowType
98
99SourceFiles
100 flowType.C
101
102\*---------------------------------------------------------------------------*/
103
104#ifndef functionObjects_flowType_H
105#define functionObjects_flowType_H
106
107#include "fieldExpression.H"
108
109// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110
111namespace Foam
112{
113namespace functionObjects
114{
115
116/*---------------------------------------------------------------------------*\
117 Class flowType Declaration
118\*---------------------------------------------------------------------------*/
119
120class flowType
121:
122 public fieldExpression
123{
124 // Private Member Functions
125
126 //- Calculate the flowType field and return true if successful
127 virtual bool calc();
128
129
130public:
131
132 //- Runtime type information
133 TypeName("flowType");
134
135
136 // Constructors
137
138 //- Construct from Time and dictionary
140 (
141 const word& name,
142 const Time& runTime,
143 const dictionary& dict
144 );
145
146 //- No copy construct
147 flowType(const flowType&) = delete;
148
149 //- No copy assignment
150 void operator=(const flowType&) = delete;
151
152
153 //- Destructor
154 virtual ~flowType() = default;
155};
156
157
158// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159
160} // End namespace functionObjects
161} // End namespace Foam
162
163// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164
165#endif
166
167// ************************************************************************* //
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:80
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
const word & name() const noexcept
Return the name of this functionObject.
Intermediate class for handling field expression function objects (e.g. blendingFactor etc....
Computes the flow type indicator of an input velocity field.
Definition: flowType.H:168
flowType(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: flowType.C:79
void operator=(const flowType &)=delete
No copy assignment.
flowType(const flowType &)=delete
No copy construct.
TypeName("flowType")
Runtime type information.
virtual ~flowType()=default
Destructor.
A class for handling words, derived from Foam::string.
Definition: word.H:68
engineTime & runTime
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73