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 
158 
159  // Unburnt and burnt gas Thermophysical transport
160 
162  <
166 
169 
170 
171  // Unburnt and burnt gas reactions
172 
175 
176 
177  // Reactions
178 
179  //- Dictionary of combustion model coefficients
181 
183 
184  bool ignited_;
185 
186  //- Minimum b below which a numerical compensation burn-out term
187  // is applied to ensure b -> 0 and the flame speed is correct.
188  // Defaults to 1e-3
189  scalar bMin_;
190 
191  //- |grad(b)| division stabilisation coefficient.
192  // Defaults to 1e-3
193  scalar mgbCoeff_;
194 
195  //- Strained laminar flame-speed model
197 
198  //- Flame wrinkling model
200 
201 
202  // Protected Member Functions
203 
204  //- Solve the regress variable and Xi equations
205  // and unburnt and burnt gas properties
206  void burn();
207 
208  //- Solve for the unburnt gas thermophysical state
209  void uSolve
210  (
211  const volScalarField::Internal& bStab,
212  const surfaceScalarField& phib,
213  const volScalarField::Internal& bSource
214  );
215 
216  //- Solve for the unburnt gas thermophysical state
217  void bSolve
218  (
219  const volScalarField::Internal& cStab,
220  const surfaceScalarField& phic,
221  const volScalarField::Internal& bSource
222  );
223 
224  // Advective-diffusive stabilisation for b,c -> 0
226  (
227  const volScalarField& bc,
228  const volScalarField::Internal& bcStab,
229  const volScalarField& D,
231  );
232 
233  //- Solve for an unburnt or burnt gas property
234  void ubSolve
235  (
236  volScalarField& f,
237  const word& fName,
238  const volScalarField& alpha,
239  const volScalarField& bc,
240  const volScalarField::Internal& bcStab,
241  const surfaceScalarField& phibc,
242  const volScalarField& D,
244  const fvScalarMatrix& source,
245  const reactionModel& reaction
246  );
247 
248  //- Solve for a unburnt gas specie
249  void uSolve
250  (
251  volScalarField& fu,
252  const word& fuName,
253  const volScalarField::Internal& bStab,
254  const surfaceScalarField& phib,
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 surfaceScalarField& phic,
265  const fvScalarMatrix& source
266  );
267 
268  //- Solve the unburnt enthalpy equation
269  void HuSolve
270  (
271  const volScalarField::Internal& bStab,
272  const surfaceScalarField& phib,
273  const volScalarField::Internal& bSource
274  );
275 
276  //- Solve the burnt enthalpy equation
277  void HbSolve
278  (
279  const volScalarField::Internal& cStab,
280  const surfaceScalarField& phic,
281  const volScalarField::Internal& bSource
282  );
283 
284 
285 public:
286 
287  //- Reference to the fluid thermophysical properties
288  const ubRhoThermo& thermo;
289 
291 
294 
295  //- Reference to the combustion regress variable
296  // obtained from the combustion mixture
297  const volScalarField& b;
298 
299  //- Reference to the burnt gas thermophysical properties
301 
302  //- Reference to the combustion progress variable
303  const volScalarField& c;
304 
305  //- Reference to the burnt gas thermophysical properties
307 
308  //- Laminar flame speed
309  const volScalarField& Su;
310 
311  //- Flame wrinkling
312  const volScalarField& Xi;
313 
314 
315  //- Runtime type information
316  TypeName("XiFluid");
317 
318 
319  // Constructors
320 
321  //- Construct from region mesh
322  XiFluid(fvMesh& mesh);
323 
324  //- Disallow default bitwise copy construction
325  XiFluid(const XiFluid&) = delete;
326 
327 
328  //- Destructor
329  virtual ~XiFluid();
330 
331 
332  // Member Functions
333 
334  //- Minimum b below which a numerical compensation burn-out term
335  // is applied to ensure b -> 0 and the flame speed is correct
336  scalar bMin() const
337  {
338  return bMin_;
339  }
340 
341  //- Predict thermophysical transport
342  virtual void thermophysicalTransportPredictor();
343 
344  //- Construct and solve the energy equation,
345  // convert to temperature
346  // and update thermophysical and transport properties
347  virtual void thermophysicalPredictor();
348 
349  //- Correct the thermophysical transport
350  virtual void thermophysicalTransportCorrector();
351 
352  //- Reset b-Xi and thermodynamics to the unburnt state
353  // for multi-cycle simulations
354  virtual void reset();
355 
356 
357  // Member Operators
358 
359  //- Disallow default bitwise assignment
360  void operator=(const XiFluid&) = delete;
361 };
362 
363 
364 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
365 
366 } // End namespace solvers
367 } // End namespace Foam
368 
369 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
370 
371 #endif
372 
373 // ************************************************************************* //
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:308
tmp< fvScalarMatrix > fvmStab(const volScalarField &bc, const volScalarField::Internal &bcStab, const volScalarField &D, volScalarField &f)
autoPtr< thermophysicalTransportModel > uThermophysicalTransport_
Definition: XiFluid.H:166
const volScalarField & b
Reference to the combustion regress variable.
Definition: XiFluid.H:296
autoPtr< reactionModel > uReaction_
Definition: XiFluid.H:172
IOdictionary combustionProperties
Dictionary of combustion model coefficients.
Definition: XiFluid.H:179
void ubSolve(volScalarField &f, const word &fName, const volScalarField &alpha, const volScalarField &bc, const volScalarField::Internal &bcStab, const surfaceScalarField &phibc, const volScalarField &D, const thermophysicalTransportModel &thermophysicalTransport, const fvScalarMatrix &source, const reactionModel &reaction)
Solve for an unburnt or burnt gas property.
const uRhoMulticomponentThermo & uThermo
Reference to the burnt gas thermophysical properties.
Definition: XiFluid.H:299
scalar mgbCoeff_
|grad(b)| division stabilisation coefficient.
Definition: XiFluid.H:192
void uSolve(const volScalarField::Internal &bStab, const surfaceScalarField &phib, const volScalarField::Internal &bSource)
Solve for the unburnt gas thermophysical state.
const volScalarField & c
Reference to the combustion progress variable.
Definition: XiFluid.H:302
XiFluid(fvMesh &mesh)
Construct from region mesh.
Definition: XiFluid.C:44
autoPtr< thermophysicalTransportModel > bThermophysicalTransport_
Definition: XiFluid.H:167
void burn()
Solve the regress variable and Xi equations.
PhaseThermophysicalTransportModel< phaseCompressible::momentumTransportModel, fluidThermo > thermophysicalTransportModel
Definition: XiFluid.H:164
autoPtr< SuModel > SuModel_
Strained laminar flame-speed model.
Definition: XiFluid.H:195
const volScalarField & Xi
Flame wrinkling.
Definition: XiFluid.H:311
ubMomentumTransportModel uMomentumTransport_
Definition: XiFluid.H:154
const ubRhoThermo & thermo
Reference to the fluid thermophysical properties.
Definition: XiFluid.H:287
autoPtr< XiModel > XiModel_
Flame wrinkling model.
Definition: XiFluid.H:198
virtual ~XiFluid()
Destructor.
Definition: XiFluid.C:188
virtual void thermophysicalTransportCorrector()
Correct the thermophysical transport.
Definition: XiFluid.C:201
void operator=(const XiFluid &)=delete
Disallow default bitwise assignment.
void HuSolve(const volScalarField::Internal &bStab, const surfaceScalarField &phib, const volScalarField::Internal &bSource)
Solve the unburnt enthalpy equation.
autoPtr< printDictionary > printCombustionProperties_
Definition: XiFluid.H:181
TypeName("XiFluid")
Runtime type information.
const thermophysicalTransportModel & uThermophysicalTransport
Definition: XiFluid.H:291
const thermophysicalTransportModel & bThermophysicalTransport
Definition: XiFluid.H:292
ubMomentumTransportModel bMomentumTransport_
Definition: XiFluid.H:155
scalar bMin() const
Minimum b below which a numerical compensation burn-out term.
Definition: XiFluid.H:335
virtual void reset()
Reset b-Xi and thermodynamics to the unburnt state.
Definition: XiFluid.C:208
ubRhoThermo & thermo_
Definition: XiFluid.H:149
autoPtr< reactionModel > bReaction_
Definition: XiFluid.H:173
virtual void thermophysicalTransportPredictor()
Predict thermophysical transport.
Definition: XiFluid.C:194
const compressible::momentumTransportModel & momentumTransport
Definition: XiFluid.H:289
void bSolve(const volScalarField::Internal &cStab, const surfaceScalarField &phic, const volScalarField::Internal &bSource)
Solve for the unburnt gas thermophysical state.
scalar bMin_
Minimum b below which a numerical compensation burn-out term.
Definition: XiFluid.H:188
const bRhoMulticomponentThermo & bThermo
Reference to the burnt gas thermophysical properties.
Definition: XiFluid.H:305
void HbSolve(const volScalarField::Internal &cStab, const surfaceScalarField &phic, const volScalarField::Internal &bSource)
Solve the burnt enthalpy equation.
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)