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-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::combustionModels::diffusionMulticomponent
28
29Group
30 grpCombustionModels
31
32Description
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
68SourceFiles
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
83namespace Foam
84{
85namespace combustionModels
86{
87
88/*---------------------------------------------------------------------------*\
89 Class diffusionMulticomponent Declaration
90\*---------------------------------------------------------------------------*/
91
92template<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
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
163public:
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
215#endif
216
217// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
218
219#endif
220
221// ************************************************************************* //
#define R(A, B, C, D, E, F, K, M)
compressible::turbulenceModel & turb
Chemistry model wrapper for combustion models.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: PtrList.H:73
Diffusion based turbulent combustion model for multicomponent species.
virtual void correct()
Correct combustion rate.
TypeName("diffusionMulticomponent")
Runtime type information.
virtual ~diffusionMulticomponent()=default
Destructor.
virtual tmp< volScalarField > Qdot() const
Heat release rate calculated from fuel consumption rate matrix.
virtual bool read()
Update properties from given dictionary.
Abstract base class for turbulence models (RAS, LES and laminar).
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
A class for managing temporary objects.
Definition: tmp.H:65
A class for handling words, derived from Foam::string.
Definition: word.H:68
PtrList< volScalarField > & Y
Namespace for OpenFOAM.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73