OpenFOAM logo
Open Source CFD Toolkit

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-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     foamChemistryReader
00027 
00028 Description
00029 
00030 SourceFiles
00031     foamChemistryReader.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef foamChemistryReader_H
00036 #define foamChemistryReader_H
00037 
00038 #include "chemistryReader.H"
00039 #include "fileName.H"
00040 #include "typeInfo.H"
00041 #include "HashPtrTable.H"
00042 #include "SLPtrList.H"
00043 #include "DynamicList.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 class foamChemistryReader
00058 :
00059     public chemistryReader
00060 {
00061         //- Table of the thermodynamic data given in the foamChemistry file
00062         HashPtrTable<reactionThermo> specieThermo_;
00063 
00064         //- Table of species
00065         speciesTable speciesTable_;
00066 
00067         //- List of the reactions
00068         SLPtrList<reaction> 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 
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<reactionThermo>& specieThermo() const
00116         {
00117             return specieThermo_;
00118         }
00119 
00120         //- List of the reactions
00121         const SLPtrList<reaction>& reactions() const
00122         {
00123             return reactions_;
00124         }
00125 };
00126 
00127 
00128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00129 
00130 } // End namespace Foam
00131 
00132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00133 
00134 #endif
00135 
00136 // ************************************************************************* //
For further information go to www.openfoam.org