makeReaction.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
26InClass
27 Foam::makeReaction
28
29Description
30 Macros for instantiating reactions on given thermo packages
31
32\*---------------------------------------------------------------------------*/
33
34#ifndef makeReaction_H
35#define makeReaction_H
36
37#include "Reaction.H"
38
40#include "ReversibleReaction.H"
42
43#include "thermo.H"
44
45#include "sutherlandTransport.H"
46#include "janafThermo.H"
47#include "perfectGas.H"
48
49#include "polynomialTransport.H"
50#include "hPolynomialThermo.H"
51#include "icoPolynomial.H"
52
54
55// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56
57namespace Foam
58{
59
60// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61
62#define makeReaction(Thermo, ReactionType, ReactionRate) \
63 \
64 typedef Reaction<Thermo> Reaction##Thermo; \
65 \
66 typedef ReactionType<Reaction, Thermo, ReactionRate> \
67 ReactionType##Thermo##ReactionRate; \
68 \
69 template<> \
70 const word ReactionType##Thermo##ReactionRate::typeName \
71 ( \
72 ReactionType::typeName_() \
73 + ReactionRate::type() \
74 + Reaction##Thermo::typeName_() \
75 ); \
76 \
77 addToRunTimeSelectionTable \
78 ( \
79 Reaction##Thermo, \
80 ReactionType##Thermo##ReactionRate, \
81 dictionary \
82 );
83
84
85#define makePressureDependentReaction\
86( \
87 Thermo, \
88 Reaction, \
89 PressureDependentReactionRate, \
90 ReactionRate, \
91 FallOffFunction \
92) \
93 \
94 typedef PressureDependentReactionRate<ReactionRate, FallOffFunction> \
95 PressureDependentReactionRate##ReactionRate##FallOffFunction; \
96 \
97 makeReaction \
98 ( \
99 Thermo, \
100 Reaction, \
101 PressureDependentReactionRate##ReactionRate##FallOffFunction \
102 )
103
104
105#define makeIRReactions(Thermo, ReactionRate) \
106 \
107 makeReaction(Thermo, IrreversibleReaction, ReactionRate) \
108 \
109 makeReaction(Thermo, ReversibleReaction, ReactionRate)
110
111
112#define makeIRNReactions(Thermo, ReactionRate) \
113 \
114 makeIRReactions(Thermo, ReactionRate) \
115 \
116 makeReaction(Thermo, NonEquilibriumReversibleReaction, ReactionRate)
117
118
119#define makePressureDependentReactions(Thermo, ReactionRate, FallOffFunction) \
120 \
121 makePressureDependentReaction \
122 ( \
123 Thermo, \
124 IrreversibleReaction, \
125 FallOffReactionRate, \
126 ReactionRate, \
127 FallOffFunction \
128 ) \
129 \
130 makePressureDependentReaction \
131 ( \
132 Thermo, \
133 ReversibleReaction, \
134 FallOffReactionRate, \
135 ReactionRate, \
136 FallOffFunction \
137 ) \
138 \
139 makePressureDependentReaction \
140 ( \
141 Thermo, \
142 IrreversibleReaction, \
143 ChemicallyActivatedReactionRate, \
144 ReactionRate, \
145 FallOffFunction \
146 ) \
147 \
148 makePressureDependentReaction \
149 ( \
150 Thermo, \
151 ReversibleReaction, \
152 ChemicallyActivatedReactionRate, \
153 ReactionRate, \
154 FallOffFunction \
155 )
156
157
158// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
159
160} // End namespace Foam
161
162// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
163
164#endif
165
166// ************************************************************************* //
Macros for easy insertion into run-time selection tables.
Namespace for OpenFOAM.