initial commit for version 1.5.x patch release
[OpenFOAM-1.5.x.git] / src / thermophysicalModels / combustion / chemistryReaders / foamChemistryReader / foamChemistryReader.H
blobac0d0651b1bd9c7e60d6a2009c109c8d4a253fc9
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2008 OpenCFD Ltd.
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
11     OpenFOAM is free software; you can redistribute it and/or modify it
12     under the terms of the GNU General Public License as published by the
13     Free Software Foundation; either version 2 of the License, or (at your
14     option) any later version.
16     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
19     for more details.
21     You should have received a copy of the GNU General Public License
22     along with OpenFOAM; if not, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     Foam::foamChemistryReader
28 Description
29     Chemistry reader for OpenFOAM format
31 SourceFiles
32     foamChemistryReader.C
34 \*---------------------------------------------------------------------------*/
36 #ifndef foamChemistryReader_H
37 #define foamChemistryReader_H
39 #include "chemistryReader.H"
40 #include "fileName.H"
41 #include "typeInfo.H"
42 #include "HashPtrTable.H"
43 #include "SLPtrList.H"
44 #include "DynamicList.H"
45 #include "labelList.H"
46 #include "speciesTable.H"
47 #include "atomicWeights.H"
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 namespace Foam
54 /*---------------------------------------------------------------------------*\
55                            Class foamChemistry Declaration
56 \*---------------------------------------------------------------------------*/
58 class foamChemistryReader
60     public chemistryReader
62         //- Table of the thermodynamic data given in the foamChemistry file
63         HashPtrTable<reactionThermo> speciesThermo_;
65         //- Table of species
66         speciesTable speciesTable_;
68         //- List of the reactions
69         SLPtrList<reaction> reactions_;
72     // Private Member Functions
74         //- Disallow default bitwise copy construct
75         foamChemistryReader(const foamChemistryReader&);
77         //- Disallow default bitwise assignment
78         void operator=(const foamChemistryReader&);
81 public:
83     //- Runtime type information
84     TypeName("foamChemistryReader");
87     // Constructors
89         //- Construct from foamChemistry and thermodynamics file names
90         foamChemistryReader
91         (
92             const fileName& reactionsFileName,
93             const fileName& thermoFileName
94         );
96         //- Construct by getting the foamChemistry and thermodynamics file names
97         //  from dictionary
98         foamChemistryReader(const dictionary& thermoDict);
101     // Destructor
103         virtual ~foamChemistryReader()
104         {}
107     // Member functions
109         //- Table of species
110         const speciesTable& species() const
111         {
112             return speciesTable_;
113         }
115         //- Table of the thermodynamic data given in the foamChemistry file
116         const HashPtrTable<reactionThermo>& speciesThermo() const
117         {
118             return speciesThermo_;
119         }
121         //- List of the reactions
122         const SLPtrList<reaction>& reactions() const
123         {
124             return reactions_;
125         }
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 } // End namespace Foam
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 #endif
137 // ************************************************************************* //