All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
absolute.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-2019 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::absolute
26 
27 Description
28  Correction limiting method based on the absolute particle velocity.
29 
30  This method that limits the velocity correction to that of a rebound with a
31  coefficient of restitution \f$e\f$. The absolute velocity of the particle
32  is used when calculating the magnitude of the limited correction.
33  The direction is calculated using the relative velocity.
34 
35 SourceFiles
36  absolute.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef absolute_H
41 #define absolute_H
42 
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace CorrectionLimitingMethods
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class absolute Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 class absolute
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("absolute");
72 
73 
74  // Constructors
75 
76  //- Construct from components
77  absolute(const dictionary& dict);
78 
79  //- Copy constructor
80  absolute(const absolute& cl);
81 
82  //- Construct and return a clone
84  {
86  (
87  new absolute(*this)
88  );
89  }
90 
91 
92  //- Destructor
93  virtual ~absolute();
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:158
virtual vector limitedVelocity(const vector uP, const vector dU, const vector uMean) const
Return the limited velocity.
Definition: absolute.C:69
TypeName("absolute")
Runtime type information.
virtual autoPtr< CorrectionLimitingMethod > clone() const
Construct and return a clone.
Definition: absolute.H:82
scalar e_
Coefficient of restitution.
Definition: absolute.H:64
absolute(const dictionary &dict)
Construct from components.
Definition: absolute.C:46
Correction limiting method based on the absolute particle velocity.
Definition: absolute.H:55
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
Namespace for OpenFOAM.