FreeFOAM The Cross-Platform CFD Toolkit
foamChemistryReader.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
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
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
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.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::foamChemistryReader
26 
27 Description
28  Chemistry reader for OpenFOAM format
29 
30 SourceFiles
31  foamChemistryReader.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef foamChemistryReader_H
36 #define foamChemistryReader_H
37 
39 #include <OpenFOAM/fileName.H>
40 #include <OpenFOAM/typeInfo.H>
41 #include <OpenFOAM/HashPtrTable.H>
42 #include <OpenFOAM/SLPtrList.H>
43 #include <OpenFOAM/labelList.H>
44 #include <specie/speciesTable.H>
45 #include <specie/atomicWeights.H>
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class foamChemistry Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class ThermoType>
58 :
59  public chemistryReader<ThermoType>
60 {
61  //- Table of the thermodynamic data given in the foamChemistry file
62  HashPtrTable<ThermoType> speciesThermo_;
63 
64  //- Table of species
65  speciesTable speciesTable_;
66 
67  //- List of the reactions
68  SLPtrList<Reaction<ThermoType> > reactions_;
69 
70 
71  // Private Member Functions
72 
73  //- Disallow default bitwise copy construct
75 
76  //- Disallow default bitwise assignment
77  void operator=(const foamChemistryReader&);
78 
79 
80 public:
81 
82  //- Runtime type information
83  TypeName("foamChemistryReader");
84 
85 
86  // Constructors
87 
88  //- Construct from foamChemistry and thermodynamics file names
90  (
91  const fileName& reactionsFileName,
92  const fileName& thermoFileName
93  );
94 
95  //- Construct by getting the foamChemistry and thermodynamics file names
96  // from dictionary
97  foamChemistryReader(const dictionary& thermoDict);
98 
99 
100  //- Destructor
102  {}
103 
104 
105  // Member functions
106 
107  //- Table of species
108  const speciesTable& species() const
109  {
110  return speciesTable_;
111  }
112 
113  //- Table of the thermodynamic data given in the foamChemistry file
115  {
116  return speciesThermo_;
117  }
118 
119  //- List of the reactions
121  {
122  return reactions_;
123  }
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #ifdef NoRepository
134 # include "foamChemistryReader.C"
135 #endif
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 #endif
140 
141 // ************************ vim: set sw=4 sts=4 et: ************************ //