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