WallInteractionModel.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-2017 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::WallInteractionModel
28
29Description
30 Templated wall interaction model class
31
32SourceFiles
33 WallInteractionModel.C
34 WallInteractionModelNew.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef WallInteractionModel_H
39#define WallInteractionModel_H
40
41#include "IOdictionary.H"
42#include "autoPtr.H"
44
45// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
46
47namespace Foam
48{
49
50/*---------------------------------------------------------------------------*\
51 Class WallInteractionModel Declaration
52\*---------------------------------------------------------------------------*/
53
54template<class CloudType>
56{
57 // Private data
58
59 //- Reference to the owner cloud class
60 CloudType& owner_;
61
62 //- Reference to the cloud dictionary
63 const dictionary& dict_;
64
65 //- The coefficients dictionary
66 const dictionary coeffDict_;
67
68
69public:
70
71 //- Runtime type information
72 TypeName("WallInteractionModel");
73
74 //- Declare runtime constructor selection table
76 (
77 autoPtr,
80 (
81 const dictionary& dict,
83 ),
84 (dict, owner)
85 );
86
87
88 // Constructors
89
90 //- Construct null from owner
92
93 //- Construct from components
95 (
96 const dictionary& dict,
98 const word& type
99 );
100
101
102 //- Destructor
103 virtual ~WallInteractionModel();
104
105
106 //- Selector
108 (
109 const dictionary& dict,
111 );
112
113
114 // Access
115
116 //- Return the owner cloud object
117 const CloudType& owner() const;
118
119 //- Return non-const access to the owner cloud object
120 CloudType& owner();
121
122 //- Return the dictionary
123 const dictionary& dict() const;
124
125 //- Return the coefficients dictionary
126 const dictionary& coeffDict() const;
127
128
129 // Member Functions
130
131 //- Apply wall correction
132 virtual void correct(typename CloudType::parcelType& p) = 0;
133};
134
135
136// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
137
138} // End namespace Foam
139
140// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142#define makeWallInteractionModel(CloudType) \
143 \
144 defineNamedTemplateTypeNameAndDebug(WallInteractionModel<CloudType>, 0); \
145 \
146 defineTemplateRunTimeSelectionTable \
147 ( \
148 WallInteractionModel<CloudType>, \
149 dictionary \
150 );
151
153#define makeWallInteractionModelType(SS, CloudType) \
154 \
155 defineNamedTemplateTypeNameAndDebug(SS<CloudType>, 0); \
156 \
157 WallInteractionModel<CloudType>:: \
158 adddictionaryConstructorToTable<SS<CloudType>> \
159 add##SS##CloudType##ConstructorToTable_;
160
161
162// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163
164#ifdef NoRepository
165 #include "WallInteractionModel.C"
166#endif
167
168// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169
170#endif
171
172// ************************************************************************* //
Templated base class for dsmc cloud.
Definition: DSMCCloud.H:75
ParcelType parcelType
Type of parcel the cloud was instantiated for.
Definition: DSMCCloud.H:220
Templated wall interaction model class.
TypeName("WallInteractionModel")
Runtime type information.
declareRunTimeSelectionTable(autoPtr, WallInteractionModel, dictionary,(const dictionary &dict, CloudType &owner),(dict, owner))
Declare runtime constructor selection table.
const dictionary & coeffDict() const
Return the coefficients dictionary.
virtual ~WallInteractionModel()
Destructor.
static autoPtr< WallInteractionModel< CloudType > > New(const dictionary &dict, CloudType &owner)
Selector.
virtual void correct(typename CloudType::parcelType &p)=0
Apply wall correction.
const dictionary & dict() const
Return the dictionary.
const CloudType & owner() const
Return the owner cloud object.
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
A class for handling words, derived from Foam::string.
Definition: word.H:68
volScalarField & p
thermo correct()
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