makeThermophysicalTransportModel.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) 2020-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 makeThermophysicalTransportModelTypes( \
31  BaseModel, MomentumTransportModel, ThermoModel) \
32  \
33  namespace Foam \
34  { \
35  typedef BaseModel<MomentumTransportModel, ThermoModel> \
36  ThermoModel##MomentumTransportModel##BaseModel; \
37  \
38  typedef laminarThermophysicalTransportModel \
39  < \
40  ThermoModel##MomentumTransportModel##BaseModel \
41  > laminar##ThermoModel##MomentumTransportModel##BaseModel; \
42  \
43  typedef RASThermophysicalTransportModel \
44  < \
45  ThermoModel##MomentumTransportModel##BaseModel \
46  > RAS##ThermoModel##MomentumTransportModel##BaseModel; \
47  \
48  typedef LESThermophysicalTransportModel \
49  < \
50  ThermoModel##MomentumTransportModel##BaseModel \
51  > LES##ThermoModel##MomentumTransportModel##BaseModel; \
52  }
53 
54 
55 #define makeThermophysicalTransportModels( \
56  BaseModel, MomentumTransportModel, ThermoModel) \
57  \
58  namespace Foam \
59  { \
60  typedef ThermophysicalTransportModel \
61  < \
62  MomentumTransportModel, \
63  ThermoModel \
64  > ThermophysicalTransportModel##MomentumTransportModel; \
65  \
66  defineTemplateRunTimeSelectionTable \
67  ( \
68  ThermophysicalTransportModel##MomentumTransportModel, \
69  dictionary \
70  ); \
71  \
72  \
73  defineNamedTemplateTypeNameAndDebug \
74  ( \
75  laminar##ThermoModel##MomentumTransportModel##BaseModel, \
76  0 \
77  ); \
78  \
79  defineTemplateRunTimeSelectionTable \
80  ( \
81  laminar##ThermoModel##MomentumTransportModel##BaseModel, \
82  dictionary \
83  ); \
84  \
85  addToRunTimeSelectionTable \
86  ( \
87  ThermophysicalTransportModel##MomentumTransportModel, \
88  laminar##ThermoModel##MomentumTransportModel##BaseModel, \
89  dictionary \
90  ); \
91  \
92  \
93  defineNamedTemplateTypeNameAndDebug \
94  ( \
95  RAS##ThermoModel##MomentumTransportModel##BaseModel, \
96  0 \
97  ); \
98  \
99  defineTemplateRunTimeSelectionTable \
100  ( \
101  RAS##ThermoModel##MomentumTransportModel##BaseModel, \
102  dictionary \
103  ); \
104  \
105  addToRunTimeSelectionTable \
106  ( \
107  ThermophysicalTransportModel##MomentumTransportModel, \
108  RAS##ThermoModel##MomentumTransportModel##BaseModel, \
109  dictionary \
110  ); \
111  \
112  \
113  defineNamedTemplateTypeNameAndDebug \
114  ( \
115  LES##ThermoModel##MomentumTransportModel##BaseModel, \
116  0 \
117  ); \
118  \
119  defineTemplateRunTimeSelectionTable \
120  ( \
121  LES##ThermoModel##MomentumTransportModel##BaseModel, \
122  dictionary \
123  ); \
124  \
125  addToRunTimeSelectionTable \
126  ( \
127  ThermophysicalTransportModel##MomentumTransportModel, \
128  LES##ThermoModel##MomentumTransportModel##BaseModel, \
129  dictionary \
130  ); \
131  }
132 
133 
134 #define makeThermophysicalTransportModel( \
135  BaseModel, MomentumTransportModel, ThermoModel, SType, Type) \
136  \
137  typedef Foam::SType##ThermophysicalTransportModels::Type \
138  < \
139  Foam::BaseModel<Foam::MomentumTransportModel, Foam::ThermoModel> \
140  > Type##SType##ThermoModel##ThermoModel##MomentumTransportModel##BaseModel;\
141  \
142  defineNamedTemplateTypeNameAndDebug \
143  ( \
144  Type##SType##ThermoModel##ThermoModel \
145  ##MomentumTransportModel##BaseModel, \
146  0 \
147  ); \
148  \
149  namespace Foam \
150  { \
151  namespace SType##ThermophysicalTransportModels \
152  { \
153  typedef Type<BaseModel<MomentumTransportModel, ThermoModel>> \
154  Type##SType##ThermoModel##ThermoModel \
155  ##MomentumTransportModel##BaseModel; \
156  \
157  addToRunTimeSelectionTable \
158  ( \
159  SType##ThermoModel##MomentumTransportModel##BaseModel, \
160  Type##SType##ThermoModel##ThermoModel \
161  ##MomentumTransportModel##BaseModel, \
162  dictionary \
163  ); \
164  } \
165  }
166 
167 
168 #define makeTurbulenceThermophysicalTransportModel( \
169  BaseModel, MomentumTransportModel, ThermoModel, SType, Type) \
170  \
171  typedef Foam::turbulenceThermophysicalTransportModels::Type \
172  < \
173  Foam::SType##ThermophysicalTransportModel \
174  < \
175  Foam::BaseModel<Foam::MomentumTransportModel, Foam::ThermoModel> \
176  > \
177  > Type##SType##ThermoModel##ThermoModel##MomentumTransportModel##BaseModel;\
178  \
179  defineNamedTemplateTypeNameAndDebug \
180  ( \
181  Type##SType##ThermoModel##ThermoModel \
182  ##MomentumTransportModel##BaseModel, \
183  0 \
184  ); \
185  \
186  namespace Foam \
187  { \
188  namespace turbulenceThermophysicalTransportModels \
189  { \
190  typedef Type \
191  < \
192  SType##ThermophysicalTransportModel \
193  < \
194  BaseModel<MomentumTransportModel, ThermoModel> \
195  > \
196  > Type##SType##ThermoModel##MomentumTransportModel##BaseModel; \
197  \
198  addToRunTimeSelectionTable \
199  ( \
200  SType##ThermoModel##MomentumTransportModel##BaseModel, \
201  Type##SType##ThermoModel##MomentumTransportModel##BaseModel, \
202  dictionary \
203  ); \
204  } \
205  }
206 
207 
208 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.