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