OpenFOAM logo
Open Source CFD Toolkit

ChemicallyActivatedReactionRate.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     ChemicallyActivatedReactionRate
00027 
00028 Description
00029     General class for handling chemically-activated bimolecular reactions.
00030 
00031 SourceFiles
00032     ChemicallyActivatedReactionRateI.H
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef ChemicallyActivatedReactionRate_H
00037 #define ChemicallyActivatedReactionRate_H
00038 
00039 #include "thirdBodyEfficiencies.H"
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 // * * * * * * Forward declaration of template friend fuctions * * * * * * * //
00047 
00048 template<class ReactionRate, class ChemicallyActivationFunction>
00049 class ChemicallyActivatedReactionRate;
00050 
00051 template<class ReactionRate, class ChemicallyActivationFunction>
00052 inline Ostream& operator<<
00053 (
00054     Ostream&,
00055     const ChemicallyActivatedReactionRate
00056         <ReactionRate, ChemicallyActivationFunction>&
00057 );
00058 
00059 
00060 /*---------------------------------------------------------------------------*\
00061               Class ChemicallyActivatedReactionRate Declaration
00062 \*---------------------------------------------------------------------------*/
00063 
00064 template<class ReactionRate, class ChemicallyActivationFunction>
00065 class ChemicallyActivatedReactionRate
00066 {
00067     // Private data
00068 
00069         ReactionRate k0_;
00070         ReactionRate kInf_;
00071         ChemicallyActivationFunction F_;
00072         thirdBodyEfficiencies thirdBodyEfficiencies_;
00073 
00074 
00075 public:
00076 
00077     // Constructors
00078 
00079         //- Construct from components
00080         inline ChemicallyActivatedReactionRate
00081         (
00082             const ReactionRate& k0,
00083             const ReactionRate& kInf,
00084             const ChemicallyActivationFunction& F,
00085             const thirdBodyEfficiencies& tbes
00086         );
00087 
00088         //- Construct from Istream
00089         inline ChemicallyActivatedReactionRate
00090         (
00091             const speciesTable& species,
00092             Istream& is
00093         );
00094 
00095 
00096     // Member Functions
00097 
00098         //- Return the type name
00099         static word type()
00100         {
00101             return ReactionRate::type()
00102                 + ChemicallyActivationFunction::type()
00103                 + "ChemicallyActivated";
00104         }
00105 
00106         inline scalar operator()
00107         (
00108             const scalar T,
00109             const scalar p,
00110             const scalarField& c
00111         ) const;
00112 
00113 
00114     // Ostream Operator
00115 
00116         friend Ostream& operator<< <ReactionRate, ChemicallyActivationFunction>
00117         (
00118             Ostream&,
00119             const ChemicallyActivatedReactionRate
00120                 <ReactionRate, ChemicallyActivationFunction>&
00121         );
00122 };
00123 
00124 
00125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00126 
00127 } // End namespace Foam
00128 
00129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00130 
00131 #include "ChemicallyActivatedReactionRateI.H"
00132 
00133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00134 
00135 #endif
00136 
00137 // ************************************************************************* //
For further information go to www.openfoam.org