relative.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) 2013-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::CorrectionLimitingMethods::relative
26 
27 Description
28  Correction limiting method based on the relative particle velocity.
29 
30  This method limits the velocity correction to that of a rebound with a
31  coefficient of restitution \f$e\f$. The relative velocity of the particle
32  with respect to the mean value is used to calculate the direction and
33  magnitude of the limited velocity.
34 
35 SourceFiles
36  relative.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef relative_H
41 #define relative_H
42 
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace CorrectionLimitingMethods
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class relative Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class relative
57 :
59 {
60 protected:
61 
62  // Protected data
63 
64  //- Coefficient of restitution
65  scalar e_;
66 
67 
68 public:
69 
70  //- Runtime type information
71  TypeName("relative");
72 
73 
74  // Constructors
75 
76  //- Construct from components
77  relative(const dictionary& dict);
78 
79  //- Copy constructor
80  relative(const relative& cl);
81 
82  //- Construct and return a clone
84  {
86  (
87  new relative(*this)
88  );
89  }
90 
91 
92  //- Destructor
93  virtual ~relative();
94 
95 
96  // Member Functions
97 
98  //- Return the limited velocity
99  virtual vector limitedVelocity
100  (
101  const vector uP,
102  const vector dU,
103  const vector uMean
104  ) const;
105 };
106 
107 
108 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
109 
110 } // End namespace CorrectionLimitingMethods
111 } // End namespace Foam
112 
113 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114 
115 #endif
116 
117 // ************************************************************************* //
dictionary dict
virtual vector limitedVelocity(const vector uP, const vector dU, const vector uMean) const
Return the limited velocity.
Definition: relative.C:69
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:156
Correction limiting method based on the relative particle velocity.
Definition: relative.H:55
relative(const dictionary &dict)
Construct from components.
Definition: relative.C:46
Base class for correction limiting methods.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
TypeName("relative")
Runtime type information.
scalar e_
Coefficient of restitution.
Definition: relative.H:64
virtual autoPtr< CorrectionLimitingMethod > clone() const
Construct and return a clone.
Definition: relative.H:82
Namespace for OpenFOAM.