DispersionRASModel.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2018 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::DispersionRASModel
26 
27 Description
28  Base class for particle dispersion models based on RAS turbulence.
29 
30 \*---------------------------------------------------------------------------*/
31 
32 #ifndef DispersionRASModel_H
33 #define DispersionRASModel_H
34 
35 #include "DispersionModel.H"
36 
37 
38 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
39 
40 namespace Foam
41 {
42 
43 /*---------------------------------------------------------------------------*\
44  Class DispersionRASModel Declaration
45 \*---------------------------------------------------------------------------*/
46 
47 template<class CloudType>
49 :
50  public DispersionModel<CloudType>
51 {
52 protected:
53 
54  // Protected data
55 
56  // Locally cached turbulence fields
57 
58  //- Turbulence k
59  const volScalarField* kPtr_;
60 
61  //- Take ownership of the k field
62  mutable bool ownK_;
63 
64  //- Turbulence epsilon
66 
67  //- Take ownership of the epsilon field
68  mutable bool ownEpsilon_;
69 
70 
71  // Protected Functions
72 
73  //- Return the k field from the turbulence model
75 
76  //- Return the epsilon field from the turbulence model
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("dispersionRASModel");
84 
85 
86  // Constructors
87 
88  //- Construct from components
90 
91  //- Construct copy
93 
94  //- Construct and return a clone
95  virtual autoPtr<DispersionModel<CloudType>> clone() const = 0;
96 
97 
98  //- Destructor
99  virtual ~DispersionRASModel();
100 
101 
102  // Member Functions
103 
104  //- Update (disperse particles)
105  virtual vector update
106  (
107  const scalar dt,
108  const label celli,
109  const vector& U,
110  const vector& Uc,
111  vector& UTurb,
112  scalar& tTurb
113  ) = 0;
114 
115  //- Cache carrier fields
116  virtual void cacheFields(const bool store);
117 
118 
119  // I-O
120 
121  //- Write
122  virtual void write(Ostream& os) const;
123 };
124 
125 
126 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
127 
128 } // End namespace Foam
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 #ifdef NoRepository
133  #include "DispersionRASModel.C"
134 #endif
135 
136 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137 
138 #endif
139 
140 // ************************************************************************* //
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
tmp< volScalarField > kModel() const
Return the k field from the turbulence model.
const volScalarField * epsilonPtr_
Turbulence epsilon.
bool ownEpsilon_
Take ownership of the epsilon field.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual ~DispersionRASModel()
Destructor.
bool ownK_
Take ownership of the k field.
const dictionary & dict() const
Return const access to the cloud dictionary.
Definition: subModelBase.C:110
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:53
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.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:52
A class for managing temporary objects.
Definition: PtrList.H:53
Base class for particle dispersion models based on RAS turbulence.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:69
Namespace for OpenFOAM.