XiFluid.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) 2022-2026 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::solvers::XiFluid
26 
27 Description
28  Solver module for compressible premixed/partially-premixed combustion with
29  turbulence modelling.
30 
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.
34 
35  Reference:
36  \verbatim
37  Weller, H. G. (1993).
38  The development of a new flame area combustion model
39  using conditional averaging.
40  Thermo-fluids section report TF 9307.
41  \endverbatim
42 
43  Both approaches are based on Gulder's flame speed correlation which has been
44  shown to be appropriate by comparison with the results from the spectral
45  model.
46 
47  Reference:
48  \verbatim
49  Weller, H. G., Marooney, C. J., & Gosman, A. D. (1991, January).
50  A new spectral method for calculation of the time-varying area
51  of a laminar flame in homogeneous turbulence.
52  In Symposium (International) on Combustion
53  (Vol. 23, No. 1, pp. 629-636). Elsevier.
54  \endverbatim
55 
56  Strain effects are incorporated directly into the Xi equation
57  but not in the algebraic approximation. Further work need to be
58  done on this issue, particularly regarding the enhanced removal rate
59  caused by flame compression. Analysis using results of the spectral
60  model will be required.
61 
62  For cases involving very lean Propane flames or other flames which are
63  very strain-sensitive, a transport equation for the laminar flame
64  speed is present. This equation is derived using heuristic arguments
65  involving the strain time scale and the strain-rate at extinction.
66  the transport velocity is the same as that for the Xi equation.
67 
68  Reference:
69  \verbatim
70  Weller, H. G., Tabor, G., Gosman, A. D., & Fureby, C. (1998, January).
71  Application of a flame-wrinkling LES combustion model
72  to a turbulent mixing layer.
73  In Symposium (International) on combustion
74  (Vol. 27, No. 1, pp. 899-907). Elsevier.
75  \endverbatim
76 
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 \c fu if there are
80  rich regions in the mixture, provided by the \c inhomogeneousMixture.
81  Details of the extension 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 
96  Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
97  pseudo-transient and steady simulations.
98 
99  Reference:
100  \verbatim
101  Greenshields, C. J., & Weller, H. G. (2022).
102  Notes on Computational Fluid Dynamics: General Principles.
103  CFD Direct Ltd.: Reading, UK.
104  \endverbatim
105 
106  Optional fvModels and fvConstraints are provided to enhance the simulation
107  in many ways including adding various sources, chemical reactions,
108  combustion, Lagrangian particles, radiation, surface film etc. and
109  constraining or limiting the solution.
110 
111 SourceFiles
112  XiFluid.C
113 
114 See also
115  Foam::solvers::basicFluidSolver
116  Foam::solvers::isothermalFluid
117 
118 \*---------------------------------------------------------------------------*/
119 
120 #ifndef XiFluid_H
121 #define XiFluid_H
122 
123 #include "isothermalFluid.H"
124 #include "ubRhoThermo.H"
125 #include "reactionModel.H"
128 #include "SuModel.H"
129 #include "XiModel.H"
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 namespace Foam
134 {
135 namespace solvers
136 {
137 
138 /*---------------------------------------------------------------------------*\
139  Class XiFluid Declaration
140 \*---------------------------------------------------------------------------*/
141 
142 class XiFluid
143 :
144  public isothermalFluid
145 {
146 protected:
147 
148  // Thermophysical properties
149 
151 
152 
153  // Unburnt and burnt gas momentumTransport
154 
157 
160 
161 
162  // Unburnt and burnt gas Thermophysical transport
163 
165  <
169 
172 
173 
174  // Unburnt and burnt gas reactions
175 
178 
179 
180  // Reactions
181 
182  //- Dictionary of combustion model coefficients
184 
186 
187  bool ignited_;
188 
189  //- Minimum b below which a numerical compensation burn-out term
190  // is applied to ensure b -> 0 and the flame speed is correct.
191  // Defaults to 1e-3
192  scalar bMin_;
193 
194  //- |grad(b)| division stabilisation coefficient.
195  // Defaults to 1e-3
196  scalar mgbCoeff_;
197 
198  //- Strained laminar flame-speed model
200 
201  //- Flame wrinkling model
203 
204 
205  // Protected Member Functions
206 
207  //- Solve the regress variable and Xi equations
208  // and unburnt and burnt gas properties
209  void burn();
210 
211  //- Solve for the unburnt gas thermophysical state
212  void uSolve
213  (
214  const volScalarField::Internal& bStab,
215  const volScalarField::Internal& bSource
216  );
217 
218  //- Solve for the unburnt gas thermophysical state
219  void bSolve
220  (
221  const volScalarField::Internal& cStab,
222  const volScalarField::Internal& bSource
223  );
224 
225  // Advective-diffusive stabilisation for b,c -> 0
227  (
228  const volScalarField& bc,
229  const volScalarField::Internal& bcStab,
230  const volScalarField& D,
232  );
233 
234  //- Solve for an unburnt or burnt gas property
235  void ubSolve
236  (
237  volScalarField& f,
238  const word& fName,
239  const volScalarField& alpha,
240  const volScalarField& bc,
241  const volScalarField::Internal& bcStab,
242  const surfaceScalarField& alphaPhiub,
243  const volScalarField& D,
245  const fvScalarMatrix& source,
246  const reactionModel& reaction
247  );
248 
249  //- Solve for a unburnt gas specie
250  void uSolve
251  (
252  volScalarField& fu,
253  const word& fuName,
254  const volScalarField::Internal& bStab,
255  const fvScalarMatrix& source
256  );
257 
258  //- Solve for a burnt gas specie
259  void bSolve
260  (
261  volScalarField& fb,
262  const word& fbName,
263  const volScalarField::Internal& cStab,
264  const fvScalarMatrix& source
265  );
266 
267  //- Solve the unburnt enthalpy equation
268  void HuSolve
269  (
270  const volScalarField::Internal& bStab,
271  const volScalarField::Internal& bSource
272  );
273 
274  //- Solve the burnt enthalpy equation
275  void HbSolve
276  (
277  const volScalarField::Internal& cStab,
278  const volScalarField::Internal& bSource
279  );
280 
281 
282 public:
283 
284  //- Reference to the fluid thermophysical properties
285  const ubRhoThermo& thermo;
286 
288 
291 
292  //- Reference to the combustion regress variable
293  // obtained from the combustion mixture
294  const volScalarField& b;
295 
296  //- Reference to the burnt gas thermophysical properties
298 
299  //- Reference to the combustion progress variable
300  const volScalarField& c;
301 
302  //- Reference to the burnt gas thermophysical properties
304 
305  //- Laminar flame speed
306  const volScalarField& Su;
307 
308  //- Flame wrinkling
309  const volScalarField& Xi;
310 
311 
312  //- Runtime type information
313  TypeName("XiFluid");
314 
315 
316  // Constructors
317 
318  //- Construct from region mesh
319  XiFluid(fvMesh& mesh);
320 
321  //- Disallow default bitwise copy construction
322  XiFluid(const XiFluid&) = delete;
323 
324 
325  //- Destructor
326  virtual ~XiFluid();
327 
328 
329  // Member Functions
330 
331  //- Minimum b below which a numerical compensation burn-out term
332  // is applied to ensure b -> 0 and the flame speed is correct
333  scalar bMin() const
334  {
335  return bMin_;
336  }
337 
338  //- Predict thermophysical transport
339  virtual void thermophysicalTransportPredictor();
340 
341  //- Construct and solve the energy equation,
342  // convert to temperature
343  // and update thermophysical and transport properties
344  virtual void thermophysicalPredictor();
345 
346  //- Correct the thermophysical transport
347  virtual void thermophysicalTransportCorrector();
348 
349  //- Reset b-Xi and thermodynamics to the unburnt state
350  // for multi-cycle simulations
351  virtual void reset();
352 
353 
354  // Member Operators
355 
356  //- Disallow default bitwise assignment
357  void operator=(const XiFluid&) = delete;
358 };
359 
360 
361 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
362 
363 } // End namespace solvers
364 } // End namespace Foam
365 
366 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
367 
368 #endif
369 
370 // ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic GeometricField class.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
Templated base class for multiphase thermophysical transport models.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
Base-class for combustion fluid thermodynamic properties based on compressibility.
Base class for single-phase compressible momentum transport models.
Base-class for fluid thermodynamic properties.
Definition: fluidThermo.H:56
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Definition: fvMatrix.H:118
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:98
Base class for reaction models.
Definition: reactionModel.H:53
Reaction base-class holding the specie names and coefficients.
Definition: reaction.H:57
const fvMesh & mesh
Region mesh.
Definition: solver.H:101
Solver module for compressible premixed/partially-premixed combustion with turbulence modelling.
Definition: XiFluid.H:144
virtual void thermophysicalPredictor()
Construct and solve the energy equation,.
const volScalarField & Su
Laminar flame speed.
Definition: XiFluid.H:305
tmp< fvScalarMatrix > fvmStab(const volScalarField &bc, const volScalarField::Internal &bcStab, const volScalarField &D, volScalarField &f)
autoPtr< thermophysicalTransportModel > uThermophysicalTransport_
Definition: XiFluid.H:169
const volScalarField & b
Reference to the combustion regress variable.
Definition: XiFluid.H:293
autoPtr< reactionModel > uReaction_
Definition: XiFluid.H:175
surfaceScalarField alphaPhib_
Definition: XiFluid.H:155
IOdictionary combustionProperties
Dictionary of combustion model coefficients.
Definition: XiFluid.H:182
const uRhoMulticomponentThermo & uThermo
Reference to the burnt gas thermophysical properties.
Definition: XiFluid.H:296
void ubSolve(volScalarField &f, const word &fName, const volScalarField &alpha, const volScalarField &bc, const volScalarField::Internal &bcStab, const surfaceScalarField &alphaPhiub, const volScalarField &D, const thermophysicalTransportModel &thermophysicalTransport, const fvScalarMatrix &source, const reactionModel &reaction)
Solve for an unburnt or burnt gas property.
scalar mgbCoeff_
|grad(b)| division stabilisation coefficient.
Definition: XiFluid.H:195
const volScalarField & c
Reference to the combustion progress variable.
Definition: XiFluid.H:299
XiFluid(fvMesh &mesh)
Construct from region mesh.
Definition: XiFluid.C:44
autoPtr< thermophysicalTransportModel > bThermophysicalTransport_
Definition: XiFluid.H:170
void burn()
Solve the regress variable and Xi equations.
PhaseThermophysicalTransportModel< phaseCompressible::momentumTransportModel, fluidThermo > thermophysicalTransportModel
Definition: XiFluid.H:167
void uSolve(const volScalarField::Internal &bStab, const volScalarField::Internal &bSource)
Solve for the unburnt gas thermophysical state.
autoPtr< SuModel > SuModel_
Strained laminar flame-speed model.
Definition: XiFluid.H:198
const volScalarField & Xi
Flame wrinkling.
Definition: XiFluid.H:308
ubMomentumTransportModel uMomentumTransport_
Definition: XiFluid.H:157
const ubRhoThermo & thermo
Reference to the fluid thermophysical properties.
Definition: XiFluid.H:284
autoPtr< XiModel > XiModel_
Flame wrinkling model.
Definition: XiFluid.H:201
virtual ~XiFluid()
Destructor.
Definition: XiFluid.C:200
virtual void thermophysicalTransportCorrector()
Correct the thermophysical transport.
Definition: XiFluid.C:213
void operator=(const XiFluid &)=delete
Disallow default bitwise assignment.
autoPtr< printDictionary > printCombustionProperties_
Definition: XiFluid.H:184
TypeName("XiFluid")
Runtime type information.
const thermophysicalTransportModel & uThermophysicalTransport
Definition: XiFluid.H:288
const thermophysicalTransportModel & bThermophysicalTransport
Definition: XiFluid.H:289
ubMomentumTransportModel bMomentumTransport_
Definition: XiFluid.H:158
scalar bMin() const
Minimum b below which a numerical compensation burn-out term.
Definition: XiFluid.H:332
virtual void reset()
Reset b-Xi and thermodynamics to the unburnt state.
Definition: XiFluid.C:220
void bSolve(const volScalarField::Internal &cStab, const volScalarField::Internal &bSource)
Solve for the unburnt gas thermophysical state.
ubRhoThermo & thermo_
Definition: XiFluid.H:149
autoPtr< reactionModel > bReaction_
Definition: XiFluid.H:176
void HbSolve(const volScalarField::Internal &cStab, const volScalarField::Internal &bSource)
Solve the burnt enthalpy equation.
surfaceScalarField alphaPhiu_
Definition: XiFluid.H:154
virtual void thermophysicalTransportPredictor()
Predict thermophysical transport.
Definition: XiFluid.C:206
const compressible::momentumTransportModel & momentumTransport
Definition: XiFluid.H:286
void HuSolve(const volScalarField::Internal &bStab, const volScalarField::Internal &bSource)
Solve the unburnt enthalpy equation.
scalar bMin_
Minimum b below which a numerical compensation burn-out term.
Definition: XiFluid.H:191
const bRhoMulticomponentThermo & bThermo
Reference to the burnt gas thermophysical properties.
Definition: XiFluid.H:302
Solver module for steady or transient turbulent flow of compressible isothermal fluids with optional ...
A class for managing temporary objects.
Definition: tmp.H:55
Base-class for combustion fluid thermodynamic properties based on compressibility.
A class for handling words, derived from string.
Definition: word.H:63
Info<< "Creating thermophysical transport model\n"<< endl;turbulenceThermophysicalTransportModels::unityLewisEddyDiffusivity< RASThermophysicalTransportModel< ThermophysicalTransportModel< compressibleMomentumTransportModel, fluidThermo > >> thermophysicalTransport(turbulence(), thermo, true)
volScalarField alpha(IOobject("alpha", runTime.name(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
phaseCompressibleMomentumTransportModel momentumTransportModel
static const coefficient D("D", dimTemperature, 257.14)
Namespace for OpenFOAM.
labelList f(nPoints)