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-------------------------------------------------------------------------------
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::DispersionRASModel
28
29Description
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
42namespace Foam
43{
44
45/*---------------------------------------------------------------------------*\
46 Class DispersionRASModel Declaration
47\*---------------------------------------------------------------------------*/
48
49template<class CloudType>
51:
52 public DispersionModel<CloudType>
53{
54protected:
55
56 // Protected data
57
58 // Locally cached turbulence fields
59
60 //- Turbulence k
61 const volScalarField* kPtr_;
62
63 //- Take ownership of the k field
64 mutable bool ownK_;
65
66 //- Turbulence epsilon
68
69 //- Take 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
82public:
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// ************************************************************************* //
const CloudType & owner() const
Return const access to the owner cloud.
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
Base class for dispersion modelling.
Base class for particle dispersion models based on RAS turbulence.
const volScalarField * epsilonPtr_
Turbulence epsilon.
tmp< volScalarField > kModel() const
Return the k field from the turbulence model.
virtual void cacheFields(const bool store)
Cache carrier fields.
TypeName("dispersionRASModel")
Runtime type information.
const volScalarField * kPtr_
Turbulence k.
tmp< volScalarField > epsilonModel() const
Return the epsilon field from the turbulence model.
virtual vector update(const scalar dt, const label celli, const vector &U, const vector &Uc, vector &UTurb, scalar &tTurb)=0
Update (disperse particles)
bool ownEpsilon_
Take ownership of the epsilon field.
virtual autoPtr< DispersionModel< CloudType > > clone() const =0
Construct and return a clone.
virtual ~DispersionRASModel()
Destructor.
bool ownK_
Take ownership of the k field.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
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
A class for managing temporary objects.
Definition: tmp.H:65
U
Definition: pEqn.H:72
mesh update()
OBJstream os(runTime.globalPath()/outputName)
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73