makeReactionThermo.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) 2011-2018 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 #ifndef makeReactionThermo_H
27 #define makeReactionThermo_H
28 
30 #include "makeThermo.H"
31 #include "SpecieMixture.H"
32 
33 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
34 
35 #define defineThermoPhysicsReactionThermo(BaseReactionThermo,CThermo,Mixture,ThermoPhys) \
36  \
37  typedef CThermo \
38  < \
39  BaseReactionThermo, \
40  SpecieMixture \
41  < \
42  Mixture \
43  < \
44  ThermoPhys \
45  > \
46  > \
47  > CThermo##Mixture##ThermoPhys; \
48  \
49  defineTemplateTypeNameAndDebugWithName \
50  ( \
51  CThermo##Mixture##ThermoPhys, \
52  (#CThermo"<" + Mixture<ThermoPhys>::typeName() + ">").c_str(), \
53  0 \
54  )
55 
56 
57 #define makeThermoPhysicsReactionThermos(BaseThermo,BaseReactionThermo,CThermo,Mixture,ThermoPhys) \
58  \
59  defineThermoPhysicsReactionThermo \
60  ( \
61  BaseReactionThermo, \
62  CThermo, \
63  Mixture, \
64  ThermoPhys \
65  ); \
66  \
67  addThermoPhysicsThermo(basicThermo, CThermo##Mixture##ThermoPhys); \
68  addThermoPhysicsThermo(fluidThermo, CThermo##Mixture##ThermoPhys); \
69  addThermoPhysicsThermo(BaseThermo, CThermo##Mixture##ThermoPhys); \
70  addThermoPhysicsThermo(BaseReactionThermo, CThermo##Mixture##ThermoPhys)
71 
72 
73 #define makeThermoPhysicsReactionThermo(BaseReactionThermo,CThermo,Mixture,ThermoPhys) \
74  \
75  defineThermoPhysicsReactionThermo \
76  ( \
77  BaseReactionThermo, \
78  CThermo, \
79  Mixture, \
80  ThermoPhys \
81  ); \
82  \
83  addThermoPhysicsThermo(BaseReactionThermo, CThermo##Mixture##ThermoPhys)
84 
85 
86 #define makeReactionThermos(BaseThermo,BaseReactionThermo,CThermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie) \
87  \
88  typedefThermoPhysics(Transport,Type,Thermo,EqnOfState,Specie); \
89  \
90  makeThermoPhysicsReactionThermos \
91  ( \
92  BaseThermo, \
93  BaseReactionThermo, \
94  CThermo, \
95  Mixture, \
96  Transport##Type##Thermo##EqnOfState##Specie \
97  )
98 
99 
100 #define makeReactionThermo(BaseReactionThermo,CThermo,Mixture,Transport,Type,Thermo,EqnOfState,Specie) \
101  \
102  typedefThermoPhysics(Transport,Type,Thermo,EqnOfState,Specie); \
103  \
104  makeThermoPhysicsReactionThermo \
105  ( \
106  BaseReactionThermo, \
107  CThermo, \
108  Mixture, \
109  Transport##Type##Thermo##EqnOfState##Specie \
110  )
111 
112 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
113 
114 #endif
115 
116 // ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Macros for creating basic fluid thermo packages.