relative.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 | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2013-2014 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
11 This file is part of OpenFOAM.
12
13 OpenFOAM is free software: you can redistribute it and/or modify it
14 under the terms of the GNU General Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25
26Class
27 Foam::CorrectionLimitingMethods::relative
28
29Group
30 grpLagrangianIntermediateMPPICCorrectionLimitingMethods
31
32Description
33 Correction limiting method based on the relative particle velocity.
34
35 This method limits the velocity correction to that of a rebound with a
36 coefficient of restitution \f$e\f$. The relative velocity of the particle
37 with respect to the mean value is used to calculate the direction and
38 magnitude of the limited velocity.
39
40SourceFiles
41 relative.C
42
43\*---------------------------------------------------------------------------*/
44
45#ifndef relative_H
46#define relative_H
47
49
50// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51
52namespace Foam
53{
54namespace CorrectionLimitingMethods
55{
56
57/*---------------------------------------------------------------------------*\
58 Class relative Declaration
59\*---------------------------------------------------------------------------*/
61class relative
62:
64{
65protected:
66
67 // Protected data
68
69 //- Coefficient of restitution
70 scalar e_;
71
72
73public:
74
75 //- Runtime type information
76 TypeName("relative");
77
78
79 // Constructors
80
81 //- Construct from components
82 relative(const dictionary& dict);
83
84 //- Construct as copy
85 relative(const relative& cl);
86
87 //- Construct and return a clone
89 {
91 (
92 new relative(*this)
93 );
94 }
95
96
97 //- Destructor
98 virtual ~relative();
99
100
101 // Member Functions
102
103 //- Return the limited velocity
104 virtual vector limitedVelocity
105 (
106 const vector uP,
107 const vector dU,
108 const vector uMean
109 ) const;
110};
111
112
113// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
114
115} // End namespace CorrectionLimitingMethods
116} // End namespace Foam
117
118// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
119
120#endif
121
122// ************************************************************************* //
Base class for correction limiting methods.
Correction limiting method based on the relative particle velocity.
Definition: relative.H:63
scalar e_
Coefficient of restitution.
Definition: relative.H:69
virtual autoPtr< CorrectionLimitingMethod > clone() const
Construct and return a clone.
Definition: relative.H:87
TypeName("relative")
Runtime type information.
virtual vector limitedVelocity(const vector uP, const vector dU, const vector uMean) const
Return the limited velocity.
Definition: relative.C:71
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73