Loading...
Searching...
No Matches
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-------------------------------------------------------------------------------
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::vorticity
29
30Group
31 grpFieldFunctionObjects
32
33Description
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 | <time>/inputField
50 output file | - | -
51 output field | volVectorField | <time>/outputField
52 \endtable
53
54Usage
55 Minimal example by using \c system/controlDict.functions:
56 \verbatim
57 vorticityFO
58 {
59 // Mandatory entries
60 type vorticity;
61 libs (fieldFunctionObjects);
62
63 // Inherited entries
64 ...
65 }
66 \endverbatim
67
68 where the entries mean:
69 \table
70 Property | Description | Type | Reqd | Deflt
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 fieldExpression.H \endlink
77
78SourceFiles
79 vorticity.C
80
81\*---------------------------------------------------------------------------*/
82
83#ifndef Foam_functionObjects_vorticity_H
84#define Foam_functionObjects_vorticity_H
85
86#include "fieldExpression.H"
87
88// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
89
90namespace Foam
91{
92namespace functionObjects
93{
94
95/*---------------------------------------------------------------------------*\
96 Class vorticity Declaration
97\*---------------------------------------------------------------------------*/
98
99class vorticity
100:
101 public fieldExpression
102{
103 // Private Member Functions
104
105 //- Calculate the vorticity field and return true if successful
106 virtual bool calc();
107
108
109public:
110
111 //- Runtime type information
112 TypeName("vorticity");
113
114
115 // Constructors
116
117 //- Construct from name, Time and dictionary
119 (
120 const word& name,
121 const Time& runTime,
122 const dictionary& dict
123 );
124
125 //- No copy construct
126 vorticity(const vorticity&) = delete;
127
128 //- No copy assignment
129 void operator=(const vorticity&) = delete;
130
131
132 //- Destructor
133 virtual ~vorticity() = default;
134};
135
137// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138
139} // End namespace functionObjects
140} // End namespace Foam
141
142// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143
144#endif
145
146// ************************************************************************* //
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 vorticity, the curl of the velocity.
Definition vorticity.H:139
void operator=(const vorticity &)=delete
No copy assignment.
TypeName("vorticity")
Runtime type information.
virtual ~vorticity()=default
Destructor.
vorticity(const vorticity &)=delete
No copy construct.
vorticity(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, Time and dictionary.
Definition vorticity.C:58
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