Skip to content

Commit 6d8dd22

Browse files
author
Henry Weller
committed
XiFluid: Extended to support rich inhomogeneous mixtures and exhaust gas recirculation
The implementation is based on the work undertaken by Weller in 2002 to extend the Weller b-Xi combustion model to non-premixed combustion: Weller, H. G. (2002, August). The Application of the Weller Combustion Models to Non-Premixed Combustion. (Technical Report TR/HGW/03) Class Foam::solvers::XiFluid Description Solver module for compressible premixed/partially-premixed combustion with turbulence modelling. Combusting RANS code using the Weller b-Xi two-equation combustion model. Xi may be obtained by either the solution of the Xi transport equation or from an algebraic expression. Reference: \verbatim Weller, H. G. (1993). The development of a new flame area combustion model using conditional averaging. Thermo-fluids section report TF 9307. \endverbatim Both approaches are based on Gulder's flame speed correlation which has been shown to be appropriate by comparison with the results from the spectral model. Reference: \verbatim Weller, H. G., Marooney, C. J., & Gosman, A. D. (1991, January). A new spectral method for calculation of the time-varying area of a laminar flame in homogeneous turbulence. In Symposium (International) on Combustion (Vol. 23, No. 1, pp. 629-636). Elsevier. \endverbatim Strain effects are incorporated directly into the Xi equation but not in the algebraic approximation. Further work need to be done on this issue, particularly regarding the enhanced removal rate caused by flame compression. Analysis using results of the spectral model will be required. For cases involving very lean Propane flames or other flames which are very strain-sensitive, a transport equation for the laminar flame speed is present. This equation is derived using heuristic arguments involving the strain time scale and the strain-rate at extinction. the transport velocity is the same as that for the Xi equation. Reference: \verbatim Weller, H. G., Tabor, G., Gosman, A. D., & Fureby, C. (1998, January). Application of a flame-wrinkling LES combustion model to a turbulent mixing layer. In Symposium (International) on combustion (Vol. 27, No. 1, pp. 899-907). Elsevier. \endverbatim For inhomogeneous mixtures, in addition to the regress variable \c b, it is necessary to solve for the mixture-fraction \c ft provided by the \c leanInhomogeneousMixture and also the fuel mass-fraction \fu if there are rich regions in the mixture, provided by the \c inhomogeneousMixture. Details of the extention of the Weller b-Xi combustion model to non-premixed combustion can be found in the Technical Report TR/HGW/03. Reference: \verbatim Weller, H. G. (2002, August). The Application of the Weller Combustion Models to Non-Premixed Combustion. (Technical Report TR/HGW/03) \endverbatim For inhomogeneous mixtures with exhaust gas re-circulation it is necessary to additionally solve for the recirculated exhaust gas mass-fraction \c egr which is provided by the \c inhomogeneousEGRMixture mixture. Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and pseudo-transient and steady simulations. Reference: \verbatim Greenshields, C. J., & Weller, H. G. (2022). Notes on Computational Fluid Dynamics: General Principles. CFD Direct Ltd.: Reading, UK. \endverbatim Optional fvModels and fvConstraints are provided to enhance the simulation in many ways including adding various sources, chemical reactions, combustion, Lagrangian particles, radiation, surface film etc. and constraining or limiting the solution.
1 parent 8c6ce72 commit 6d8dd22

File tree

29 files changed

+1414
-7
lines changed

29 files changed

+1414
-7
lines changed

applications/modules/XiFluid/XiFluid.C

+10
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,16 @@ Foam::solvers::XiFluid::XiFluid(fvMesh& mesh)
105105
fields.add(thermo_.Y("ft"));
106106
}
107107

108+
if (thermo_.containsSpecie("fu"))
109+
{
110+
fields.add(thermo_.Y("fu"));
111+
}
112+
113+
if (thermo_.containsSpecie("egr"))
114+
{
115+
fields.add(thermo_.Y("egr"));
116+
}
117+
108118
fields.add(b);
109119
fields.add(thermo.he());
110120
fields.add(thermo.heu());

applications/modules/XiFluid/XiFluid.H

+38-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ Description
2828
Solver module for compressible premixed/partially-premixed combustion with
2929
turbulence modelling.
3030
31-
Combusting RANS code using the b-Xi two-equation model.
32-
Xi may be obtained by either the solution of the Xi transport
33-
equation or from an algebraic expression.
31+
Combusting RANS code using the Weller b-Xi two-equation combustion model.
32+
Xi may be obtained by either the solution of the Xi transport equation or
33+
from an algebraic expression.
3434
3535
Reference:
3636
\verbatim
@@ -74,6 +74,25 @@ Description
7474
(Vol. 27, No. 1, pp. 899-907). Elsevier.
7575
\endverbatim
7676
77+
For inhomogeneous mixtures, in addition to the regress variable \c b, it is
78+
necessary to solve for the mixture-fraction \c ft provided by the \c
79+
leanInhomogeneousMixture and also the fuel mass-fraction \fu if there are
80+
rich regions in the mixture, provided by the \c inhomogeneousMixture.
81+
Details of the extention of the Weller b-Xi combustion model to non-premixed
82+
combustion can be found in the Technical Report TR/HGW/03.
83+
84+
Reference:
85+
\verbatim
86+
Weller, H. G. (2002, August).
87+
The Application of the Weller Combustion Models to
88+
Non-Premixed Combustion.
89+
(Technical Report TR/HGW/03)
90+
\endverbatim
91+
92+
For inhomogeneous mixtures with exhaust gas re-circulation it is necessary
93+
to additionally solve for the recirculated exhaust gas mass-fraction \c
94+
egr which is provided by the \c inhomogeneousEGRMixture mixture.
95+
7796
Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
7897
pseudo-transient and steady simulations.
7998
@@ -176,6 +195,22 @@ protected:
176195
const volScalarField& Db
177196
);
178197

198+
//- Solve the fu equation for partially- and non- premixed mixtures
199+
void fuSolve
200+
(
201+
const fv::convectionScheme<scalar>& mvConvection,
202+
const volScalarField& Db,
203+
const volScalarField& bSource
204+
);
205+
206+
//- Solve the egr mass-fraction equation
207+
// for mixtures with exhaust gas recirculation
208+
void egrSolve
209+
(
210+
const fv::convectionScheme<scalar>& mvConvection,
211+
const volScalarField& Db
212+
);
213+
179214
//- Apply the early kernel growth correction to the flame-wrinkling Xi
180215
// to compensate for the inaccurate flame surface area estimate
181216
// when the kernel is not fully-developed,

applications/modules/XiFluid/thermophysicalPredictor.C

+97-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ License
2727
#include "bXiIgnition.H"
2828
#include "fvcDdt.H"
2929
#include "fvmDiv.H"
30+
#include "fvcSup.H"
3031

3132
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
3233

@@ -54,6 +55,75 @@ void Foam::solvers::XiFluid::ftSolve
5455
}
5556

5657

58+
void Foam::solvers::XiFluid::fuSolve
59+
(
60+
const fv::convectionScheme<scalar>& mvConvection,
61+
const volScalarField& Db,
62+
const volScalarField& bSource
63+
)
64+
{
65+
volScalarField& fu = thermo_.Y("fu");
66+
const volScalarField& ft = thermo_.Y("ft");
67+
const volScalarField& b(b_);
68+
69+
// Progress variable
70+
const volScalarField c("c", scalar(1) - b);
71+
72+
// Unburnt gas density
73+
const volScalarField rhou("rhou", thermo.rhou());
74+
75+
const volScalarField fres(thermo_.fres());
76+
const volScalarField fuFres(max(fu - fres, scalar(0)));
77+
78+
const volScalarField fuDot =
79+
bSource/(b + 0.001)
80+
- 2*Db*c
81+
*mag(fvc::grad(ft))/max(ft, 1e-6)
82+
*mag(fvc::grad(fuFres))/max(fuFres, 1e-6);
83+
84+
fvScalarMatrix fuEqn
85+
(
86+
fvm::ddt(rho, fu)
87+
+ mvConvection.fvmDiv(phi, fu)
88+
- fvm::laplacian(Db, fu)
89+
==
90+
fvm::Sp(fuDot, fu)
91+
- fuDot*fres
92+
+ fvModels().source(rho, fu)
93+
);
94+
95+
fuEqn.relax();
96+
fvConstraints().constrain(fuEqn);
97+
fuEqn.solve();
98+
fvConstraints().constrain(fu);
99+
}
100+
101+
102+
void Foam::solvers::XiFluid::egrSolve
103+
(
104+
const fv::convectionScheme<scalar>& mvConvection,
105+
const volScalarField& Db
106+
)
107+
{
108+
volScalarField& egr = thermo_.Y("egr");
109+
110+
fvScalarMatrix egrEqn
111+
(
112+
fvm::ddt(rho, egr)
113+
+ mvConvection.fvmDiv(phi, egr)
114+
- fvm::laplacian(Db, egr)
115+
==
116+
fvModels().source(rho, egr)
117+
);
118+
119+
egrEqn.relax();
120+
fvConstraints().constrain(egrEqn);
121+
egrEqn.solve();
122+
fvConstraints().constrain(egr);
123+
}
124+
125+
126+
57127
Foam::tmp<Foam::volScalarField> Foam::solvers::XiFluid::XiCorr
58128
(
59129
const volScalarField& Xi,
@@ -148,16 +218,21 @@ void Foam::solvers::XiFluid::bSolve
148218
fvc::interpolate(rhou*Su*XiCorr(Xi, nf, dMgb))*nf
149219
);
150220

221+
fvScalarMatrix bSourceEqn
222+
(
223+
fvModels().source(rho, b)
224+
- fvm::div(phiSt, b)
225+
+ fvm::Sp(fvc::div(phiSt), b)
226+
);
227+
151228
// Create b equation
152229
fvScalarMatrix bEqn
153230
(
154231
fvm::ddt(rho, b)
155232
+ mvConvection.fvmDiv(phi, b)
156-
+ fvm::div(phiSt, b)
157-
- fvm::Sp(fvc::div(phiSt), b)
158233
- fvm::laplacian(Db, b)
159234
==
160-
fvModels().source(rho, b)
235+
bSourceEqn
161236
);
162237

163238
// Solve for b and constrain
@@ -171,6 +246,11 @@ void Foam::solvers::XiFluid::bSolve
171246

172247
// Correct the laminar flame speed
173248
SuModel_->correct();
249+
250+
if (thermo_.containsSpecie("fu"))
251+
{
252+
fuSolve(mvConvection, Db, (bSourceEqn & b));
253+
}
174254
}
175255

176256

@@ -295,6 +375,20 @@ void Foam::solvers::XiFluid::thermophysicalPredictor()
295375
bSolve(mvConvection(), Db);
296376
EauSolve(mvConvection(), Db);
297377
}
378+
else
379+
{
380+
if (thermo_.containsSpecie("fu"))
381+
{
382+
volScalarField& fu = thermo_.Y("fu");
383+
const volScalarField& ft = thermo_.Y("ft");
384+
fu = ft;
385+
}
386+
}
387+
388+
if (thermo_.containsSpecie("egr"))
389+
{
390+
egrSolve(mvConvection(), Db);
391+
}
298392

299393
EaSolve(mvConvection(), Db);
300394

src/OpenFOAM/db/functionObjects/timeControl/timeControl.C

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ void Foam::timeControl::read(const dictionary& dict)
148148
{
149149
const word timesName(prefix_ + "Times");
150150
const word frequenciesName(prefix_ + "Frequencies");
151-
const bool repeat = dict.lookupOrDefault("writeRepeat", false);
151+
const bool repeat = dict.lookupOrDefault(prefix_ + "Repeat", false);
152152

153153
timeDelta_ =
154154
dict.lookupOrDefault

tutorials/XiFluid/stratified/0/T

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
========= |
3+
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4+
\\ / O peration | Website: https://openfoam.org
5+
\\ / A nd | Version: dev
6+
\\/ M anipulation |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
format ascii;
11+
class volScalarField;
12+
object T;
13+
}
14+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
15+
16+
dimensions [0 0 0 1 0 0 0];
17+
18+
internalField uniform 300;
19+
20+
boundaryField
21+
{
22+
left
23+
{
24+
type symmetryPlane;
25+
}
26+
27+
right
28+
{
29+
type symmetryPlane;
30+
}
31+
32+
top
33+
{
34+
type symmetryPlane;
35+
}
36+
37+
bottom
38+
{
39+
type symmetryPlane;
40+
}
41+
42+
frontAndBack
43+
{
44+
type empty;
45+
}
46+
}
47+
48+
// ************************************************************************* //

tutorials/XiFluid/stratified/0/Tu

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
========= |
3+
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4+
\\ / O peration | Website: https://openfoam.org
5+
\\ / A nd | Version: dev
6+
\\/ M anipulation |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
format ascii;
11+
class volScalarField;
12+
object Tu;
13+
}
14+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
15+
16+
dimensions [0 0 0 1 0 0 0];
17+
18+
internalField uniform 300;
19+
20+
boundaryField
21+
{
22+
left
23+
{
24+
type symmetryPlane;
25+
}
26+
27+
right
28+
{
29+
type symmetryPlane;
30+
}
31+
32+
top
33+
{
34+
type symmetryPlane;
35+
}
36+
37+
bottom
38+
{
39+
type symmetryPlane;
40+
}
41+
42+
frontAndBack
43+
{
44+
type empty;
45+
}
46+
}
47+
48+
// ************************************************************************* //

tutorials/XiFluid/stratified/0/U

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*--------------------------------*- C++ -*----------------------------------*\
2+
========= |
3+
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4+
\\ / O peration | Website: https://openfoam.org
5+
\\ / A nd | Version: dev
6+
\\/ M anipulation |
7+
\*---------------------------------------------------------------------------*/
8+
FoamFile
9+
{
10+
format ascii;
11+
class volVectorField;
12+
object U;
13+
}
14+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
15+
16+
dimensions [0 1 -1 0 0 0 0];
17+
18+
internalField uniform (0 0 0);
19+
20+
boundaryField
21+
{
22+
left
23+
{
24+
type symmetryPlane;
25+
}
26+
27+
right
28+
{
29+
type symmetryPlane;
30+
}
31+
32+
top
33+
{
34+
type symmetryPlane;
35+
}
36+
37+
bottom
38+
{
39+
type symmetryPlane;
40+
}
41+
42+
frontAndBack
43+
{
44+
type empty;
45+
}
46+
}
47+
48+
// ************************************************************************* //

0 commit comments

Comments
 (0)