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-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::reactingMixture
29
30Group
31 grpReactionThermophysicalMixtures
32
33Description
34 Foam::reactingMixture
35
36SourceFiles
37 reactingMixture.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef reactingMixture_H
42#define reactingMixture_H
43
44#include "speciesTable.H"
45#include "chemistryReader.H"
47
48// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49
50namespace Foam
51{
52
53/*---------------------------------------------------------------------------*\
54 Class reactingMixture Declaration
55\*---------------------------------------------------------------------------*/
56
57template<class ThermoType>
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
83public:
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 (
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
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// ************************************************************************* //
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
Simple extension of ReactionThermo to handle reaction kinetics in addition to the equilibrium thermod...
Definition: Reaction.H:73
label size() const noexcept
The number of elements in the list.
Definition: UPtrListI.H:106
friend Ostream & operator(Ostream &os, const UPtrList< T > &list)
Write UPtrList to Ostream.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:126
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:91
A wordList with hashed named lookup, which can be faster in some situations than using the normal lis...
Foam::multiComponentMixture.
Foam::reactingMixture.
ThermoType thermoType
The type of thermo package this mixture is instantiated for.
static word typeName()
Return the instantiated type name.
void read(const dictionary &)
Read dictionary.
virtual ~reactingMixture()=default
Destructor.
virtual autoPtr< speciesCompositionTable > specieComposition() const
Table of species composition.
A class for handling words, derived from Foam::string.
Definition: word.H:68
const dictionary & thermoDict
Definition: EEqn.H:16
dynamicFvMesh & mesh
Namespace for OpenFOAM.
HashTable< List< specieElement > > speciesCompositionTable