diffusionMulticomponent.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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2015 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::combustionModels::diffusionMulticomponent
28 
29 Group
30  grpCombustionModels
31 
32 Description
33  Diffusion based turbulent combustion model for multicomponent species.
34 
35  The model calculates the laminar finite rate source terms based on
36  the kinetic for each reaction in order to begin the combustion and
37  evaluates the minimum between this and the cross diffusion rate term
38  defined as D*prob*muEff*mag(grad(Yi)*grad(Yj)) if laminarIgn is true.
39 
40  where:
41 
42  D : is a model dynamic constant defined as C*f02 where:
43  C is a model constant
44  f02 = 1 + sqr(O2/oxidantRes), oxidantRes is an user input
45 
46  muEff : is the effective turbulent viscosity
47  prob : is a normalized Gaussian shaped distribution around the stoichiometric
48  value of each reaction. The distribution is controlled by 'sigma'
49  for standard deviation and ftCorr for correction of the stoichiometric
50  value.
51 
52  In the combustion properties dictionary:
53 
54  diffusionMulticomponentCoeffs
55  {
56  Ci (1.0 1.0); // Default to 1
57  fuels (CH4 CO);
58  oxidants (O2 O2);
59  YoxStream (0.23 0.23); // Default to 0.23
60  YfStream (1.0 1.0); // Default to 1.0
61  sigma (0.02 0.02); // Default to 0.02
62  oxidantRes (0.025 0.005);
63  ftCorr (0.0 0.0); // Default to 0.0
64  laminarIgn false; // Default false
65  }
66 
67 
68 SourceFiles
69  diffusionMulticomponent.C
70 
71 \*---------------------------------------------------------------------------*/
72 
73 #ifndef diffusionMulticomponent_H
74 #define diffusionMulticomponent_H
75 
76 #include "ChemistryCombustion.H"
77 #include "scalarList.H"
78 #include "tmp.H"
79 #include "Reaction.H"
80 
81 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
82 
83 namespace Foam
84 {
85 namespace combustionModels
86 {
87 
88 /*---------------------------------------------------------------------------*\
89  Class diffusionMulticomponent Declaration
90 \*---------------------------------------------------------------------------*/
91 
92 template<class ReactionThermo, class ThermoType>
94 :
95  public ChemistryCombustion<ReactionThermo>
96 {
97  // Private data
98 
99  //- Reactions
100  const PtrList<Reaction<ThermoType>>& reactions_;
101 
102  //- Thermodynamic data of the species
103  const PtrList<ThermoType>& specieThermo_;
104 
105  //- Pointer list of source terms
106  PtrList<volScalarField> RijPtr_;
107 
108  //- Model constants
109  scalarList Ci_;
110 
111  //- List of fuels for each reaction
112  wordList fuelNames_;
113 
114  //- List of oxidants for each reaction
115  wordList oxidantNames_;
116 
117  //- Heat of combustion [J/Kg]
118  scalarList qFuel_;
119 
120  //- Stoichiometric air-fuel mass ratio
121  scalarList stoicRatio_;
122 
123  //- Stoichiometric oxygen-fuel mass ratio
124  scalarList s_;
125 
126  //- Oxidizer stream mass concentrations
127  scalarList YoxStream_;
128 
129  //- Fuel stream mass concentrations
130  scalarList YfStream_;
131 
132  //- Mean distribution for gaussian probability
133  scalarList sigma_;
134 
135  //- Residual oxidizer
136  scalarList oxidantRes_;
137 
138  //- ft stoichiometric correction
139  scalarList ftCorr_;
140 
141  //- Relaxation factor on total source
142  scalar alpha_;
143 
144  //- Switch on to laminar combustion for ignition
145  bool laminarIgn_;
146 
147 
148  // Private Member Functions
149 
150  //- Return the chemical time scale
151  tmp<volScalarField> tc() const;
152 
153  //- Initialize
154  void init();
155 
156  //- No copy construct
158 
159  //- No copy assignment
160  void operator=(const diffusionMulticomponent&) = delete;
161 
162 
163 public:
164 
165  //- Runtime type information
166  TypeName("diffusionMulticomponent");
167 
168 
169  // Constructors
170 
171  //- Construct from components
173  (
174  const word& modelType,
175  ReactionThermo& thermo,
177  const word& combustionProperties
178  );
179 
180 
181  //- Destructor
182  virtual ~diffusionMulticomponent() = default;
183 
184 
185  // Member Functions
186 
187  // Evolution
188 
189  //- Correct combustion rate
190  virtual void correct();
191 
192  //- Fuel consumption rate matrix.
193  virtual tmp<fvScalarMatrix> R(volScalarField& Y) const;
194 
195  //- Heat release rate calculated from fuel consumption rate matrix
196  virtual tmp<volScalarField> Qdot() const;
197 
198 
199  // IO
200 
201  //- Update properties from given dictionary
202  virtual bool read();
203 };
204 
205 
206 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
207 
208 } // End namespace combustionModels
209 } // End namespace Foam
210 
211 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
212 
213 #ifdef NoRepository
214 # include "diffusionMulticomponent.C"
215 #endif
216 
217 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218 
219 #endif
220 
221 // ************************************************************************* //
Foam::combustionModels::diffusionMulticomponent::Qdot
virtual tmp< volScalarField > Qdot() const
Heat release rate calculated from fuel consumption rate matrix.
Definition: diffusionMulticomponent.C:396
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::combustionModels::diffusionMulticomponent::R
virtual tmp< fvScalarMatrix > R(volScalarField &Y) const
Fuel consumption rate matrix.
Definition: diffusionMulticomponent.C:373
thermo
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
scalarList.H
Foam::combustionModels::diffusionMulticomponent::~diffusionMulticomponent
virtual ~diffusionMulticomponent()=default
Destructor.
Foam::ChemistryCombustion
Chemistry model wrapper for combustion models.
Definition: ChemistryCombustion.H:53
diffusionMulticomponent.C
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:59
Foam::combustionModels::diffusionMulticomponent::correct
virtual void correct()
Correct combustion rate.
Definition: diffusionMulticomponent.C:183
Foam::combustionModels::diffusionMulticomponent
Diffusion based turbulent combustion model for multicomponent species.
Definition: diffusionMulticomponent.H:92
Reaction.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Y
PtrList< volScalarField > & Y
Definition: createFieldRefs.H:7
Foam::combustionModels::diffusionMulticomponent::read
virtual bool read()
Update properties from given dictionary.
Definition: diffusionMulticomponent.C:429
tmp.H
Foam::List< scalar >
ChemistryCombustion.H
Foam::combustionModels::diffusionMulticomponent::TypeName
TypeName("diffusionMulticomponent")
Runtime type information.
Foam::GeometricField< scalar, fvPatchField, volMesh >
turb
compressible::turbulenceModel & turb
Definition: setRegionFluidFields.H:10
Foam::compressibleTurbulenceModel
Abstract base class for turbulence models (RAS, LES and laminar).
Definition: compressibleTurbulenceModel.H:54