FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

IrreversibleReaction.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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::IrreversibleReaction
00026 
00027 Description
00028     Simple extension of Reaction to handle reversible reactions using
00029     equilibrium thermodynamics.
00030 
00031 SourceFiles
00032     IrreversibleReaction.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef IrreversibleReaction_H
00037 #define IrreversibleReaction_H
00038 
00039 #include <specie/Reaction.H>
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 /*---------------------------------------------------------------------------*\
00047                            Class IrreversibleReaction Declaration
00048 \*---------------------------------------------------------------------------*/
00049 
00050 template<class ReactionThermo, class ReactionRate>
00051 class IrreversibleReaction
00052 :
00053     public Reaction<ReactionThermo>
00054 {
00055     // Private data
00056 
00057         ReactionRate k_;
00058 
00059 
00060     // Private Member Functions
00061 
00062         //- Disallow default bitwise assignment
00063         void operator=
00064         (
00065             const IrreversibleReaction<ReactionThermo, ReactionRate>&
00066         );
00067 
00068 
00069 public:
00070 
00071     //- Runtime type information
00072     TypeName("irreversible");
00073 
00074 
00075     // Constructors
00076 
00077         //- Construct from components
00078         IrreversibleReaction
00079         (
00080             const Reaction<ReactionThermo>& reaction,
00081             const ReactionRate& reactionRate
00082         );
00083 
00084         //- Construct as copy given new speciesTable
00085         IrreversibleReaction
00086         (
00087             const IrreversibleReaction<ReactionThermo, ReactionRate>&,
00088             const speciesTable& species
00089         );
00090 
00091         //- Construct from Istream
00092         IrreversibleReaction
00093         (
00094             const speciesTable& species,
00095             const HashPtrTable<ReactionThermo>& thermoDatabase,
00096             Istream& is
00097         );
00098 
00099         //- Construct and return a clone
00100         virtual autoPtr<Reaction<ReactionThermo> > clone() const
00101         {
00102             return autoPtr<Reaction<ReactionThermo> >
00103             (
00104                 new IrreversibleReaction<ReactionThermo, ReactionRate>(*this)
00105             );
00106         }
00107 
00108         //- Construct and return a clone with new speciesTable
00109         virtual autoPtr<Reaction<ReactionThermo> > clone
00110         (
00111             const speciesTable& species
00112         ) const
00113         {
00114             return autoPtr<Reaction<ReactionThermo> >
00115             (
00116                 new IrreversibleReaction<ReactionThermo, ReactionRate>
00117                 (
00118                     *this,
00119                     species
00120                 )
00121             );
00122         }
00123 
00124 
00125     // Destructor
00126 
00127         virtual ~IrreversibleReaction()
00128         {}
00129 
00130 
00131     // Member Functions
00132 
00133         // IrreversibleReaction rate coefficients
00134 
00135             //- Forward rate constant
00136             virtual scalar kf
00137             (
00138                 const scalar T,
00139                 const scalar p,
00140                 const scalarField& c
00141             ) const;
00142 
00143 
00144         //- Write
00145         virtual void write(Ostream&) const;
00146 };
00147 
00148 
00149 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00150 
00151 } // End namespace Foam
00152 
00153 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00154 
00155 #ifdef NoRepository
00156 #   include <specie/IrreversibleReaction.C>
00157 #endif
00158 
00159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00160 
00161 #endif
00162 
00163 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines