DRGEP.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) 2016 OpenFOAM Foundation
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::chemistryReductionMethods::DRGEP
28
29Description
30 The DRGEP algorithm [1] is based on
31
32 |sum_i=1->Nr vAi wi dBi|
33 rAB = --------------------------- ,
34 max(PA, CA)
35
36 PA = sum_i=1->Nr (max (0, vAi wi)) -> production of species A
37
38 CA = sum_i=1->Nr (max (0, -vAi wi)) -> consumption of species A
39
40 where i is the reaction index, Nr the number of reactions, vAi is the net
41 stoechiometric coefficient of species A in the ith reaction (vAi = v''-v')
42 , wi is the progress variable of reaction i and dBi equals 1 if reaction i
43 involves B and O otherwise.
44 rAB show the error introduced to the production rates of A when B and all
45 the reactions including it are removed. It is computed as in [2] so that
46 the algorithm is O(Nr).
47
48 DAC uses a initial set of species that represents the major parts of the
49 combustion mechanism, i.e. H2/O2, fuel decomposition and CO2 production.
50 Usually, it includes the fuel, HO2 and CO. Then it computes the dependence
51 of these set to the other species. This is done by introducing R-value
52 defined by
53
54 R_V0 (V) = max_SP(product(rij)) ,
55
56 where SP is the set of all possible paths leading from V0 to V and
57 product(rij) is the chain product of the weights of the edges along the
58 given path. The R-value for the initial set species is 1.
59
60 When the R-value of a species is larger than a user-defined tolerance
61 then the species is included in the simplified mechanism. Otherwise,
62 the species is removed along with all the reactions including it.
63
64 During this process, instead of looking over all species like described
65 in [1], the algorithm implemented here creates dynamic list to retain
66 the initialized edges only (see [2]).
67
68 To avoid using the target species when they are not contributing yet or
69 anymore to the system, a coefficient based on the exchange of element is
70 introduced:
71
72 NTa |PT - CT|
73 alphaTa = ----------------
74 Pa
75
76 Pa = sum_speciesS NSa max(0, PS-CS)
77
78 where 'a' refers to different elements present in the system
79 (namely C, H, O and N for conventionail hydrocarbon combustion),
80 NTa is the number of element a in species T.
81 When this coefficient alpha is below the specified threshold, the species is
82 removed from the search initiating set. In the original paper from
83 Pepiot-Desjardins et al.[2], this coefficient is further transformed to
84 compute a global normalized scaling coefficient but here as it is dynamically
85 computed, alpha is not introduced in the calculation of R.
86
87 References:
88 \verbatim
89 [1] Pepiot-Desjardins, P., & Pitsch, H. (2008).
90 An efficient error-propagation-based reduction method for large
91 chemical kinetic mechanisms.
92 Combustion and Flame, 154(1), 67-81.
93
94 [2] Lu, T., & Law, C. K. (2006).
95 Linear time reduction of large kinetic mechanisms with directed
96 relation graph: n-Heptane and iso-octane.
97 Combustion and Flame, 144(1), 24-36.
98 \endverbatim
99
100SourceFiles
101 DRGEP.C
102
103\*---------------------------------------------------------------------------*/
104
105#ifndef DRGEP_H
106#define DRGEP_H
107
109
110// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111
112namespace Foam
113{
114namespace chemistryReductionMethods
115{
116
117/*---------------------------------------------------------------------------*\
118 Class ode Declaration
119\*---------------------------------------------------------------------------*/
120
121template<class CompType, class ThermoType>
122class DRGEP
123:
124 public chemistryReductionMethod<CompType, ThermoType>
125{
126 // Private data
127
128 //- List of label for the search initiating set
129 labelList searchInitSet_;
130
131 List<label> sC_,sH_,sO_,sN_;
132 label NGroupBased_;
133
134public:
135
136 //- Runtime type information
137 TypeName("DRGEP");
138
139
140 // Constructors
141
142 //- Construct from components
143 DRGEP
144 (
145 const IOdictionary& dict,
147 );
148
149
150 //- Destructor
151 virtual ~DRGEP();
152
153
154 // Member Functions
155
156 //- Reduce the mechanism
157 virtual void reduceMechanism
158 (
159 const scalarField &c,
160 const scalar T,
161 const scalar p
162 );
163};
164
165
166// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
167
168} // End namespace chemistryReductionMethods
169} // End namespace Foam
170
171// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
172
173#ifdef NoRepository
174 #include "DRGEP.C"
175#endif
176
177// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
178
179#endif
180
181// ************************************************************************* //
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
Extends StandardChemistryModel by adding the TDAC method.
An abstract class for methods of chemical mechanism reduction.
The DRGEP algorithm [1] is based on.
Definition: DRGEP.H:124
TypeName("DRGEP")
Runtime type information.
virtual ~DRGEP()
Destructor.
Definition: DRGEP.C:106
virtual void reduceMechanism(const scalarField &c, const scalar T, const scalar p)
Reduce the mechanism.
Definition: DRGEP.C:115
volScalarField & p
BasicChemistryModel< psiReactionThermo > & chemistry
const volScalarField & T
Namespace for OpenFOAM.
dictionary dict
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73