Peclet.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) 2013 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::Peclet
26 
27 Group
28  grpUtilitiesFunctionObjects
29 
30 Description
31  This function object calculates and outputs the Peclet number as a
32  surfaceScalarField.
33 
34 SourceFiles
35  Peclet.C
36  IOPeclet.H
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef Peclet_H
41 #define Peclet_H
42 
43 #include "volFieldsFwd.H"
44 #include "surfaceFieldsFwd.H"
45 #include "OFstream.H"
46 #include "Switch.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 // Forward declaration of classes
54 class objectRegistry;
55 class dictionary;
56 class polyMesh;
57 class mapPolyMesh;
58 
59 /*---------------------------------------------------------------------------*\
60  Class Peclet Declaration
61 \*---------------------------------------------------------------------------*/
62 
63 class Peclet
64 {
65  // Private data
66 
67  //- Name of this set of Peclet objects
68  word name_;
69 
70  //- Reference to the database
71  const objectRegistry& obr_;
72 
73  //- On/off switch
74  bool active_;
75 
76  //- Name of flux field, default is "phi"
77  word phiName_;
78 
79  //- Name of density field (compressible cases only), default is "rho"
80  word rhoName_;
81 
82 
83  // Private Member Functions
84 
85  //- Disallow default bitwise copy construct
86  Peclet(const Peclet&);
87 
88  //- Disallow default bitwise assignment
89  void operator=(const Peclet&);
90 
91 
92 public:
93 
94  //- Runtime type information
95  TypeName("Peclet");
96 
97 
98  // Constructors
99 
100  //- Construct for given objectRegistry and dictionary.
101  // Allow the possibility to load fields from files
102  Peclet
103  (
104  const word& name,
105  const objectRegistry&,
106  const dictionary&,
107  const bool loadFromFiles = false
108  );
109 
110 
111  //- Destructor
112  virtual ~Peclet();
113 
114 
115  // Member Functions
116 
117  //- Return name of the set of Peclet
118  virtual const word& name() const
119  {
120  return name_;
121  }
122 
123  //- Read the Peclet data
124  virtual void read(const dictionary&);
125 
126  //- Execute, currently does nothing
127  virtual void execute();
128 
129  //- Execute at the final time-loop, currently does nothing
130  virtual void end();
131 
132  //- Called when time was set at the end of the Time::operator++
133  virtual void timeSet();
134 
135  //- Calculate the Peclet and write
136  virtual void write();
137 
138  //- Update for changes of mesh
139  virtual void updateMesh(const mapPolyMesh&)
140  {}
141 
142  //- Update for changes of mesh
143  virtual void movePoints(const polyMesh&)
144  {}
145 };
146 
147 
148 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
149 
150 } // End namespace Foam
151 
152 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
153 
154 #endif
155 
156 // ************************************************************************* //
This function object calculates and outputs the Peclet number as a surfaceScalarField.
Definition: Peclet.H:62
virtual void read(const dictionary &)
Read the Peclet data.
Definition: Peclet.C:111
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
virtual void timeSet()
Called when time was set at the end of the Time::operator++.
Definition: Peclet.C:215
A class for handling words, derived from string.
Definition: word.H:59
virtual void end()
Execute at the final time-loop, currently does nothing.
Definition: Peclet.C:207
virtual void write()
Calculate the Peclet and write.
Definition: Peclet.C:221
virtual ~Peclet()
Destructor.
Definition: Peclet.C:105
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Namespace for OpenFOAM.
virtual const word & name() const
Return name of the set of Peclet.
Definition: Peclet.H:117
virtual void execute()
Execute, currently does nothing.
Definition: Peclet.C:121
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:74
virtual void updateMesh(const mapPolyMesh &)
Update for changes of mesh.
Definition: Peclet.H:138
Registry of regIOobjects.
virtual void movePoints(const polyMesh &)
Update for changes of mesh.
Definition: Peclet.H:142
TypeName("Peclet")
Runtime type information.