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

foamChemistryReader.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::foamChemistryReader
00026 
00027 Description
00028     Chemistry reader for OpenFOAM format
00029 
00030 SourceFiles
00031     foamChemistryReader.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef foamChemistryReader_H
00036 #define foamChemistryReader_H
00037 
00038 #include <reactionThermophysicalModels/chemistryReader.H>
00039 #include <OpenFOAM/fileName.H>
00040 #include <OpenFOAM/typeInfo.H>
00041 #include <OpenFOAM/HashPtrTable.H>
00042 #include <OpenFOAM/SLPtrList.H>
00043 #include <OpenFOAM/labelList.H>
00044 #include <specie/speciesTable.H>
00045 #include <specie/atomicWeights.H>
00046 
00047 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00048 
00049 namespace Foam
00050 {
00051 
00052 /*---------------------------------------------------------------------------*\
00053                        Class foamChemistry Declaration
00054 \*---------------------------------------------------------------------------*/
00055 
00056 template<class ThermoType>
00057 class foamChemistryReader
00058 :
00059     public chemistryReader<ThermoType>
00060 {
00061         //- Table of the thermodynamic data given in the foamChemistry file
00062         HashPtrTable<ThermoType> speciesThermo_;
00063 
00064         //- Table of species
00065         speciesTable speciesTable_;
00066 
00067         //- List of the reactions
00068         SLPtrList<Reaction<ThermoType> > reactions_;
00069 
00070 
00071     // Private Member Functions
00072 
00073         //- Disallow default bitwise copy construct
00074         foamChemistryReader(const foamChemistryReader&);
00075 
00076         //- Disallow default bitwise assignment
00077         void operator=(const foamChemistryReader&);
00078 
00079 
00080 public:
00081 
00082     //- Runtime type information
00083     TypeName("foamChemistryReader");
00084 
00085 
00086     // Constructors
00087 
00088         //- Construct from foamChemistry and thermodynamics file names
00089         foamChemistryReader
00090         (
00091             const fileName& reactionsFileName,
00092             const fileName& thermoFileName
00093         );
00094 
00095         //- Construct by getting the foamChemistry and thermodynamics file names
00096         //  from dictionary
00097         foamChemistryReader(const dictionary& thermoDict);
00098 
00099 
00100     //- Destructor
00101     virtual ~foamChemistryReader()
00102     {}
00103 
00104 
00105     // Member functions
00106 
00107         //- Table of species
00108         const speciesTable& species() const
00109         {
00110             return speciesTable_;
00111         }
00112 
00113         //- Table of the thermodynamic data given in the foamChemistry file
00114         const HashPtrTable<ThermoType>& speciesThermo() const
00115         {
00116             return speciesThermo_;
00117         }
00118 
00119         //- List of the reactions
00120         const SLPtrList<Reaction<ThermoType> >& reactions() const
00121         {
00122             return reactions_;
00123         }
00124 };
00125 
00126 
00127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00128 
00129 } // End namespace Foam
00130 
00131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00132 
00133 #ifdef NoRepository
00134 #   include "foamChemistryReader.C"
00135 #endif
00136 
00137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00138 
00139 #endif
00140 
00141 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines