enstrophy.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::enstrophy
29
30Group
31 grpFieldFunctionObjects
32
33Description
34 Computes the enstrophy of an input \c volVectorField.
35
36 Enstrophy, i.e. \f$\xi\f$:
37
38 \f[
39 \xi = 0.5 mag(\nabla \times \vec U )^2
40 \f]
41
42 where \f$\vec U\f$ is the input \c volVectorField.
43
44 Operands:
45 \table
46 Operand | Type | Location
47 input | volVectorField | $FOAM_CASE/<time>/<inpField>
48 output file | - | -
49 output field | volScalarField | $FOAM_CASE/<time>/<outField>
50 \endtable
51
52Usage
53 Minimal example by using \c system/controlDict.functions:
54 \verbatim
55 enstrophy1
56 {
57 // Mandatory entries (unmodifiable)
58 type enstrophy;
59 libs (fieldFunctionObjects);
60
61 // Optional (inherited) entries
62 ...
63 }
64 \endverbatim
65
66 where the entries mean:
67 \table
68 Property | Description | Type | Req'd | Dflt
69 type | Type name: enstrophy | word | yes | -
70 libs | Library name: fieldFunctionObjects | word | yes | -
71 \endtable
72
73 The inherited entries are elaborated in:
74 - \link functionObject.H \endlink
75 - \link fieldExpression.H \endlink
76
77 Minimal example by using the \c postProcess utility:
78 \verbatim
79 postProcess -func enstrophy
80 \endverbatim
81
82See also
83 - Foam::functionObject
84 - Foam::functionObjects::fvMeshFunctionObject
85 - Foam::functionObjects::fieldExpression
86 - ExtendedCodeGuide::functionObjects::field::enstrophy
87
88SourceFiles
89 enstrophy.C
90
91\*---------------------------------------------------------------------------*/
92
93#ifndef functionObjects_enstrophy_H
94#define functionObjects_enstrophy_H
95
96#include "fieldExpression.H"
97
98// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
99
100namespace Foam
101{
102namespace functionObjects
103{
104
105/*---------------------------------------------------------------------------*\
106 Class enstrophy Declaration
107\*---------------------------------------------------------------------------*/
108
109class enstrophy
110:
111 public fieldExpression
112{
113 // Private Member Functions
114
115 //- Calculate the enstrophy field and return true if successful
116 virtual bool calc();
117
118
119public:
120
121 //- Runtime type information
122 TypeName("enstrophy");
123
124
125 // Constructors
126
127 //- Construct from Time and dictionary
129 (
130 const word& name,
131 const Time& runTime,
132 const dictionary& dict
133 );
134
135 //- No copy construct
136 enstrophy(const enstrophy&) = delete;
137
138 //- No copy assignment
139 void operator=(const enstrophy&) = delete;
140
141
142 //- Destructor
143 virtual ~enstrophy() = default;
144};
145
146
147// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148
149} // End namespace functionObjects
150} // End namespace Foam
151
152// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153
154#endif
156// ************************************************************************* //
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.
Computes the enstrophy of an input volVectorField.
Definition: enstrophy.H:145
enstrophy(const enstrophy &)=delete
No copy construct.
TypeName("enstrophy")
Runtime type information.
enstrophy(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: enstrophy.C:65
void operator=(const enstrophy &)=delete
No copy assignment.
virtual ~enstrophy()=default
Destructor.
Intermediate class for handling field expression function objects (e.g. blendingFactor etc....
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