Loading...
Searching...
No Matches
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 | <time>/inputField
59 output file | - | -
60 output field | volScalarField | <time>/outputField
61 \endtable
62
63Usage
64 Minimal example by using \c system/controlDict.functions:
65 \verbatim
66 flowTypeFO
67 {
68 // Mandatory entries
69 type flowType;
70 libs (fieldFunctionObjects);
71
72 // Inherited entries
73 ...
74 }
75 \endverbatim
76
77 where the entries mean:
78 \table
79 Property | Description | Type | Reqd | Deflt
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 fieldExpression.H \endlink
86
87SourceFiles
88 flowType.C
89
90\*---------------------------------------------------------------------------*/
91
92#ifndef Foam_functionObjects_flowType_H
93#define Foam_functionObjects_flowType_H
94
95#include "fieldExpression.H"
96
97// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
98
99namespace Foam
100{
101namespace functionObjects
102{
103
104/*---------------------------------------------------------------------------*\
105 Class flowType Declaration
106\*---------------------------------------------------------------------------*/
107
108class flowType
109:
110 public fieldExpression
111{
112 // Private Member Functions
113
114 //- Calculate the flowType field and return true if successful
115 virtual bool calc();
116
117
118public:
119
120 //- Runtime type information
121 TypeName("flowType");
122
123
124 // Constructors
125
126 //- Construct from name, Time and dictionary
128 (
129 const word& name,
130 const Time& runTime,
131 const dictionary& dict
132 );
133
134 //- No copy construct
135 flowType(const flowType&) = delete;
136
137 //- No copy assignment
138 void operator=(const flowType&) = delete;
139
140
141 //- Destructor
142 virtual ~flowType() = default;
143};
144
145
146// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
147
148} // End namespace functionObjects
149} // End namespace Foam
150
151// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152
153#endif
154
155// ************************************************************************* //
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 flow type indicator of an input velocity field.
Definition flowType.H:152
flowType(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, Time and dictionary.
Definition flowType.C:72
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:66
engineTime & runTime
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
Namespace for OpenFOAM.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68