Explicit.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-2018 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::PackingModels::Explicit
26 
27 Description
28  Explicit model for applying an inter-particle stress to the particles.
29 
30  The inter-particle stress is calculated using current particle locations.
31  This force is then applied only to the particles that are moving towards
32  regions of close pack. The resulting velocity change is limited using an
33  abtracted correction velocity limiter.
34 
35  Reference:
36  \verbatim
37  "An Incompressible Three-Dimensional Multiphase Particle-in-Cell Model
38  for Dense Particle Flows"
39  D Snider
40  Journal of Computational Physics
41  Volume 170, Issue 2, Pages 523-549, July 2001
42  \endverbatim
43 
44 SourceFiles
45  Explicit.C
46 
47 \*---------------------------------------------------------------------------*/
48 
49 #ifndef Explicit_H
50 #define Explicit_H
51 
52 #include "PackingModel.H"
53 
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
55 
56 namespace Foam
57 {
58 namespace PackingModels
59 {
60 
61 /*---------------------------------------------------------------------------*\
62  Class Explicit Declaration
63 \*---------------------------------------------------------------------------*/
64 
65 template<class CloudType>
66 class Explicit
67 :
68  public PackingModel<CloudType>
69 {
70 private:
71 
72  //- Private data
73 
74  //- Volume fraction average
75  const AveragingMethod<scalar>* volumeAverage_;
76 
77  //- Velocity average
78  const AveragingMethod<vector>* uAverage_;
79 
80  //- Stress average field
81  autoPtr<AveragingMethod<scalar>> stressAverage_;
82 
83  //- Correction limiter
84  autoPtr<CorrectionLimitingMethod> correctionLimiting_;
85 
86 
87 public:
88 
89  //- Runtime type information
90  TypeName("explicit");
91 
92  // Constructors
93 
94  //- Construct from components
96 
97  //- Construct copy
98  Explicit(const Explicit<CloudType>& cm);
99 
100  //- Construct and return a clone
101  virtual autoPtr<PackingModel<CloudType>> clone() const
102  {
104  (
105  new Explicit<CloudType>(*this)
106  );
107  }
108 
109 
110  //- Destructor
111  virtual ~Explicit();
112 
113 
114  // Member Functions
115 
116  //- Calculate the inter particles stresses
117  virtual void cacheFields(const bool store);
118 
119  //- Calculate the velocity correction
120  virtual vector velocityCorrection
121  (
122  typename CloudType::parcelType& p,
123  const scalar deltaT
124  ) const;
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace PackingModels
131 } // End namespace Foam
132 
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
134 
135 #ifdef NoRepository
136  #include "Explicit.C"
137 #endif
138 
139 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
140 
141 #endif
142 
143 // ************************************************************************* //
TypeName("explicit")
Runtime type information.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual vector velocityCorrection(typename CloudType::parcelType &p, const scalar deltaT) const
Calculate the velocity correction.
Definition: Explicit.C:141
Base class for packing models.
Definition: MPPICCloud.H:53
virtual autoPtr< PackingModel< CloudType > > clone() const
Construct and return a clone.
Definition: Explicit.H:100
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.
Explicit model for applying an inter-particle stress to the particles.
Definition: Explicit.H:65
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:218
Explicit(const dictionary &dict, CloudType &owner)
Construct from components.
Definition: Explicit.C:32
virtual ~Explicit()
Destructor.
Definition: Explicit.C:67
virtual void cacheFields(const bool store)
Calculate the inter particles stresses.
Definition: Explicit.C:74
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
volScalarField & p
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:69
Namespace for OpenFOAM.