Relaxation.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-2016 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::DampingModels::Relaxation
28
29Group
30 grpLagrangianIntermediateMPPICDampingSubModels
31
32Description
33 Relaxation collisional damping model.
34
35 Particle velocities are relaxed towards the local mean over a time-scale.
36
37 Reference:
38 \verbatim
39 "An improved collision damping time for MP-PIC calculations of dense
40 particle flows with applications to polydisperse sedimenting beds and
41 colliding particle jets"
42 P O'Rourke and D Snider
43 Chemical Engineering Science
44 Volume 65, Issue 22, Pages 6014-6028, November 2010
45 \endverbatim
46
47SourceFiles
48 Relaxation.C
49
50\*---------------------------------------------------------------------------*/
51
52#ifndef Relaxation_H
53#define Relaxation_H
54
55#include "DampingModel.H"
56
57// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
58
59namespace Foam
60{
61namespace DampingModels
62{
63
64/*---------------------------------------------------------------------------*\
65 Class Relaxation Declaration
66\*---------------------------------------------------------------------------*/
67
68template<class CloudType>
69class Relaxation
70:
71 public DampingModel<CloudType>
72{
73private:
74
75 // Private data
76
77 //- Velocity average
78 const AveragingMethod<vector>* uAverage_;
79
80 //- Reciprocal of the time scale average
81 autoPtr<AveragingMethod<scalar>> oneByTimeScaleAverage_;
82
83
84public:
85
86 //- Runtime type information
87 TypeName("relaxation");
88
89 // Constructors
90
91 //- Construct from components
93
94 //- Construct copy
96
97 //- Construct and return a clone
99 {
101 (
102 new Relaxation<CloudType>(*this)
103 );
104 }
105
106
107 //- Destructor
108 virtual ~Relaxation();
109
110
111 //- Member Functions
112
113 //- Calculate the damping time scales
114 virtual void cacheFields(const bool store);
115
116 //- Calculate the velocity correction
118 (
119 typename CloudType::parcelType& p,
120 const scalar deltaT
121 ) const;
122};
123
124
125// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126
127} // End namespace DampingModels
128} // End namespace Foam
129
130// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131
132#ifdef NoRepository
133 #include "Relaxation.C"
134#endif
135
136// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137
138#endif
139
140// ************************************************************************* //
Base class for lagrangian averaging methods.
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:220
Base class for collisional damping models.
Definition: DampingModel.H:66
Relaxation collisional damping model.
Definition: Relaxation.H:71
TypeName("relaxation")
Runtime type information.
virtual void cacheFields(const bool store)
Member Functions.
Definition: Relaxation.C:68
virtual vector velocityCorrection(typename CloudType::parcelType &p, const scalar deltaT) const
Calculate the velocity correction.
Definition: Relaxation.C:139
virtual autoPtr< DampingModel< CloudType > > clone() const
Construct and return a clone.
Definition: Relaxation.H:97
virtual ~Relaxation()
Destructor.
Definition: Relaxation.C:61
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
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:113
volScalarField & p
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73