OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

makeReactionThermo.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-2009 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 InClass
00026     Foam::makeReactionThermo
00027 
00028 Description
00029     Macros for instantiating reactions on given thermo packages
00030 
00031 \*---------------------------------------------------------------------------*/
00032 
00033 #ifndef makeReactionTherno_H
00034 #define makeReactionThermo_H
00035 
00036 #include "Reaction.H"
00037 
00038 #include "IrreversibleReaction.H"
00039 #include "ReversibleReaction.H"
00040 #include "NonEquilibriumReversibleReaction.H"
00041 
00042 #include "specieThermo.H"
00043 
00044 #include "sutherlandTransport.H"
00045 #include "janafThermo.H"
00046 #include "perfectGas.H"
00047 
00048 #include "polynomialTransport.H"
00049 #include "hPolynomialThermo.H"
00050 #include "icoPolynomial.H"
00051 
00052 #include "addToRunTimeSelectionTable.H"
00053 
00054 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00055 
00056 namespace Foam
00057 {
00058 
00059 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00060 
00061 #define makeReaction(Thermo, ReactionType, ReactionRate)                      \
00062                                                                               \
00063     typedef Reaction<Thermo> Reaction##Thermo;                                \
00064                                                                               \
00065     typedef ReactionType<Thermo, ReactionRate>                                \
00066         ReactionType##Thermo##ReactionRate;                                   \
00067                                                                               \
00068     template<>                                                                \
00069     const word ReactionType##Thermo##ReactionRate::typeName                   \
00070     (                                                                         \
00071         ReactionType::typeName_()                                             \
00072       + ReactionRate::type()                                                  \
00073       + Reaction##Thermo::typeName_()                                 \
00074     );                                                                        \
00075                                                                               \
00076     addToRunTimeSelectionTable                                                \
00077     (                                                                         \
00078         Reaction##Thermo,                                                     \
00079         ReactionType##Thermo##ReactionRate,                                   \
00080         Istream                                                               \
00081     );
00082 
00083 
00084 #define makePressureDependentReaction(Thermo, Reaction, PressureDependentReactionRate, ReactionRate, FallOffFunction) \
00085                                                                               \
00086     typedef PressureDependentReactionRate<ReactionRate, FallOffFunction>      \
00087         PressureDependentReactionRate##ReactionRate##FallOffFunction;         \
00088                                                                               \
00089     makeReaction                                                              \
00090     (                                                                         \
00091         Thermo,                                                               \
00092         Reaction,                                                             \
00093         PressureDependentReactionRate##ReactionRate##FallOffFunction          \
00094     )
00095 
00096 
00097 #define makeIRReactions(Thermo, ReactionRate)                                 \
00098                                                                               \
00099     makeReaction(Thermo, IrreversibleReaction, ReactionRate)                  \
00100                                                                               \
00101     makeReaction(Thermo, ReversibleReaction, ReactionRate)
00102 
00103 
00104 #define makeIRNReactions(Thermo, ReactionRate)                                \
00105                                                                               \
00106     makeIRReactions(Thermo, ReactionRate)                                     \
00107                                                                               \
00108     makeReaction(Thermo, NonEquilibriumReversibleReaction, ReactionRate)
00109 
00110 
00111 #define makePressureDependentReactions(Thermo, ReactionRate, FallOffFunction) \
00112                                                                               \
00113     makePressureDependentReaction                                             \
00114     (                                                                         \
00115         Thermo,                                                               \
00116         IrreversibleReaction,                                                 \
00117         FallOffReactionRate,                                                  \
00118         ReactionRate,                                                         \
00119         FallOffFunction                                                       \
00120     )                                                                         \
00121                                                                               \
00122     makePressureDependentReaction                                             \
00123     (                                                                         \
00124         Thermo,                                                               \
00125         ReversibleReaction,                                                   \
00126         FallOffReactionRate,                                                  \
00127         ReactionRate,                                                         \
00128         FallOffFunction                                                       \
00129     )                                                                         \
00130                                                                               \
00131     makePressureDependentReaction                                             \
00132     (                                                                         \
00133         Thermo,                                                               \
00134         IrreversibleReaction,                                                 \
00135         ChemicallyActivatedReactionRate,                                      \
00136         ReactionRate,                                                         \
00137         FallOffFunction                                                       \
00138     )                                                                         \
00139                                                                               \
00140     makePressureDependentReaction                                             \
00141     (                                                                         \
00142         Thermo,                                                               \
00143         ReversibleReaction,                                                   \
00144         ChemicallyActivatedReactionRate,                                      \
00145         ReactionRate,                                                         \
00146         FallOffFunction                                                       \
00147     )
00148 
00149 
00150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00151 
00152 } // End namespace Foam
00153 
00154 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00155 
00156 #endif
00157 
00158 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd