Fix tutorials: typo in tutorials/viscoelastic/viscoelasticFluidFoam/S-MDCPP/constant...
[OpenFOAM-1.6-ext.git] / src / thermophysicalModels / specie / reaction / reactions / makeReactionThermo.H
blob2b63e2c585a0e8b1e94958b97a95b864d9ef2575
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright held by original author
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
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.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 InClass
26     Foam::makeReactionThermo
28 Description
29     Macros for instantiating reactions on given thermo packages
31 \*---------------------------------------------------------------------------*/
33 #ifndef makeReactionThermo_H
34 #define makeReactionThermo_H
36 #include "Reaction.H"
38 #include "IrreversibleReaction.H"
39 #include "ReversibleReaction.H"
40 #include "NonEquilibriumReversibleReaction.H"
42 #include "specieThermo.H"
44 #include "sutherlandTransport.H"
45 #include "janafThermo.H"
46 #include "perfectGas.H"
48 #include "polynomialTransport.H"
49 #include "hPolynomialThermo.H"
50 #include "icoPolynomial.H"
52 #include "addToRunTimeSelectionTable.H"
54 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
56 namespace Foam
59 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
61 #define makeReaction(Thermo, ReactionType, ReactionRate)                      \
62                                                                               \
63     typedef Reaction<Thermo> Reaction##Thermo;                                \
64                                                                               \
65     typedef ReactionType<Thermo, ReactionRate>                                \
66         ReactionType##Thermo##ReactionRate;                                   \
67                                                                               \
68     template<>                                                                \
69     const word ReactionType##Thermo##ReactionRate::typeName                   \
70     (                                                                         \
71         ReactionType::typeName_()                                             \
72       + ReactionRate::type()                                                  \
73       + Reaction##Thermo::typeName_()                                 \
74     );                                                                        \
75                                                                               \
76     addToRunTimeSelectionTable                                                \
77     (                                                                         \
78         Reaction##Thermo,                                                     \
79         ReactionType##Thermo##ReactionRate,                                   \
80         Istream                                                               \
81     );
84 #define makePressureDependentReaction(Thermo, Reaction, PressureDependentReactionRate, ReactionRate, FallOffFunction) \
85                                                                               \
86     typedef PressureDependentReactionRate<ReactionRate, FallOffFunction>      \
87         PressureDependentReactionRate##ReactionRate##FallOffFunction;         \
88                                                                               \
89     makeReaction                                                              \
90     (                                                                         \
91         Thermo,                                                               \
92         Reaction,                                                             \
93         PressureDependentReactionRate##ReactionRate##FallOffFunction          \
94     )
97 #define makeIRReactions(Thermo, ReactionRate)                                 \
98                                                                               \
99     makeReaction(Thermo, IrreversibleReaction, ReactionRate)                  \
100                                                                               \
101     makeReaction(Thermo, ReversibleReaction, ReactionRate)
104 #define makeIRNReactions(Thermo, ReactionRate)                                \
105                                                                               \
106     makeIRReactions(Thermo, ReactionRate)                                     \
107                                                                               \
108     makeReaction(Thermo, NonEquilibriumReversibleReaction, ReactionRate)
111 #define makePressureDependentReactions(Thermo, ReactionRate, FallOffFunction) \
112                                                                               \
113     makePressureDependentReaction                                             \
114     (                                                                         \
115         Thermo,                                                               \
116         IrreversibleReaction,                                                 \
117         FallOffReactionRate,                                                  \
118         ReactionRate,                                                         \
119         FallOffFunction                                                       \
120     )                                                                         \
121                                                                               \
122     makePressureDependentReaction                                             \
123     (                                                                         \
124         Thermo,                                                               \
125         ReversibleReaction,                                                   \
126         FallOffReactionRate,                                                  \
127         ReactionRate,                                                         \
128         FallOffFunction                                                       \
129     )                                                                         \
130                                                                               \
131     makePressureDependentReaction                                             \
132     (                                                                         \
133         Thermo,                                                               \
134         IrreversibleReaction,                                                 \
135         ChemicallyActivatedReactionRate,                                      \
136         ReactionRate,                                                         \
137         FallOffFunction                                                       \
138     )                                                                         \
139                                                                               \
140     makePressureDependentReaction                                             \
141     (                                                                         \
142         Thermo,                                                               \
143         ReversibleReaction,                                                   \
144         ChemicallyActivatedReactionRate,                                      \
145         ReactionRate,                                                         \
146         FallOffFunction                                                       \
147     )
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 } // End namespace Foam
154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 #endif
158 // ************************************************************************* //