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-2016 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  //- Calculate qFuel
91  void calculateqFuel();
92 
93  //- Calculate air/fuel and oxygen/fuel ratio
95 
96  //- Calculate maximum products at stoichiometric mixture
97  void calculateMaxProducts();
98 
99 
100 private:
101 
102  // Private member functions
103 
104  //- Disallow default bitwise copy construct
106 
107  //- Disallow default bitwise assignment
108  void operator=(const singleStepReactingMixture&);
109 
110 
111 public:
112 
113  //- The type of thermo package this mixture is instantiated for
114  typedef ThermoType thermoType;
115 
116 
117  // Constructors
118 
119  //- Construct from dictionary, mesh and phase name
121  (
122  const dictionary&,
123  const fvMesh&,
124  const word&
125  );
126 
127 
128  //- Destructor
130  {}
131 
132 
133  // Member functions
134 
135  //- Calculates the residual for all components
136  void fresCorrect();
137 
138 
139  // Access functions
140 
141  //- Return the stoichiometric air-fuel mass ratio
142  inline const dimensionedScalar stoicRatio() const;
143 
144  //- Return the Stoichiometric oxygen-fuel mass ratio
145  inline const dimensionedScalar s() const;
146 
147  //- Return the heat of combustion [J/Kg]
148  inline const dimensionedScalar qFuel() const;
149 
150  //- Return the stoichiometric coefficient for the reaction
151  inline const List<scalar>& specieStoichCoeffs() const;
152 
153  //- Return the list of components residual
154  inline tmp<volScalarField> fres(const label index) const;
155 
156  //- Return the inert specie index
157  inline label inertIndex() const;
158 
159  //- Return the fuel specie index
160  inline label fuelIndex() const;
161 
162  //- Return the list to indicate if specie is produced/consumed
163  inline const List<int>& specieProd() const;
164 
165  //- Return the list of products mass concentrations
166  inline const scalarList& Yprod0() const;
167 
168 
169  // I-O
170 
171  //- Read dictionary
172  void read(const dictionary&);
173 };
174 
175 
176 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
177 
178 } // End namespace Foam
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
183 
184 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
185 
186 #ifdef NoRepository
187  #include "singleStepReactingMixture.C"
188 #endif
189 
190 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
191 
192 #endif
193 
194 // ************************************************************************* //
tmp< volScalarField > fres(const label index) const
Return the list of components residual.
Foam::reactingMixture.
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
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Single step reacting mixture.
virtual ~singleStepReactingMixture()
Destructor.
void massAndAirStoichRatios()
Calculate air/fuel and oxygen/fuel ratio.
dimensionedScalar s_
Stoichiometric oxygen-fuel mass ratio.
label fuelIndex() const
Return the fuel specie index.
const dimensionedScalar qFuel() const
Return the heat of combustion [J/Kg].
scalarList specieStoichCoeffs_
Stoichiometric coefficient for the reaction.
const dimensionedScalar stoicRatio() const
Return the stoichiometric air-fuel mass ratio.
A class for handling words, derived from string.
Definition: word.H:59
List< int > specieProd_
List to indicate if specie is produced/consumed.
const List< scalar > & specieStoichCoeffs() const
Return the stoichiometric coefficient for the reaction.
const scalarList & Yprod0() const
Return the list of products mass concentrations.
const List< int > & specieProd() const
Return the list to indicate if specie is produced/consumed.
PtrList< volScalarField > fres_
List of components residual.
void calculateMaxProducts()
Calculate maximum products at stoichiometric mixture.
void read(const dictionary &)
Read dictionary.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: List.H:62
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
scalarList Yprod0_
Mass concentrations at stoichiometric mixture for fres.
ThermoType thermoType
The type of thermo package this mixture is instantiated for.
const dimensionedScalar s() const
Return the Stoichiometric oxygen-fuel mass ratio.
A class for managing temporary objects.
Definition: PtrList.H:54
dimensionedScalar qFuel_
Heat of combustion [J/Kg].
label inertIndex() const
Return the inert specie index.
dimensionedScalar stoicRatio_
Stoichiometric air-fuel mass ratio.
void fresCorrect()
Calculates the residual for all components.
Namespace for OpenFOAM.