reactingMixture.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-2017 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::reactingMixture
28 
29 Group
30  grpReactionThermophysicalMixtures
31 
32 Description
33  Foam::reactingMixture
34 
35 SourceFiles
36  reactingMixture.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef reactingMixture_H
41 #define reactingMixture_H
42 
43 #include "speciesTable.H"
44 #include "chemistryReader.H"
45 #include "multiComponentMixture.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 /*---------------------------------------------------------------------------*\
53  Class reactingMixture Declaration
54 \*---------------------------------------------------------------------------*/
55 
56 template<class ThermoType>
57 class reactingMixture
58 :
59  public speciesTable,
60  private autoPtr<chemistryReader<ThermoType>>,
61  public multiComponentMixture<ThermoType>,
62  public PtrList<Reaction<ThermoType>>
63 {
64  // Private Member Data
65 
66  //- Table of species composition
67  speciesCompositionTable speciesComposition_;
68 
69 
70  // Private Member Functions
71 
72  //- The chemistry reader
74 
75  //- No copy construct
76  reactingMixture(const reactingMixture&) = delete;
77 
78  //- No copy assignment
79  void operator=(const reactingMixture&) = delete;
80 
81 
82 public:
83 
84  //- The type of thermo package this mixture is instantiated for
85  typedef ThermoType thermoType;
86 
87 
88  // Constructors
89 
90  //- Construct from dictionary, mesh and phase name
92  (
93  const dictionary& thermoDict,
94  const fvMesh& mesh,
95  const word& phaseName
96  );
97 
98 
99  //- Destructor
100  virtual ~reactingMixture() = default;
101 
102 
103  // Member functions
104 
105  //- Return the instantiated type name
106  static word typeName()
107  {
108  return "reactingMixture<" + ThermoType::typeName() + '>';
109  }
110 
111  //- Read dictionary
112  void read(const dictionary&);
113 
114  using PtrList<Reaction<ThermoType>>::size;
115  using PtrList<Reaction<ThermoType>>::operator[];
116 
117  //- Table of species composition
119  {
120  return speciesComposition_;
121  }
122 };
123 
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 } // End namespace Foam
128 
129 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
130 
131 #ifdef NoRepository
132  #include "reactingMixture.C"
133 #endif
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #endif
138 
139 // ************************************************************************* //
Foam::reactingMixture::thermoType
ThermoType thermoType
The type of thermo package this mixture is instantiated for.
Definition: reactingMixture.H:84
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::reactingMixture
Foam::reactingMixture.
Definition: reactingMixture.H:56
speciesTable.H
Foam::reactingMixture::specieComposition
const speciesCompositionTable & specieComposition() const
Table of species composition.
Definition: reactingMixture.H:117
Foam::hashedWordList
A wordList with hashed named lookup, which can be faster in some situations than using the normal lis...
Definition: hashedWordList.H:54
Foam::reactingMixture::typeName
static word typeName()
Return the instantiated type name.
Definition: reactingMixture.H:105
Foam::multiComponentMixture
Foam::multiComponentMixture.
Definition: InterfaceCompositionModel.H:50
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:62
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:84
Foam::reactingMixture::read
void read(const dictionary &)
Read dictionary.
Definition: reactingMixture.C:81
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::reactingMixture::~reactingMixture
virtual ~reactingMixture()=default
Destructor.
Foam::HashTable< List< specieElement > >
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
thermoDict
const dictionary & thermoDict
Definition: EEqn.H:16
reactingMixture.C
multiComponentMixture.H
chemistryReader.H