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 | Copyright (C) 2014 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::vorticity
26 
27 Group
28  grpUtilitiesFunctionObjects
29 
30 Description
31  This function object calculates the vorticity, the curl of the velocity.
32 
33 SourceFiles
34  vorticity.C
35  IOvorticity.H
36 
37 \*---------------------------------------------------------------------------*/
38 
39 #ifndef vorticity_H
40 #define vorticity_H
41 
42 #include "volFieldsFwd.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 // Forward declaration of classes
50 class objectRegistry;
51 class dictionary;
52 class polyMesh;
53 class mapPolyMesh;
54 
55 /*---------------------------------------------------------------------------*\
56  Class vorticity Declaration
57 \*---------------------------------------------------------------------------*/
58 
59 class vorticity
60 {
61  // Private data
62 
63  //- Name of this set of vorticity objects
64  word name_;
65 
66  //- Reference to the database
67  const objectRegistry& obr_;
68 
69  //- On/off switch
70  bool active_;
71 
72  //- Name of velocity field, default is "U"
73  word UName_;
74 
75  //- Name of vorticity field
76  word outputName_;
77 
78 
79  // Private Member Functions
80 
81  //- Disallow default bitwise copy construct
82  vorticity(const vorticity&);
83 
84  //- Disallow default bitwise assignment
85  void operator=(const vorticity&);
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("vorticity");
92 
93 
94  // Constructors
95 
96  //- Construct for given objectRegistry and dictionary.
97  // Allow the possibility to load fields from files
98  vorticity
99  (
100  const word& name,
101  const objectRegistry&,
102  const dictionary&,
103  const bool loadFromFiles = false
104  );
105 
106 
107  //- Destructor
108  virtual ~vorticity();
109 
110 
111  // Member Functions
112 
113  //- Return name of the set of vorticity
114  virtual const word& name() const
115  {
116  return name_;
117  }
118 
119  //- Read the vorticity data
120  virtual void read(const dictionary&);
121 
122  //- Execute, currently does nothing
123  virtual void execute();
124 
125  //- Execute at the final time-loop, currently does nothing
126  virtual void end();
127 
128  //- Called when time was set at the end of the Time::operator++
129  virtual void timeSet();
130 
131  //- Calculate the vorticity and write
132  virtual void write();
133 
134  //- Update for changes of mesh
135  virtual void updateMesh(const mapPolyMesh&)
136  {}
137 
138  //- Update for changes of mesh
139  virtual void movePoints(const polyMesh&)
140  {}
141 };
142 
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 } // End namespace Foam
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 #endif
151 
152 // ************************************************************************* //
virtual void execute()
Execute, currently does nothing.
Definition: vorticity.C:121
virtual void timeSet()
Called when time was set at the end of the Time::operator++.
Definition: vorticity.C:147
This function object calculates the vorticity, the curl of the velocity.
Definition: vorticity.H:58
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
virtual void write()
Calculate the vorticity and write.
Definition: vorticity.C:153
A class for handling words, derived from string.
Definition: word.H:59
TypeName("vorticity")
Runtime type information.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Namespace for OpenFOAM.
virtual void updateMesh(const mapPolyMesh &)
Update for changes of mesh.
Definition: vorticity.H:134
virtual ~vorticity()
Destructor.
Definition: vorticity.C:102
virtual void read(const dictionary &)
Read the vorticity data.
Definition: vorticity.C:108
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
virtual void movePoints(const polyMesh &)
Update for changes of mesh.
Definition: vorticity.H:138
virtual void end()
Execute at the final time-loop, currently does nothing.
Definition: vorticity.C:138
Registry of regIOobjects.
virtual const word & name() const
Return name of the set of vorticity.
Definition: vorticity.H:113