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 single-step combustion models
29 
30 SourceFiles
31  singleStepCombustion.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef singleStepCombustion_H
36 #define singleStepCombustion_H
37 
38 #include "combustionModel.H"
39 #include "reaction.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace combustionModels
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class singleStepCombustion Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
54  public combustionModel
55 {
56 protected:
57 
58  // Protected data
59 
60  //- The single-step reaction
62 
63  //- Stoichiometric air-fuel mass ratio
65 
66  //- Stoichiometric oxygen-fuel mass ratio
68 
69  //- Heat of combustion [J/Kg]
71 
72  //- Stoichiometric coefficient for the reaction.
74 
75  //- Mass concentrations at stoichiometric mixture for fres.
77 
78  //- List of components residual
80 
81  //- Fuel specie index
83 
84  //- List to indicate if specie is produced/consumed
86 
87  //- Fuel consumption rate
89 
90  //- Semi-implicit (true) or explicit (false) treatment
91  bool semiImplicit_;
92 
93 
94  // Protected member functions
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  // Constructors
109 
110  //- Construct from components
112  (
113  const word& modelType,
116  const word& combustionProperties
117  );
118 
119  //- Disallow default bitwise copy construction
121 
122 
123  //- Destructor
124  virtual ~singleStepCombustion();
125 
126 
127  // Member Functions
128 
129  // Access functions
130 
131  //- Return the single step reaction
132  inline const reaction& singleReaction() const;
133 
134  //- Return the stoichiometric air-fuel mass ratio
135  inline const dimensionedScalar& stoicRatio() const;
136 
137  //- Return the Stoichiometric oxygen-fuel mass ratio
138  inline const dimensionedScalar& s() const;
139 
140  //- Return the heat of combustion [J/Kg]
141  inline const dimensionedScalar& qFuel() const;
142 
143  //- Return the stoichiometric coefficient for the reaction
144  inline const List<scalar>& specieStoichCoeffs() const;
145 
146  //- Return the list of components residual
147  inline tmp<volScalarField> fres(const label index) const;
148 
149  //- Return the fuel specie index
150  inline label fuelIndex() const;
151 
152  //- Return the list to indicate if specie is produced/consumed
153  inline const List<int>& specieProd() const;
154 
155  //- Return the list of products mass concentrations
156  inline const scalarList& Yprod0() const;
157 
158 
159  //- Specie consumption rate field
160  virtual tmp<volScalarField::Internal> R(const label speciei) const;
161 
162  //- Specie consumption rate matrix
163  virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
164 
165  //- Heat release rate [kg/m/s^3]
166  virtual tmp<volScalarField> Qdot() const;
167 
168  //- Update properties from given dictionary
169  virtual bool read();
170 
171  //- Calculates the residual for all components
172  void fresCorrect();
173 
174 
175  // Member Operators
176 
177  //- Disallow default bitwise assignment
178  void operator=(const singleStepCombustion&) = delete;
179 };
180 
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 } // End namespace combustionModels
185 } // End namespace Foam
186 
187 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
188 
189 #include "singleStepCombustionI.H"
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #endif
194 
195 // ************************************************************************* //
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
Base class for combustion models.
const fluidMulticomponentThermo & thermo() const
Return const access to the thermo.
Base class for single-step combustion models.
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].
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.
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