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-------------------------------------------------------------------------------
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::PackingModels::Explicit
28
29Group
30 grpLagrangianIntermediateMPPICPackingSubModels
31
32Description
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
49SourceFiles
50 Explicit.C
51
52\*---------------------------------------------------------------------------*/
53
54#ifndef Explicit_H
55#define Explicit_H
56
57#include "PackingModel.H"
58
59// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
60
61namespace Foam
63namespace PackingModels
64{
65
66/*---------------------------------------------------------------------------*\
67 Class Explicit Declaration
68\*---------------------------------------------------------------------------*/
69
70template<class CloudType>
71class Explicit
72:
73 public PackingModel<CloudType>
74{
75private:
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
92public:
93
94 //- Runtime type information
95 TypeName("explicit");
96
97 // Constructors
98
99 //- Construct from components
101
102 //- Construct copy
103 Explicit(const Explicit<CloudType>& cm);
104
105 //- Construct and return a clone
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
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// ************************************************************************* //
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 packing models.
Definition: PackingModel.H:71
Explicit model for applying an inter-particle stress to the particles.
Definition: Explicit.H:73
TypeName("explicit")
Runtime type information.
virtual ~Explicit()
Destructor.
Definition: Explicit.C:70
virtual autoPtr< PackingModel< CloudType > > clone() const
Construct and return a clone.
Definition: Explicit.H:105
virtual void cacheFields(const bool store)
Calculate the inter particles stresses.
Definition: Explicit.C:77
virtual vector velocityCorrection(typename CloudType::parcelType &p, const scalar deltaT) const
Calculate the velocity correction.
Definition: Explicit.C:144
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