rhoReactionThermo.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2015 OpenFOAM Foundation
9  Copyright (C) 2017-2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::rhoReactionThermo
29 
30 Group
31  grpRhoThermo
32 
33 Description
34  Foam::rhoReactionThermo
35 
36 SourceFiles
37  rhoReactionThermo.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef rhoReactionThermo_H
42 #define rhoReactionThermo_H
43 
44 #include "rhoThermo.H"
45 #include "basicSpecieMixture.H"
46 #include "autoPtr.H"
47 #include "runTimeSelectionTables.H"
48 #include "specieElement.H"
49 
50 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
51 
52 namespace Foam
53 {
54 
55 typedef HashTable<List<specieElement>> speciesCompositionTable;
56 
57 /*---------------------------------------------------------------------------*\
58  Class rhoReactionThermo Declaration
59 \*---------------------------------------------------------------------------*/
60 
62 :
63  public rhoThermo
64 {
65 public:
66 
67  //- Runtime type information
68  TypeName("rhoReactionThermo");
69 
70 
71  //- Declare run-time constructor selection tables
73  (
74  autoPtr,
76  fvMesh,
77  (const fvMesh& mesh, const word& phaseName),
78  (mesh, phaseName)
79  );
80 
81 
82  //- Declare run-time constructor selection table for dictionary based
84  (
85  autoPtr,
87  fvMeshDictPhase,
88  (const fvMesh& mesh, const word& phaseName, const word& dictName),
89  (mesh, phaseName, dictName)
90  );
91 
92 
93  // Constructors
94 
95  //- Construct from mesh and phase name
97  (
98  const fvMesh&,
99  const word& phaseName
100  );
101 
102 
103  //- Construct from mesh,dictionary,phase name with a single temperature
105  (
106  const fvMesh&,
107  const word& phaseName,
108  const word& dictName
109  );
110 
111 
112  // Selectors
113 
114  //- Standard selection based on fvMesh
116  (
117  const fvMesh&,
118  const word& phaseName=word::null
119  );
120 
121 
122  //- Selector based on mesh, phase name and dictionary
124  (
125  const fvMesh&,
126  const word& phaseName,
127  const word& dictName
128  );
129 
130 
131  //- Destructor
132  virtual ~rhoReactionThermo();
133 
134 
135  // Member functions
136 
137  //- Return the composition of the multi-component mixture
138  virtual basicSpecieMixture& composition() = 0;
139 
140  //- Return the composition of the multi-component mixture
141  virtual const basicSpecieMixture& composition() const = 0;
142 
143  //- Table of species composition
145  {
146  return
148  (
150  );
151  }
152 };
153 
154 
155 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
156 
157 } // End namespace Foam
158 
159 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
160 
161 #endif
162 
163 // ************************************************************************* //
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::rhoReactionThermo::composition
virtual basicSpecieMixture & composition()=0
Return the composition of the multi-component mixture.
Foam::rhoReactionThermo::TypeName
TypeName("rhoReactionThermo")
Runtime type information.
Foam::basicSpecieMixture
Specialization of basicMultiComponentMixture for a mixture consisting of a number for molecular speci...
Definition: basicSpecieMixture.H:58
Foam::rhoReactionThermo
Foam::rhoReactionThermo.
Definition: rhoReactionThermo.H:60
Foam::speciesCompositionTable
HashTable< List< specieElement > > speciesCompositionTable
Definition: chemistryReader.H:54
rhoThermo.H
specieElement.H
Foam::rhoThermo
Basic thermodynamic properties based on density.
Definition: rhoThermo.H:55
Foam::rhoReactionThermo::specieComposition
autoPtr< speciesCompositionTable > specieComposition() const
Table of species composition.
Definition: rhoReactionThermo.H:143
Foam::rhoReactionThermo::rhoReactionThermo
rhoReactionThermo(const fvMesh &, const word &phaseName)
Construct from mesh and phase name.
Definition: rhoReactionThermo.C:44
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::rhoReactionThermo::~rhoReactionThermo
virtual ~rhoReactionThermo()
Destructor.
Definition: rhoReactionThermo.C:88
Foam::word::null
static const word null
An empty word.
Definition: word.H:80
Foam::rhoReactionThermo::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, rhoReactionThermo, fvMesh,(const fvMesh &mesh, const word &phaseName),(mesh, phaseName))
Declare run-time constructor selection tables.
Foam::rhoReactionThermo::New
static autoPtr< rhoReactionThermo > New(const fvMesh &, const word &phaseName=word::null)
Standard selection based on fvMesh.
Definition: rhoReactionThermo.C:67
basicSpecieMixture.H
autoPtr.H
Foam::dictionary::dictName
word dictName() const
The local dictionary name (final part of scoped name)
Definition: dictionaryI.H:60