singleStepReactingMixture.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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::singleStepReactingMixture
28
29Group
30 grpReactionThermophysicalMixtures
31
32Description
33 Single step reacting mixture
34
35SourceFiles
36 singleStepReactingMixture.C
37
38\*---------------------------------------------------------------------------*/
39
40#ifndef singleStepReactingMixture_H
41#define singleStepReactingMixture_H
42
43#include "chemistryReader.H"
44#include "reactingMixture.H"
45
46// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47
48namespace Foam
49{
50
51/*---------------------------------------------------------------------------*\
52 Class singleStepReactingMixture Declaration
53\*---------------------------------------------------------------------------*/
54
55template<class ThermoType>
57:
58 public reactingMixture<ThermoType>
59{
60
61protected:
62
63 // Protected data
64
65 //- Stoichiometric air-fuel mass ratio
67
68 //- Stoichiometric oxygen-fuel mass ratio
70
71 //- Heat of combustion [J/Kg]
73
74 //- Stoichiometric coefficient for the reaction.
76
77 //- Mass concentrations at stoichiometric mixture for fres.
79
80 //- List of components residual
82
83 //- Inert specie index
84 label inertIndex_;
85
86 //- Fuel specie index
87 label fuelIndex_;
88
89 //- List to indicate if specie is produced/consumed
91
92
93 // Protected member functions
94
95 //- Calculate qFuel
96 void calculateqFuel();
97
98 //- Calculate air/fuel and oxygen/fuel ratio
100
101 //- Calculate maximum products at stoichiometric mixture
103
104
105private:
106
107 // Private member functions
108
109 //- No copy construct
111
112 //- No copy assignment
113 void operator=(const singleStepReactingMixture&) = delete;
114
115
116public:
117
118 //- The type of thermo package this mixture is instantiated for
119 typedef ThermoType thermoType;
120
121
122 // Constructors
123
124 //- Construct from dictionary, mesh and phase name
126 (
127 const dictionary&,
128 const fvMesh&,
129 const word&
130 );
131
132
133 //- Destructor
134 virtual ~singleStepReactingMixture() = default;
135
136
137 // Member functions
138
139 //- Return the instantiated type name
140 static word typeName()
141 {
142 return "singleStepReactingMixture<" + ThermoType::typeName() + '>';
143 }
144
145 //- Calculates the residual for all components
146 void fresCorrect();
147
148
149 // Access functions
150
151 //- Return the stoichiometric air-fuel mass ratio
152 inline const dimensionedScalar stoicRatio() const;
153
154 //- Return the Stoichiometric oxygen-fuel mass ratio
155 inline const dimensionedScalar s() const;
156
157 //- Return the heat of combustion [J/Kg]
158 inline const dimensionedScalar qFuel() const;
159
160 //- Return the stoichiometric coefficient for the reaction
161 inline const List<scalar>& specieStoichCoeffs() const;
162
163 //- Return the list of components residual
164 inline tmp<volScalarField> fres(const label index) const;
165
166 //- Return the inert specie index
167 inline label inertIndex() const;
168
169 //- Return the fuel specie index
170 inline label fuelIndex() const;
171
172 //- Return the list to indicate if specie is produced/consumed
173 inline const List<int>& specieProd() const;
174
175 //- Return the list of products mass concentrations
176 inline const scalarList& Yprod0() const;
177
178
179 // I-O
180
181 //- Read dictionary
182 void read(const dictionary&);
183};
184
185
186// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187
188} // End namespace Foam
189
190// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191
193
194// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195
196#ifdef NoRepository
198#endif
199
200// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
201
202#endif
203
204// ************************************************************************* //
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
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
Foam::reactingMixture.
Single step reacting mixture.
const List< int > & specieProd() const
Return the list to indicate if specie is produced/consumed.
dimensionedScalar s_
Stoichiometric oxygen-fuel mass ratio.
void fresCorrect()
Calculates the residual for all components.
virtual ~singleStepReactingMixture()=default
Destructor.
scalarList Yprod0_
Mass concentrations at stoichiometric mixture for fres.
ThermoType thermoType
The type of thermo package this mixture is instantiated for.
tmp< volScalarField > fres(const label index) const
Return the list of components residual.
label inertIndex() const
Return the inert specie index.
dimensionedScalar stoicRatio_
Stoichiometric air-fuel mass ratio.
static word typeName()
Return the instantiated type name.
void calculateMaxProducts()
Calculate maximum products at stoichiometric mixture.
label fuelIndex() const
Return the fuel specie index.
const dimensionedScalar stoicRatio() const
Return the stoichiometric air-fuel mass ratio.
const List< scalar > & specieStoichCoeffs() const
Return the stoichiometric coefficient for the reaction.
void read(const dictionary &)
Read dictionary.
const dimensionedScalar s() const
Return the Stoichiometric oxygen-fuel mass ratio.
List< int > specieProd_
List to indicate if specie is produced/consumed.
PtrList< volScalarField > fres_
List of components residual.
const scalarList & Yprod0() const
Return the list of products mass concentrations.
void massAndAirStoichRatios()
Calculate air/fuel and oxygen/fuel ratio.
const dimensionedScalar qFuel() const
Return the heat of combustion [J/Kg].
scalarList specieStoichCoeffs_
Stoichiometric coefficient for the reaction.
dimensionedScalar qFuel_
Heat of combustion [J/Kg].
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
Namespace for OpenFOAM.