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) 2011 OpenFOAM Foundation
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 
38 #include "chemistryReader.H"
39 #include "fileName.H"
40 #include "typeInfo.H"
41 #include "HashPtrTable.H"
42 #include "labelList.H"
43 #include "speciesTable.H"
44 #include "atomicWeights.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class foamChemistry Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 template<class ThermoType>
57 :
58  public chemistryReader<ThermoType>
59 {
60  //- Chemistry/reactions dictionary
62 
63  //- Thermo properties dictionary
65 
66  //- Table of the thermodynamic data given in the foamChemistry file
68 
69  //- Table of species
71 
72  //- List of the reactions
74 
75 
76  // Private Member Functions
77 
78  //- Set the species list
80 
81  //- Disallow default bitwise copy construct
83 
84  //- Disallow default bitwise assignment
85  void operator=(const foamChemistryReader&);
86 
87 
88 public:
89 
90  //- Runtime type information
91  TypeName("foamChemistryReader");
92 
93 
94  // Constructors
95 
96  //- Construct from foamChemistry and thermodynamics file names
98  (
99  const fileName& reactionsFileName,
101  const fileName& thermoFileName
102  );
103 
104  //- Construct by getting the foamChemistry and thermodynamics file names
105  // from dictionary
107  (
108  const dictionary& thermoDict,
110  );
111 
112 
113  //- Destructor
114  virtual ~foamChemistryReader()
115  {}
116 
117 
118  // Member functions
119 
120  //- Table of species
121  const speciesTable& species() const
122  {
123  return speciesTable_;
124  }
125 
126  //- Table of the thermodynamic data given in the foamChemistry file
128  {
129  return speciesThermo_;
130  }
131 
132  //- List of the reactions
133  const ReactionList<ThermoType>& reactions() const
134  {
135  return reactions_;
136  }
137 };
138 
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 } // End namespace Foam
143 
144 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
145 
146 #ifdef NoRepository
147 # include "foamChemistryReader.C"
148 #endif
149 
150 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
151 
152 #endif
153 
154 // ************************************************************************* //
Foam::chemistryReader
Abstract class for reading chemistry.
Definition: chemistryReader.H:52
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
typeInfo.H
Foam::foamChemistryReader::reactions_
ReactionList< ThermoType > reactions_
List of the reactions.
Definition: foamChemistryReader.H:72
atomicWeights.H
speciesTable.H
Foam::foamChemistryReader::thermoDict_
dictionary thermoDict_
Thermo properties dictionary.
Definition: foamChemistryReader.H:63
Foam::foamChemistryReader::speciesThermo
const HashPtrTable< ThermoType > & speciesThermo() const
Table of the thermodynamic data given in the foamChemistry file.
Definition: foamChemistryReader.H:126
Foam::ReactionList
List of templated reactions.
Definition: ReactionList.H:54
labelList.H
Foam::hashedWordList
A wordList with hashed indices for faster lookup by name.
Definition: hashedWordList.H:57
Foam::foamChemistryReader::speciesThermo_
HashPtrTable< ThermoType > speciesThermo_
Table of the thermodynamic data given in the foamChemistry file.
Definition: foamChemistryReader.H:66
fileName.H
Foam::foamChemistryReader::species
const speciesTable & species() const
Table of species.
Definition: foamChemistryReader.H:120
Foam::foamChemistryReader::chemDict_
dictionary chemDict_
Chemistry/reactions dictionary.
Definition: foamChemistryReader.H:60
Foam::foamChemistryReader::foamChemistryReader
foamChemistryReader(const foamChemistryReader &)
Disallow default bitwise copy construct.
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
foamChemistryReader.C
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::foamChemistryReader
Chemistry reader for OpenFOAM format.
Definition: foamChemistryReader.H:55
Foam::HashPtrTable< ThermoType >
Foam::foamChemistryReader::TypeName
TypeName("foamChemistryReader")
Runtime type information.
HashPtrTable.H
Foam::foamChemistryReader::~foamChemistryReader
virtual ~foamChemistryReader()
Destructor.
Definition: foamChemistryReader.H:113
Foam::foamChemistryReader::reactions
const ReactionList< ThermoType > & reactions() const
List of the reactions.
Definition: foamChemistryReader.H:132
chemistryReader.H
Foam::foamChemistryReader::operator=
void operator=(const foamChemistryReader &)
Disallow default bitwise assignment.
Foam::foamChemistryReader::setSpecies
speciesTable & setSpecies(const dictionary &dict, speciesTable &species)
Set the species list.
Definition: foamChemistryReader.C:34
Foam::foamChemistryReader::speciesTable_
speciesTable & speciesTable_
Table of species.
Definition: foamChemistryReader.H:69