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 -------------------------------------------------------------------------------
11 License
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 
27 Class
28  Foam::functionObjects::enstrophy
29 
30 Group
31  grpFieldFunctionObjects
32 
33 Description
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 
52 Usage
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 
82 See also
83  - Foam::functionObject
84  - Foam::functionObjects::fvMeshFunctionObject
85  - Foam::functionObjects::fieldExpression
86  - ExtendedCodeGuide::functionObjects::field::enstrophy
87 
88 SourceFiles
89  enstrophy.C
90 
91 \*---------------------------------------------------------------------------*/
92 
93 #ifndef functionObjects_enstrophy_H
94 #define functionObjects_enstrophy_H
95 
96 #include "fieldExpression.H"
97 
98 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
99 
100 namespace Foam
101 {
102 namespace functionObjects
103 {
104 
105 /*---------------------------------------------------------------------------*\
106  Class enstrophy Declaration
107 \*---------------------------------------------------------------------------*/
108 
109 class 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 
119 public:
120 
121  //- Runtime type information
122  TypeName("enstrophy");
123 
124 
125  // Constructors
126 
127  //- Construct from Time and dictionary
128  enstrophy
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
155 
156 // ************************************************************************* //
Foam::functionObjects::enstrophy::~enstrophy
virtual ~enstrophy()=default
Destructor.
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::functionObjects::enstrophy::enstrophy
enstrophy(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
Definition: enstrophy.C:65
Foam::functionObjects::enstrophy::operator=
void operator=(const enstrophy &)=delete
No copy assignment.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::functionObject::name
const word & name() const noexcept
Return the name of this functionObject.
Definition: functionObject.C:143
Foam::functionObjects::fieldExpression
Intermediate class for handling field expression function objects (e.g. blendingFactor etc....
Definition: fieldExpression.H:120
fieldExpression.H
Foam::functionObjects::enstrophy::TypeName
TypeName("enstrophy")
Runtime type information.
Foam::functionObjects::enstrophy
Computes the enstrophy of an input volVectorField.
Definition: enstrophy.H:142