DispersionModel.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::DispersionModel
28
29Group
30 grpLagrangianIntermediateDispersionSubModels
31
32Description
33 Base class for dispersion modelling
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef DispersionModel_H
38#define DispersionModel_H
39
40#include "IOdictionary.H"
41#include "autoPtr.H"
43#include "CloudSubModelBase.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50/*---------------------------------------------------------------------------*\
51 Class DispersionModel Declaration
52\*---------------------------------------------------------------------------*/
53
54template<class CloudType>
56:
57 public CloudSubModelBase<CloudType>
58{
59public:
60
61 //- Runtime type information
62 TypeName("dispersionModel");
63
64
65 // Declare runtime constructor selection table
68 (
69 autoPtr,
72 (
73 const dictionary& dict,
75 ),
76 (dict, owner)
77 );
78
79
80 // Constructors
81
82 //- Construct null from owner
84
85 //- Construct from components
87 (
88 const dictionary& dict,
90 const word& type
91 );
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 ~DispersionModel();
102
103
104 //- Selector
106 (
107 const dictionary& dict,
109 );
110
111
112 // Member Functions
113
114 //- Update (disperse particles)
115 virtual vector update
116 (
117 const scalar dt,
118 const label celli,
119 const vector& U,
120 const vector& Uc,
121 vector& UTurb,
122 scalar& tTurb
123 ) = 0;
124};
125
126
127// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128
129} // End namespace Foam
130
131// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133#define makeDispersionModel(CloudType) \
134 \
135 typedef Foam::CloudType::kinematicCloudType kinematicCloudType; \
136 defineTemplateTypeNameAndDebug \
137 (Foam::DispersionModel<kinematicCloudType>, 0); \
138 \
139 namespace Foam \
140 { \
141 defineTemplateRunTimeSelectionTable \
142 ( \
143 DispersionModel<kinematicCloudType>, \
144 dictionary \
145 ); \
146 }
148#define makeDispersionModelType(SS, CloudType) \
149 \
150 typedef Foam::CloudType::kinematicCloudType kinematicCloudType; \
151 defineNamedTemplateTypeNameAndDebug(Foam::SS<kinematicCloudType>, 0); \
152 \
153 Foam::DispersionModel<kinematicCloudType>:: \
154 adddictionaryConstructorToTable<Foam::SS<kinematicCloudType>> \
155 add##SS##CloudType##kinematicCloudType##ConstructorToTable_;
156
157
158// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159
160#ifdef NoRepository
161 #include "DispersionModel.C"
162#endif
163
164// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165
166#endif
167
168// ************************************************************************* //
Base class for cloud sub-models.
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.
virtual ~DispersionModel()
Destructor.
TypeName("dispersionModel")
Runtime type information.
static autoPtr< DispersionModel< CloudType > > New(const dictionary &dict, CloudType &owner)
Selector.
virtual vector update(const scalar dt, const label celli, const vector &U, const vector &Uc, vector &UTurb, scalar &tTurb)=0
Update (disperse particles)
virtual autoPtr< DispersionModel< CloudType > > clone() const =0
Construct and return a clone.
declareRunTimeSelectionTable(autoPtr, DispersionModel, dictionary,(const dictionary &dict, CloudType &owner),(dict, owner))
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 handling words, derived from Foam::string.
Definition: word.H:68
U
Definition: pEqn.H:72
mesh update()
Namespace for OpenFOAM.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73