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  Copyright (C) 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::reactingMixture
29 
30 Group
31  grpReactionThermophysicalMixtures
32 
33 Description
34  Foam::reactingMixture
35 
36 SourceFiles
37  reactingMixture.C
38 
39 \*---------------------------------------------------------------------------*/
40 
41 #ifndef reactingMixture_H
42 #define reactingMixture_H
43 
44 #include "speciesTable.H"
45 #include "chemistryReader.H"
46 #include "multiComponentMixture.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class reactingMixture Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 template<class ThermoType>
58 class reactingMixture
59 :
60  public speciesTable,
61  private autoPtr<chemistryReader<ThermoType>>,
62  public multiComponentMixture<ThermoType>,
63  public PtrList<Reaction<ThermoType>>
64 {
65  // Private Member Data
66 
67  //- Table of species composition
68  speciesCompositionTable speciesComposition_;
69 
70 
71  // Private Member Functions
72 
73  //- The chemistry reader
75 
76  //- No copy construct
77  reactingMixture(const reactingMixture&) = delete;
78 
79  //- No copy assignment
80  void operator=(const reactingMixture&) = delete;
81 
82 
83 public:
84 
85  //- The type of thermo package this mixture is instantiated for
86  typedef ThermoType thermoType;
87 
88 
89  // Constructors
90 
91  //- Construct from dictionary, mesh and phase name
93  (
94  const dictionary& thermoDict,
95  const fvMesh& mesh,
96  const word& phaseName
97  );
98 
99 
100  //- Destructor
101  virtual ~reactingMixture() = default;
102 
103 
104  // Member functions
105 
106  //- Return the instantiated type name
107  static word typeName()
108  {
109  return "reactingMixture<" + ThermoType::typeName() + '>';
110  }
111 
112  //- Read dictionary
113  void read(const dictionary&);
114 
115  using PtrList<Reaction<ThermoType>>::size;
116  using PtrList<Reaction<ThermoType>>::operator[];
117 
118  //- Table of species composition
120  {
121  return
123  (
124  new speciesCompositionTable(speciesComposition_)
125  );
126  }
127 };
128 
129 
130 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
131 
132 } // End namespace Foam
133 
134 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 
136 #ifdef NoRepository
137  #include "reactingMixture.C"
138 #endif
139 
140 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
141 
142 #endif
143 
144 // ************************************************************************* //
Foam::reactingMixture::thermoType
ThermoType thermoType
The type of thermo package this mixture is instantiated for.
Definition: reactingMixture.H:85
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::reactingMixture
Foam::reactingMixture.
Definition: reactingMixture.H:57
speciesTable.H
Foam::speciesCompositionTable
HashTable< List< specieElement > > speciesCompositionTable
Definition: chemistryReader.H:54
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::specieComposition
virtual autoPtr< speciesCompositionTable > specieComposition() const
Table of species composition.
Definition: reactingMixture.H:118
Foam::reactingMixture::typeName
static word typeName()
Return the instantiated type name.
Definition: reactingMixture.H:106
Foam::multiComponentMixture
Foam::multiComponentMixture.
Definition: InterfaceCompositionModel.H:51
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:85
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