OpenFOAM logo
Open Source CFD Toolkit

makeReactionJanaf.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2005 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     makeReactionJanaf
00027 
00028 Description
00029 
00030 \*---------------------------------------------------------------------------*/
00031 
00032 #ifndef makeReactionJanaf_H
00033 #define makeReactionJanaf_H
00034 
00035 #include "Reaction.H"
00036 
00037 #include "IrreversibleReaction.H"
00038 #include "ReversibleReaction.H"
00039 #include "NonEquilibriumReversibleReaction.H"
00040 
00041 #include "sutherlandTransport.H"
00042 #include "specieThermo.H"
00043 #include "janafThermo.H"
00044 #include "perfectGas.H"
00045 
00046 #include "addToRunTimeSelectionTable.H"
00047 
00048 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00049 
00050 namespace Foam
00051 {
00052 
00053 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00054 
00055 typedef sutherlandTransport<specieThermo<janafThermo<perfectGas> > >
00056     reactionThermo;
00057 
00058 typedef Reaction<reactionThermo>
00059     reaction;
00060 
00061 #define makeReaction(Reaction, ReactionRate)                                  \
00062                                                                               \
00063     typedef Reaction<reactionThermo, ReactionRate>                            \
00064         Reaction##ReactionRate;                                               \
00065                                                                               \
00066     template<>                                                                \
00067     const word Reaction##ReactionRate::typeName                               \
00068     (                                                                         \
00069         Reaction::typeName_()                                                 \
00070       + ReactionRate::type()                                                  \
00071       + reaction::typeName_()                                                 \
00072     );                                                                        \
00073                                                                               \
00074     addToRunTimeSelectionTable(reaction, Reaction##ReactionRate, Istream);
00075 
00076 #define makePressureDependentReaction(Reaction, PressureDependentReactionRate, ReactionRate, FallOffFunction)  \
00077                                                                               \
00078     typedef PressureDependentReactionRate<ReactionRate, FallOffFunction>      \
00079     PressureDependentReactionRate##ReactionRate##FallOffFunction;             \
00080                                                                               \
00081     makeReaction                                                              \
00082     (Reaction, PressureDependentReactionRate##ReactionRate##FallOffFunction)
00083 
00084 #define makeIRReactions(ReactionRate)                                         \
00085     makeReaction(IrreversibleReaction, ReactionRate)                          \
00086     makeReaction(ReversibleReaction, ReactionRate)
00087 
00088 #define makeIRNReactions(ReactionRate)                                        \
00089     makeIRReactions(ReactionRate)                                             \
00090     makeReaction(NonEquilibriumReversibleReaction, ReactionRate)
00091 
00092 #define makePressureDependentReactions(ReactionRate, FallOffFunction)         \
00093                                                                               \
00094     makePressureDependentReaction                                             \
00095         (IrreversibleReaction, FallOffReactionRate,                           \
00096          ReactionRate, FallOffFunction)                                       \
00097                                                                               \
00098     makePressureDependentReaction                                             \
00099         (ReversibleReaction, FallOffReactionRate,                             \
00100          ReactionRate, FallOffFunction)                                       \
00101                                                                               \
00102     makePressureDependentReaction                                             \
00103         (IrreversibleReaction, ChemicallyActivatedReactionRate,               \
00104          ReactionRate, FallOffFunction)                                       \
00105                                                                               \
00106     makePressureDependentReaction                                             \
00107         (ReversibleReaction, ChemicallyActivatedReactionRate,                 \
00108          ReactionRate, FallOffFunction)
00109 
00110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00111 
00112 } // End namespace Foam
00113 
00114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00115 
00116 #endif
00117 
00118 // ************************************************************************* //
For further information go to www.openfoam.org