Explicit.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 | Copyright (C) 2013 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
76 
77  //- Velocity average
79 
80  //- Stress average field
82 
83  //- Correction limiter
85 
86 
87 public:
88 
89  //- Runtime type information
90  TypeName("explicit");
91 
92  // Constructors
93 
94  //- Construct from components
95  Explicit(const dictionary& dict, CloudType& owner);
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 // ************************************************************************* //
Foam::AveragingMethod< scalar >
Foam::PackingModels::Explicit::cacheFields
virtual void cacheFields(const bool store)
Calculate the inter particles stresses.
Definition: Explicit.C:74
Foam::PackingModels::Explicit::clone
virtual autoPtr< PackingModel< CloudType > > clone() const
Construct and return a clone.
Definition: Explicit.H:100
p
p
Definition: pEqn.H:62
Foam::PackingModels::Explicit
Explicit model for applying an inter-particle stress to the particles.
Definition: Explicit.H:65
Foam::PackingModels::Explicit::stressAverage_
autoPtr< AveragingMethod< scalar > > stressAverage_
Stress average field.
Definition: Explicit.H:80
Explicit.C
Foam::PackingModels::Explicit::correctionLimiting_
autoPtr< CorrectionLimitingMethod > correctionLimiting_
Correction limiter.
Definition: Explicit.H:83
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:68
Foam::PackingModels::Explicit::~Explicit
virtual ~Explicit()
Destructor.
Definition: Explicit.C:67
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::PackingModel
Base class for packing models.
Definition: MPPICCloud.H:53
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::PackingModels::Explicit::velocityCorrection
virtual vector velocityCorrection(typename CloudType::parcelType &p, const scalar deltaT) const
Calculate the velocity correction.
Definition: Explicit.C:141
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
PackingModel.H
Foam::PackingModels::Explicit::Explicit
Explicit(const dictionary &dict, CloudType &owner)
Construct from components.
Definition: Explicit.C:32
Foam::Vector< scalar >
Foam::DSMCCloud::parcelType
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:217
Foam::PackingModels::Explicit::volumeAverage_
const AveragingMethod< scalar > * volumeAverage_
Private data.
Definition: Explicit.H:74
Foam::PackingModels::Explicit::uAverage_
const AveragingMethod< vector > * uAverage_
Velocity average.
Definition: Explicit.H:77
Foam::PackingModels::Explicit::TypeName
TypeName("explicit")
Runtime type information.