Implicit.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-2015 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::Implicit
26 
27 Description
28  Implicit model for applying an inter-particle stress to the particles.
29 
30  The time evolution of particulate volume fraction is solved for implicitly
31  on the eulerian mesh. The computed flux is then applied to the lagrangian
32  field. The gravity force can optionally be applied to the particles as part
33  of this model, using the keyword "applyGravity".
34 
35 SourceFiles
36  Implicit.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef Implicit_H
41 #define Implicit_H
42 
43 #include "PackingModel.H"
44 
45 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46 
47 namespace Foam
48 {
49 namespace PackingModels
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class Implicit Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class CloudType>
57 class Implicit
58 :
59  public PackingModel<CloudType>
60 {
61 private:
62 
63  //- Private data
64 
65  //- Volume fraction field
67 
68  //- Correction flux
70 
71  //- Correction cell-centred velocity
73 
74  //- Flag to indicate whether gravity is applied
76 
77  //- Minimum stable volume fraction
78  scalar alphaMin_;
79 
80  //- Minimum stable density
81  scalar rhoMin_;
82 
83 
84 public:
85 
86  //- Runtime type information
87  TypeName("implicit");
88 
89  // Constructors
90 
91  //- Construct from components
92  Implicit(const dictionary& dict, CloudType& owner);
93 
94  //- Construct copy
95  Implicit(const Implicit<CloudType>& cm);
96 
97  //- Construct and return a clone
98  virtual autoPtr<PackingModel<CloudType> > clone() const
99  {
101  (
102  new Implicit<CloudType>(*this)
103  );
104  }
105 
106 
107  //- Destructor
108  virtual ~Implicit();
109 
110 
111  // Member Functions
112 
113  //- Calculate the inter particles stresses
114  virtual void cacheFields(const bool store);
115 
116  //- Calculate the velocity correction
117  virtual vector velocityCorrection
118  (
119  typename CloudType::parcelType& p,
120  const scalar deltaT
121  ) const;
122 };
123 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace PackingModels
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #ifdef NoRepository
133 # include "Implicit.C"
134 #endif
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #endif
139 
140 // ************************************************************************* //
Implicit.C
Foam::Switch
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Definition: Switch.H:60
Foam::PackingModels::Implicit::phiCorrect_
tmp< surfaceScalarField > phiCorrect_
Correction flux.
Definition: Implicit.H:68
p
p
Definition: pEqn.H:62
Foam::PackingModels::Implicit::alphaMin_
scalar alphaMin_
Minimum stable volume fraction.
Definition: Implicit.H:77
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::PackingModels::Implicit::~Implicit
virtual ~Implicit()
Destructor.
Definition: Implicit.C:80
Foam::PackingModels::Implicit::cacheFields
virtual void cacheFields(const bool store)
Calculate the inter particles stresses.
Definition: Implicit.C:87
Foam::PackingModels::Implicit::velocityCorrection
virtual vector velocityCorrection(typename CloudType::parcelType &p, const scalar deltaT) const
Calculate the velocity correction.
Definition: Implicit.C:249
Foam::PackingModels::Implicit::alpha_
volScalarField alpha_
Private data.
Definition: Implicit.H:65
Foam::PackingModels::Implicit::TypeName
TypeName("implicit")
Runtime type information.
Foam::PackingModels::Implicit::clone
virtual autoPtr< PackingModel< CloudType > > clone() const
Construct and return a clone.
Definition: Implicit.H:97
Foam::DSMCCloud
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:68
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::Implicit::rhoMin_
scalar rhoMin_
Minimum stable density.
Definition: Implicit.H:80
Foam::PackingModels::Implicit::Implicit
Implicit(const dictionary &dict, CloudType &owner)
Construct from components.
Definition: Implicit.C:38
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::Vector< scalar >
Foam::PackingModels::Implicit
Implicit model for applying an inter-particle stress to the particles.
Definition: Implicit.H:56
Foam::DSMCCloud::parcelType
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:217
Foam::PackingModels::Implicit::applyGravity_
Switch applyGravity_
Flag to indicate whether gravity is applied.
Definition: Implicit.H:74
Foam::GeometricField
Generic GeometricField class.
Definition: surfaceFieldsFwd.H:52
Foam::PackingModels::Implicit::uCorrect_
tmp< volVectorField > uCorrect_
Correction cell-centred velocity.
Definition: Implicit.H:71