RelativeVelocity.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2019-2020 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::RelativeVelocity
26 
27 Description
28  Function object which generates a lagrangian field containing the velocity
29  of each particle relative to the velocity of the surrounding fluid.
30 
31  Example usage:
32  \verbatim
33  relativeVelocity1
34  {
35  type relativeVelocity;
36  }
37  \endverbatim
38 
39 SourceFiles
40  RelativeVelocity.C
41 
42 \*---------------------------------------------------------------------------*/
43 
44 #ifndef RelativeVelocity_H
45 #define RelativeVelocity_H
46 
47 #include "CloudFunctionObject.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class RelativeVelocity Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 template<class CloudType>
59 class RelativeVelocity
60 :
61  public CloudFunctionObject<CloudType>
62 {
63 protected:
64 
65  // Protected Member Functions
66 
67  //- Write post-processing info
68  virtual void write();
69 
70 
71 public:
72 
73  //- Runtime type information
74  TypeName("relativeVelocity");
75 
76 
77  // Constructors
78 
79  //- Construct from dictionary
81  (
82  const dictionary& dict,
84  const word& modelName
85  );
86 
87  //- Construct copy
89 
90  //- Construct and return a clone
92  {
94  (
96  );
97  }
98 
99 
100  //- Destructor
101  virtual ~RelativeVelocity();
102 };
103 
104 
105 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
106 
107 } // End namespace Foam
108 
109 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
110 
111 #ifdef NoRepository
112  #include "RelativeVelocity.C"
113 #endif
114 
115 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
116 
117 #endif
118 
119 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
const word & modelName() const
Return const access to the name of the sub-model.
Definition: subModelBase.C:104
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
const CloudType & owner() const
Return const access to the owner cloud.
RelativeVelocity(const dictionary &dict, CloudType &owner, const word &modelName)
Construct from dictionary.
A class for handling words, derived from string.
Definition: word.H:59
virtual autoPtr< CloudFunctionObject< CloudType > > clone() const
Construct and return a clone.
virtual ~RelativeVelocity()
Destructor.
virtual void write()
Write post-processing info.
TypeName("relativeVelocity")
Runtime type information.
Function object which generates a lagrangian field containing the velocity of each particle relative ...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
Templated cloud function object base class.
Namespace for OpenFOAM.