DispersionRASModel.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) 2011-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::DispersionRASModel
28 
29 Description
30  Base class for particle dispersion models based on RAS turbulence.
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef DispersionRASModel_H
35 #define DispersionRASModel_H
36 
37 #include "DispersionModel.H"
38 
39 
40 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
41 
42 namespace Foam
43 {
44 
45 /*---------------------------------------------------------------------------*\
46  Class DispersionRASModel Declaration
47 \*---------------------------------------------------------------------------*/
48 
49 template<class CloudType>
51 :
52  public DispersionModel<CloudType>
53 {
54 protected:
55 
56  // Protected data
57 
58  // Locally cached turbulence fields
59 
60  //- Turbulence k
62 
63  //- Turbulence epsilon
65 
66  //- Local ownership of the k field
67  mutable bool ownK_;
68 
69  //- Local ownership of the epsilon field
70  mutable bool ownEpsilon_;
71 
72 
73  // Protected Functions
74 
75  //- Return the k field from the turbulence model
77 
78  //- Return the epsilon field from the turbulence model
80 
81 
82 public:
83 
84  //- Runtime type information
85  TypeName("dispersionRASModel");
86 
87 
88  // Constructors
89 
90  //- Construct from components
92 
93  //- Construct copy
95 
96  //- Construct and return a clone
97  virtual autoPtr<DispersionModel<CloudType>> clone() const = 0;
98 
99 
100  //- Destructor
101  virtual ~DispersionRASModel();
102 
103 
104  // Member Functions
105 
106  //- Update (disperse particles)
107  virtual vector update
108  (
109  const scalar dt,
110  const label celli,
111  const vector& U,
112  const vector& Uc,
113  vector& UTurb,
114  scalar& tTurb
115  ) = 0;
116 
117  //- Cache carrier fields
118  virtual void cacheFields(const bool store);
119 
120 
121  // I-O
122 
123  //- Write
124  virtual void write(Ostream& os) const;
125 };
126 
127 
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 
130 } // End namespace Foam
131 
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 
134 #ifdef NoRepository
135  #include "DispersionRASModel.C"
136 #endif
137 
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 
140 #endif
141 
142 // ************************************************************************* //
tmp< volScalarField > kModel() const
Return the k field from the turbulence model.
const volScalarField * epsilonPtr_
Turbulence epsilon.
bool ownEpsilon_
Local ownership of the epsilon field.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual ~DispersionRASModel()
Destructor.
bool ownK_
Local ownership of the k field.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:104
const CloudType & owner() const
Return const access to the owner cloud.
const volScalarField * kPtr_
Turbulence k.
virtual autoPtr< DispersionModel< CloudType > > clone() const =0
Construct and return a clone.
virtual void cacheFields(const bool store)
Cache carrier fields.
DispersionRASModel(const dictionary &dict, CloudType &owner)
Construct from components.
virtual void write(Ostream &os) const
Write.
TypeName("dispersionRASModel")
Runtime type information.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
virtual vector update(const scalar dt, const label celli, const vector &U, const vector &Uc, vector &UTurb, scalar &tTurb)=0
Update (disperse particles)
U
Definition: pEqn.H:72
tmp< volScalarField > epsilonModel() const
Return the epsilon field from the turbulence model.
Base class for dispersion modelling.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Definition: HashPtrTable.H:48
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Base class for particle dispersion models based on RAS turbulence.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:67
Namespace for OpenFOAM.