makeTurbulenceModel.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 | Copyright (C) 2015-2016 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 \*---------------------------------------------------------------------------*/
25 
26 #include "EddyDiffusivity.H"
27 
28 #define makeBaseTurbulenceModel( \
29  Alpha, Rho, baseModel, BaseModel, TDModel, Transport) \
30  \
31  namespace Foam \
32  { \
33  typedef TurbulenceModel \
34  < \
35  Alpha, \
36  Rho, \
37  baseModel, \
38  Transport \
39  > Transport##baseModel; \
40  \
41  defineTemplateRunTimeSelectionTable \
42  ( \
43  Transport##baseModel, \
44  dictionary \
45  ); \
46  \
47  typedef TDModel<BaseModel<Transport>> \
48  Transport##BaseModel; \
49  \
50  \
51  typedef laminar<Transport##BaseModel> Laminar##Transport##BaseModel; \
52  \
53  defineNamedTemplateTypeNameAndDebug(Laminar##Transport##BaseModel, 0); \
54  \
55  addToRunTimeSelectionTable \
56  ( \
57  Transport##baseModel, \
58  Laminar##Transport##BaseModel, \
59  dictionary \
60  ); \
61  \
62  \
63  typedef RASModel<EddyDiffusivity<Transport##BaseModel>> \
64  RAS##Transport##BaseModel; \
65  \
66  defineNamedTemplateTypeNameAndDebug(RAS##Transport##BaseModel, 0); \
67  \
68  defineTemplateRunTimeSelectionTable \
69  (RAS##Transport##BaseModel, dictionary); \
70  \
71  addToRunTimeSelectionTable \
72  ( \
73  Transport##baseModel, \
74  RAS##Transport##BaseModel, \
75  dictionary \
76  ); \
77  \
78  \
79  typedef LESModel<EddyDiffusivity<Transport##BaseModel>> \
80  LES##Transport##BaseModel; \
81  \
82  defineNamedTemplateTypeNameAndDebug(LES##Transport##BaseModel, 0); \
83  \
84  defineTemplateRunTimeSelectionTable \
85  (LES##Transport##BaseModel, dictionary); \
86  \
87  addToRunTimeSelectionTable \
88  ( \
89  Transport##baseModel, \
90  LES##Transport##BaseModel, \
91  dictionary \
92  ); \
93  }
94 
95 
96 #define makeTemplatedTurbulenceModel(BaseModel, SType, Type) \
97  typedef Foam::SType##Models::Type<Foam::EddyDiffusivity<Foam::BaseModel>> \
98  Type##SType##BaseModel; \
99  defineNamedTemplateTypeNameAndDebug(Type##SType##BaseModel, 0); \
100  \
101  namespace Foam \
102  { \
103  namespace SType##Models \
104  { \
105  typedef Type<EddyDiffusivity<BaseModel>> Type##SType##BaseModel; \
106  \
107  addToRunTimeSelectionTable \
108  ( \
109  SType##BaseModel, \
110  Type##SType##BaseModel, \
111  dictionary \
112  ); \
113  } \
114  }
115 
116 
117 #define makeTurbulenceModel(BaseModel, SType, Type) \
118  namespace Foam \
119  { \
120  namespace SType##Models \
121  { \
122  defineTypeNameAndDebug(Type, 0); \
123  \
124  addToRunTimeSelectionTable \
125  ( \
126  SType##BaseModel, \
127  Type, \
128  dictionary \
129  ); \
130  } \
131  }
132 
133 
134 // ************************************************************************* //