1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
7 -------------------------------------------------------------------------------
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
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
26 Foam::foamChemistryReader
29 Chemistry reader for OpenFOAM format
34 \*---------------------------------------------------------------------------*/
36 #ifndef foamChemistryReader_H
37 #define foamChemistryReader_H
39 #include "chemistryReader.H"
42 #include "HashPtrTable.H"
43 #include "SLPtrList.H"
44 #include "labelList.H"
45 #include "speciesTable.H"
46 #include "atomicWeights.H"
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 /*---------------------------------------------------------------------------*\
54 Class foamChemistry Declaration
55 \*---------------------------------------------------------------------------*/
57 template<class ThermoType>
58 class foamChemistryReader
60 public chemistryReader<ThermoType>
62 //- Table of the thermodynamic data given in the foamChemistry file
63 HashPtrTable<ThermoType> speciesThermo_;
66 speciesTable speciesTable_;
68 //- List of the reactions
69 SLPtrList<Reaction<ThermoType> > 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&);
83 //- Runtime type information
84 TypeName("foamChemistryReader");
89 //- Construct from foamChemistry and thermodynamics file names
92 const fileName& reactionsFileName,
93 const fileName& thermoFileName
96 //- Construct by getting the foamChemistry and thermodynamics file names
98 foamChemistryReader(const dictionary& thermoDict);
102 virtual ~foamChemistryReader()
109 const speciesTable& species() const
111 return speciesTable_;
114 //- Table of the thermodynamic data given in the foamChemistry file
115 const HashPtrTable<ThermoType>& speciesThermo() const
117 return speciesThermo_;
120 //- List of the reactions
121 const SLPtrList<Reaction<ThermoType> >& reactions() const
128 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 } // End namespace Foam
132 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 # include "foamChemistryReader.C"
138 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 // ************************************************************************* //