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