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

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