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 | Copyright (C) 2011-2015 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::singleStepReactingMixture
26 
27 Description
28  Single step reacting mixture
29 
30 SourceFiles
31  singleStepReactingMixture.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef singleStepReactingMixture_H
36 #define singleStepReactingMixture_H
37 
38 #include "chemistryReader.H"
39 #include "reactingMixture.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class singleStepReactingMixture Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class ThermoType>
52 :
53  public reactingMixture<ThermoType>
54 {
55 
56 protected:
57 
58  // Protected data
59 
60  //- Stoichiometric air-fuel mass ratio
62 
63  //- Stoichiometric oxygen-fuel mass ratio
65 
66  //- Heat of combustion [J/Kg]
68 
69  //- Stoichiometric coefficient for the reaction.
71 
72  //- Mass concentrations at stoichiometric mixture for fres.
74 
75  //- List of components residual
77 
78  //- Inert specie index
80 
81  //- Fuel specie index
83 
84  //- List to indicate if specie is produced/consumed
86 
87 
88  // Protected member functions
89 
90  //- Disallow default bitwise copy construct
92 
93  //- Disallow default bitwise assignment
95 
96  //- Calculate qFuel
97  void calculateqFuel();
98 
99  //- Calculate air/fuel and oxygen/fuel ratio
100  void massAndAirStoichRatios();
101 
102  //- Calculate maximum products at stoichiometric mixture
103  void calculateMaxProducts();
104 
105 
106 public:
107 
108  //- The type of thermo package this mixture is instantiated for
109  typedef ThermoType thermoType;
110 
111 
112  // Constructors
113 
114  //- Construct from dictionary, mesh and phase name
116  (
117  const dictionary&,
118  const fvMesh&,
119  const word&
120  );
121 
122 
123  //- Destructor
125  {}
126 
127 
128  // Member functions
129 
130  //- Calculates the residual for all components
131  void fresCorrect();
132 
133 
134  // Access functions
135 
136  //- Return the stoichiometric air-fuel mass ratio
137  inline const dimensionedScalar stoicRatio() const;
138 
139  //- Return the Stoichiometric oxygen-fuel mass ratio
140  inline const dimensionedScalar s() const;
141 
142  //- Return the heat of combustion [J/Kg]
143  inline const dimensionedScalar qFuel() const;
144 
145  //- Return the stoichiometric coefficient for the reaction
146  inline const List<scalar>& specieStoichCoeffs() const;
147 
148  //- Return the list of components residual
149  inline tmp<volScalarField> fres(const label index) const;
150 
151  //- Return the inert specie index
152  inline label inertIndex() const;
153 
154  //- Return the fuel specie index
155  inline label fuelIndex() const;
156 
157  //- Return the list to indicate if specie is produced/consumed
158  inline const List<int>& specieProd() const;
159 
160  //- Return the list of products mass concentrations
161  inline const scalarList& Yprod0() const;
162 
163 
164  // I-O
165 
166  //- Read dictionary
167  void read(const dictionary&);
168 };
169 
170 
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172 
173 } // End namespace Foam
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 #ifdef NoRepository
182 # include "singleStepReactingMixture.C"
183 #endif
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #endif
188 
189 // ************************************************************************* //
Foam::singleStepReactingMixture::Yprod0
const scalarList & Yprod0() const
Return the list of products mass concentrations.
Definition: singleStepReactingMixtureI.H:99
singleStepReactingMixtureI.H
Foam::singleStepReactingMixture::s_
dimensionedScalar s_
Stoichiometric oxygen-fuel mass ratio.
Definition: singleStepReactingMixture.H:63
Foam::singleStepReactingMixture::thermoType
ThermoType thermoType
The type of thermo package this mixture is instantiated for.
Definition: singleStepReactingMixture.H:108
reactingMixture.H
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::singleStepReactingMixture::specieStoichCoeffs_
scalarList specieStoichCoeffs_
Stoichiometric coefficient for the reaction.
Definition: singleStepReactingMixture.H:69
singleStepReactingMixture.C
Foam::singleStepReactingMixture::singleStepReactingMixture
singleStepReactingMixture(const singleStepReactingMixture &)
Disallow default bitwise copy construct.
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::singleStepReactingMixture::qFuel_
dimensionedScalar qFuel_
Heat of combustion [J/Kg].
Definition: singleStepReactingMixture.H:66
Foam::singleStepReactingMixture::fresCorrect
void fresCorrect()
Calculates the residual for all components.
Definition: singleStepReactingMixture.C:133
Foam::singleStepReactingMixture::specieProd
const List< int > & specieProd() const
Return the list to indicate if specie is produced/consumed.
Definition: singleStepReactingMixtureI.H:91
Foam::singleStepReactingMixture::operator=
void operator=(const singleStepReactingMixture &)
Disallow default bitwise assignment.
Foam::reactingMixture
Foam::reactingMixture.
Definition: reactingMixture.H:51
Foam::singleStepReactingMixture::qFuel
const dimensionedScalar qFuel() const
Return the heat of combustion [J/Kg].
Definition: singleStepReactingMixtureI.H:48
Foam::singleStepReactingMixture::fuelIndex_
label fuelIndex_
Fuel specie index.
Definition: singleStepReactingMixture.H:81
Foam::singleStepReactingMixture::specieProd_
List< int > specieProd_
List to indicate if specie is produced/consumed.
Definition: singleStepReactingMixture.H:84
Foam::singleStepReactingMixture::stoicRatio_
dimensionedScalar stoicRatio_
Stoichiometric air-fuel mass ratio.
Definition: singleStepReactingMixture.H:60
Foam::singleStepReactingMixture::read
void read(const dictionary &)
Read dictionary.
Definition: singleStepReactingMixture.C:255
Foam::singleStepReactingMixture::inertIndex_
label inertIndex_
Inert specie index.
Definition: singleStepReactingMixture.H:78
Foam::singleStepReactingMixture::s
const dimensionedScalar s() const
Return the Stoichiometric oxygen-fuel mass ratio.
Definition: singleStepReactingMixtureI.H:40
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::singleStepReactingMixture::fres
tmp< volScalarField > fres(const label index) const
Return the list of components residual.
Definition: singleStepReactingMixtureI.H:65
Foam::singleStepReactingMixture::fuelIndex
label fuelIndex() const
Return the fuel specie index.
Definition: singleStepReactingMixtureI.H:83
Foam::PtrList
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:61
Foam::dictionary
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:137
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:41
Foam::fvMesh
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
Foam::singleStepReactingMixture::Yprod0_
scalarList Yprod0_
Mass concentrations at stoichiometric mixture for fres.
Definition: singleStepReactingMixture.H:72
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::singleStepReactingMixture::massAndAirStoichRatios
void massAndAirStoichRatios()
Calculate air/fuel and oxygen/fuel ratio.
Definition: singleStepReactingMixture.C:59
Foam::singleStepReactingMixture::inertIndex
label inertIndex() const
Return the inert specie index.
Definition: singleStepReactingMixtureI.H:75
Foam::singleStepReactingMixture::calculateqFuel
void calculateqFuel()
Calculate qFuel.
Definition: singleStepReactingMixture.C:32
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::singleStepReactingMixture
Single step reacting mixture.
Definition: singleStepReactingMixture.H:50
Foam::singleStepReactingMixture::~singleStepReactingMixture
virtual ~singleStepReactingMixture()
Destructor.
Definition: singleStepReactingMixture.H:123
Foam::singleStepReactingMixture::calculateMaxProducts
void calculateMaxProducts()
Calculate maximum products at stoichiometric mixture.
Definition: singleStepReactingMixture.C:83
Foam::singleStepReactingMixture::fres_
PtrList< volScalarField > fres_
List of components residual.
Definition: singleStepReactingMixture.H:75
chemistryReader.H
Foam::singleStepReactingMixture::specieStoichCoeffs
const List< scalar > & specieStoichCoeffs() const
Return the stoichiometric coefficient for the reaction.
Definition: singleStepReactingMixtureI.H:56
Foam::singleStepReactingMixture::stoicRatio
const dimensionedScalar stoicRatio() const
Return the stoichiometric air-fuel mass ratio.
Definition: singleStepReactingMixtureI.H:32