makeMomentumTransportModel.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) 2013-2021 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 
27 
28 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
29 
30 #define makeMomentumTransportModelTypes(Alpha, Rho, BaseModel) \
31  namespace Foam \
32  { \
33  typedef laminarModel<BaseModel> laminar##BaseModel; \
34  typedef RASModel<BaseModel> RAS##BaseModel; \
35  typedef LESModel<BaseModel> LES##BaseModel; \
36  }
37 
38 
39 #define makeBaseMomentumTransportModel(Alpha, Rho, BaseModel) \
40  \
41  namespace Foam \
42  { \
43  typedef BaseModel Transport##momentumTransportModel; \
44  \
45  defineRunTimeSelectionTable \
46  ( \
47  Transport##momentumTransportModel, \
48  dictionary \
49  ); \
50  \
51  \
52  defineNamedTemplateTypeNameAndDebug(laminar##BaseModel, 0); \
53  \
54  defineTemplateRunTimeSelectionTable(laminar##BaseModel, dictionary); \
55  \
56  addToRunTimeSelectionTable \
57  ( \
58  Transport##momentumTransportModel, \
59  laminar##BaseModel, \
60  dictionary \
61  ); \
62  \
63  \
64  defineNamedTemplateTypeNameAndDebug(RAS##BaseModel, 0); \
65  \
66  defineTemplateRunTimeSelectionTable(RAS##BaseModel, dictionary); \
67  \
68  addToRunTimeSelectionTable \
69  ( \
70  Transport##momentumTransportModel, \
71  RAS##BaseModel, \
72  dictionary \
73  ); \
74  \
75  \
76  defineNamedTemplateTypeNameAndDebug(LES##BaseModel, 0); \
77  \
78  defineTemplateRunTimeSelectionTable(LES##BaseModel, dictionary); \
79  \
80  addToRunTimeSelectionTable \
81  ( \
82  Transport##momentumTransportModel, \
83  LES##BaseModel, \
84  dictionary \
85  ); \
86  }
87 
88 
89 #define makeTemplatedLaminarModel(BaseModel, SType, Type) \
90  typedef Foam::SType##Models::Type<Foam::BaseModel> \
91  Type##SType##BaseModel; \
92  defineNamedTemplateTypeNameAndDebug(Type##SType##BaseModel, 0); \
93  \
94  namespace Foam \
95  { \
96  namespace SType##Models \
97  { \
98  typedef Type<BaseModel> Type##SType##BaseModel; \
99  \
100  addToRunTimeSelectionTable \
101  ( \
102  SType##BaseModel, \
103  Type##SType##BaseModel, \
104  dictionary \
105  ); \
106  } \
107  }
108 
109 
110 #define makeTemplatedMomentumTransportModel(BaseModel, SType, Type) \
111  defineNamedTemplateTypeNameAndDebug \
112  (Foam::SType##Models::Type<Foam::BaseModel>, 0); \
113  \
114  namespace Foam \
115  { \
116  namespace SType##Models \
117  { \
118  typedef Type<BaseModel> Type##SType##BaseModel; \
119  \
120  addToRunTimeSelectionTable \
121  ( \
122  SType##BaseModel, \
123  Type##SType##BaseModel, \
124  dictionary \
125  ); \
126  } \
127  }
128 
129 
130 #define makeMomentumTransportModel(BaseModel, SType, Type) \
131  namespace Foam \
132  { \
133  namespace SType##Models \
134  { \
135  defineTypeNameAndDebug(Type, 0); \
136  \
137  addToRunTimeSelectionTable \
138  ( \
139  SType##BaseModel, \
140  Type, \
141  dictionary \
142  ); \
143  } \
144  }
145 
146 
147 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.