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-2020 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  //- Fuel consumption rate matrix
167  virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
168 
169  //- Heat release rate [kg/m/s^3]
170  virtual tmp<volScalarField> Qdot() const;
171 
172  //- Update properties from given dictionary
173  virtual bool read();
174 
175  //- Calculates the residual for all components
176  void fresCorrect();
177 
178 
179  // Member Operators
180 
181  //- Disallow default bitwise assignment
182  void operator=(const singleStepCombustion&) = delete;
183 };
184 
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 } // End namespace combustionModels
189 } // End namespace Foam
190 
191 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
192 
193 #include "singleStepCombustionI.H"
194 
195 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
196 
197 #endif
198 
199 // ************************************************************************* //
void calculateMaxProducts()
Calculate maximum products at stoichiometric mixture.
volScalarField wFuel_
Fuel consumption rate.
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
dimensionedScalar s_
Stoichiometric oxygen-fuel mass ratio.
dimensionedScalar stoicRatio_
Stoichiometric air-fuel mass ratio.
label fuelIndex() const
Return the fuel specie index.
const basicSpecieMixture & mixture_
Reference to the mixture.
scalarList Yprod0_
Mass concentrations at stoichiometric mixture for fres.
Base-class for multi-component fluid thermodynamic properties.
singleStepCombustion(const word &modelType, const fluidReactionThermo &thermo, const compressibleMomentumTransportModel &turb, const word &combustionProperties)
Construct from components.
PtrList< volScalarField > fres_
List of components residual.
Specialisation of basicMixture for a mixture consisting of a number for molecular species...
const dimensionedScalar & s() const
Return the Stoichiometric oxygen-fuel mass ratio.
const scalarList & Yprod0() const
Return the list of products mass concentrations.
Reaction base-class holding the specie names and coefficients.
Definition: reaction.H:56
bool semiImplicit_
Semi-implicit (true) or explicit (false) treatment.
A class for handling words, derived from string.
Definition: word.H:59
virtual tmp< fvScalarMatrix > R(volScalarField &Y) const
Fuel consumption rate matrix.
const List< scalar > & specieStoichCoeffs() const
Return the stoichiometric coefficient for the reaction.
scalarList specieStoichCoeffs_
Stoichiometric coefficient for the reaction.
Base class for combustion models.
const reaction & singleReaction() const
Return the single step reaction.
dimensionedScalar qFuel_
Heat of combustion [J/Kg].
const dimensionedScalar & stoicRatio() const
Return the stoichiometric air-fuel mass ratio.
void operator=(const singleStepCombustion &)=delete
Disallow default bitwise assignment.
const basicSpecieMixture & mixture() const
Return the mixture.
virtual bool read()
Update properties from given 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:70
tmp< volScalarField > fres(const label index) const
Return the list of components residual.
PtrList< volScalarField > & Y
const dimensionedScalar & qFuel() const
Return the heat of combustion [J/Kg].
Base class for combustion models using basicSpecieMixture.
List< int > specieProd_
List to indicate if specie is produced/consumed.
A class for managing temporary objects.
Definition: PtrList.H:53
reaction reaction_
The single-step reaction.
virtual tmp< volScalarField > Qdot() const
Heat release rate [kg/m/s^3].
void fresCorrect()
Calculates the residual for all components.
void massAndAirStoichRatios()
Calculate air/fuel and oxygen/fuel ratio.
Abstract base class for turbulence models (RAS, LES and laminar).
const List< int > & specieProd() const
Return the list to indicate if specie is produced/consumed.
Namespace for OpenFOAM.
const fluidReactionThermo & thermo() const
Return const access to the thermo.