singleStepCombustion.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2023 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::combustionModels::singleStepCombustion
26 
27 Description
28  Base class for combustion models using basicSpecieMixture.
29 
30 SourceFiles
31  singleStepCombustion.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef singleStepCombustion_H
36 #define singleStepCombustion_H
37 
38 #include "combustionModel.H"
39 #include "basicSpecieMixture.H"
40 #include "reaction.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 namespace combustionModels
47 {
48 
49 /*---------------------------------------------------------------------------*\
50  Class singleStepCombustion Declaration
51 \*---------------------------------------------------------------------------*/
52 
54 :
55  public combustionModel
56 {
57 protected:
58 
59  // Protected data
60 
61  //- Reference to the mixture
63 
64  //- The single-step reaction
66 
67  //- Stoichiometric air-fuel mass ratio
69 
70  //- Stoichiometric oxygen-fuel mass ratio
72 
73  //- Heat of combustion [J/Kg]
75 
76  //- Stoichiometric coefficient for the reaction.
78 
79  //- Mass concentrations at stoichiometric mixture for fres.
81 
82  //- List of components residual
84 
85  //- Fuel specie index
87 
88  //- List to indicate if specie is produced/consumed
90 
91  //- Fuel consumption rate
93 
94  //- Semi-implicit (true) or explicit (false) treatment
95  bool semiImplicit_;
96 
97 
98  // Protected member functions
99 
100  //- Calculate qFuel
101  void calculateqFuel();
102 
103  //- Calculate air/fuel and oxygen/fuel ratio
104  void massAndAirStoichRatios();
105 
106  //- Calculate maximum products at stoichiometric mixture
107  void calculateMaxProducts();
108 
109 
110 public:
111 
112  // Constructors
113 
114  //- Construct from components
116  (
117  const word& modelType,
120  const word& combustionProperties
121  );
122 
123  //- Disallow default bitwise copy construction
125 
126 
127  //- Destructor
128  virtual ~singleStepCombustion();
129 
130 
131  // Member Functions
132 
133  // Access functions
134 
135  //- Return the mixture
136  const basicSpecieMixture& mixture() const;
137 
138  //- Return the single step reaction
139  inline const reaction& singleReaction() const;
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 fuel specie index
157  inline label fuelIndex() const;
158 
159  //- Return the list to indicate if specie is produced/consumed
160  inline const List<int>& specieProd() const;
161 
162  //- Return the list of products mass concentrations
163  inline const scalarList& Yprod0() const;
164 
165 
166  //- Specie consumption rate field
167  virtual tmp<volScalarField::Internal> R(const label speciei) const;
168 
169  //- Specie consumption rate matrix
170  virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
171 
172  //- Heat release rate [kg/m/s^3]
173  virtual tmp<volScalarField> Qdot() const;
174 
175  //- Update properties from given dictionary
176  virtual bool read();
177 
178  //- Calculates the residual for all components
179  void fresCorrect();
180 
181 
182  // Member Operators
183 
184  //- Disallow default bitwise assignment
185  void operator=(const singleStepCombustion&) = delete;
186 };
187 
188 
189 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
190 
191 } // End namespace combustionModels
192 } // End namespace Foam
193 
194 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
195 
196 #include "singleStepCombustionI.H"
197 
198 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
199 
200 #endif
201 
202 // ************************************************************************* //
Generic GeometricField class.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: PtrList.H:75
Specialisation of basicMixture for a mixture consisting of a number for molecular species.
Base class for combustion models.
const fluidMulticomponentThermo & thermo() const
Return const access to the thermo.
Base class for combustion models using basicSpecieMixture.
const scalarList & Yprod0() const
Return the list of products mass concentrations.
dimensionedScalar s_
Stoichiometric oxygen-fuel mass ratio.
void fresCorrect()
Calculates the residual for all components.
void operator=(const singleStepCombustion &)=delete
Disallow default bitwise assignment.
tmp< volScalarField > fres(const label index) const
Return the list of components residual.
const reaction & singleReaction() const
Return the single step reaction.
scalarList Yprod0_
Mass concentrations at stoichiometric mixture for fres.
dimensionedScalar stoicRatio_
Stoichiometric air-fuel mass ratio.
void calculateMaxProducts()
Calculate maximum products at stoichiometric mixture.
reaction reaction_
The single-step reaction.
const dimensionedScalar & stoicRatio() const
Return the stoichiometric air-fuel mass ratio.
const List< scalar > & specieStoichCoeffs() const
Return the stoichiometric coefficient for the reaction.
const dimensionedScalar & qFuel() const
Return the heat of combustion [J/Kg].
const basicSpecieMixture & mixture_
Reference to the mixture.
List< int > specieProd_
List to indicate if specie is produced/consumed.
volScalarField wFuel_
Fuel consumption rate.
PtrList< volScalarField > fres_
List of components residual.
const dimensionedScalar & s() const
Return the Stoichiometric oxygen-fuel mass ratio.
const List< int > & specieProd() const
Return the list to indicate if specie is produced/consumed.
label fuelIndex() const
Return the fuel specie index.
singleStepCombustion(const word &modelType, const fluidMulticomponentThermo &thermo, const compressibleMomentumTransportModel &turb, const word &combustionProperties)
Construct from components.
void massAndAirStoichRatios()
Calculate air/fuel and oxygen/fuel ratio.
scalarList specieStoichCoeffs_
Stoichiometric coefficient for the reaction.
virtual tmp< volScalarField::Internal > R(const label speciei) const
Specie consumption rate field.
bool semiImplicit_
Semi-implicit (true) or explicit (false) treatment.
const basicSpecieMixture & mixture() const
Return the mixture.
virtual tmp< volScalarField > Qdot() const
Heat release rate [kg/m/s^3].
dimensionedScalar qFuel_
Heat of combustion [J/Kg].
virtual bool read()
Update properties from given dictionary.
Base class for single-phase compressible turbulence models.
Base-class for multi-component fluid thermodynamic properties.
Reaction base-class holding the specie names and coefficients.
Definition: reaction.H:57
A class for managing temporary objects.
Definition: tmp.H:55
A class for handling words, derived from string.
Definition: word.H:62
Namespace for OpenFOAM.
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
PtrList< volScalarField > & Y