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-2023 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 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. Both approaches are
34  based on Gulder's flame speed correlation which has been shown
35  to be appropriate by comparison with the results from the
36  spectral model.
37 
38  Strain effects are encorporated directly into the Xi equation
39  but not in the algebraic approximation. Further work need to be
40  done on this issue, particularly regarding the enhanced removal rate
41  caused by flame compression. Analysis using results of the spectral
42  model will be required.
43 
44  For cases involving very lean Propane flames or other flames which are
45  very strain-sensitive, a transport equation for the laminar flame
46  speed is present. This equation is derived using heuristic arguments
47  involving the strain time scale and the strain-rate at extinction.
48  the transport velocity is the same as that for the Xi equation.
49 
50  Uses the flexible PIMPLE (PISO-SIMPLE) solution for time-resolved and
51  pseudo-transient and steady simulations.
52 
53  Optional fvModels and fvConstraints are provided to enhance the simulation
54  in many ways including adding various sources, chemical reactions,
55  combustion, Lagrangian particles, radiation, surface film etc. and
56  constraining or limiting the solution.
57 
58  Reference:
59  \verbatim
60  Greenshields, C. J., & Weller, H. G. (2022).
61  Notes on Computational Fluid Dynamics: General Principles.
62  CFD Direct Ltd.: Reading, UK.
63  \endverbatim
64 
65 SourceFiles
66  XiFluid.C
67 
68 See also
69  Foam::solvers::fluidSolver
70  Foam::solvers::isothermalFluid
71 
72 \*---------------------------------------------------------------------------*/
73 
74 #ifndef XiFluid_H
75 #define XiFluid_H
76 
77 #include "isothermalFluid.H"
81 #include "laminarFlameSpeed.H"
82 #include "ignition.H"
83 
84 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
85 
86 namespace Foam
87 {
88 namespace solvers
89 {
90 
91 /*---------------------------------------------------------------------------*\
92  Class XiFluid Declaration
93 \*---------------------------------------------------------------------------*/
94 
95 class XiFluid
96 :
97  public isothermalFluid
98 {
99 
100 protected:
101 
102  // Thermophysical properties
103 
105 
106 
107  // Composition
108 
109  //- Reference to the combustion mixture
111 
112  //- Reference to the combustion regress variable
113  // obtained from the combustion mixture
115 
116  //- Set of fields used for the multivariate convection scheme
118 
119 
120  // Reactions
121 
122  //- Laminar flame-speed model
124 
125  //- Laminar flame-speed field
127 
128  //- Minimum laminar flame-speed allowed for numerical stability
130 
131  //- Maximum laminar flame-speed allowed for numerical stability
133 
134  //- Flame wrinkling coefficient field
136 
137  //- Turbulent flame-speed field
139 
140  //- Dictionary of combustion model coefficients
142 
143  //- Name of the strained laminar flame-speed model
144  word SuModel;
145 
146  //- Laminar flame extinction strain-rate
148 
149  //- Name of the flame wrinkling model
150  word XiModel;
151 
152  //- Flame wrinkling model coefficient
154 
155  //- Flame wrinkling model shape coefficient
157 
158  //- Flame wrinkling model u' coefficient
160 
161  //- Ignition model
162  ignition ign;
163 
164 
165  // Thermophysical transport
166 
168  <
170  <
172  <
175  >
176  >
178 
179 
180  // Protected member functions
181 
182  //- Solve the ft equation for partially-premixed mixtures
183  void ftSolve
184  (
186  );
187 
188  //- Calculate and return the turbulent flame-speed kernel correction
190  (
191  const volScalarField& c,
192  const surfaceScalarField& nf,
193  const dimensionedScalar& dMgb
194  ) const;
195 
196  //- Solve the Xi and regress variable equations
197  void bSolve
198  (
200  );
201 
202  //- Solve the unburnt energy equation
203  void EauSolve
204  (
206  );
207 
208  //- Solve the energy equation
209  void EaSolve
210  (
212  );
213 
214 
215 public:
216 
217  //- Reference to the fluid thermophysical properties
219 
220  //- Reference to the combustion regress variable
221  // obtained from the combustion mixture
222  const volScalarField& b;
223 
224  //- Flame wrinkling coefficient field
225  const volScalarField& Xi;
226 
227 
228  //- Runtime type information
229  TypeName("XiFluid");
230 
231 
232  // Constructors
233 
234  //- Construct from region mesh
235  XiFluid(fvMesh& mesh);
236 
237  //- Disallow default bitwise copy construction
238  XiFluid(const XiFluid&) = delete;
239 
240 
241  //- Destructor
242  virtual ~XiFluid();
243 
244 
245  // Member Functions
246 
247  //- Called at the start of the PIMPLE loop
248  virtual void prePredictor();
249 
250  //- Construct and solve the energy equation,
251  // convert to temperature
252  // and update thermophysical and transport properties
253  virtual void thermophysicalPredictor();
254 
255  //- Correct the momentum and thermophysical transport modelling
256  virtual void postCorrector();
257 
258 
259  // Member Operators
260 
261  //- Disallow default bitwise assignment
262  void operator=(const XiFluid&) = delete;
263 };
264 
265 
266 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
267 
268 } // End namespace solvers
269 } // End namespace Foam
270 
271 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
272 
273 #endif
274 
275 // ************************************************************************* //
tmp< fv::convectionScheme< scalar > > mvConvection(fv::convectionScheme< scalar >::New(mesh, fields, phi, mesh.schemes().div("div(phi,ft_b_ha_hau)")))
Generic GeometricField class.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:57
Templated abstract base class for RAS thermophysical transport models.
Templated abstract base class for 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
Specialisation of the basicMixture for combustion.
Base class for single-phase compressible turbulence models.
Base-class for fluid thermodynamic properties.
Definition: fluidThermo.H:57
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:101
Abstract base class for convection schemes.
Foam::ignition.
Definition: ignition.H:53
Abstract base class for multi-variate surface interpolation schemes.
Base-class for combustion fluid thermodynamic properties based on compressibility.
const fvMesh & mesh
Region mesh.
Definition: solver.H:94
Solver module for compressible premixed/partially-premixed combustion with turbulence modelling.
Definition: XiFluid.H:97
virtual void thermophysicalPredictor()
Construct and solve the energy equation,.
void bSolve(const fv::convectionScheme< scalar > &mvConvection)
Solve the Xi and regress variable equations.
const volScalarField & b
Reference to the combustion regress variable.
Definition: XiFluid.H:221
virtual void prePredictor()
Called at the start of the PIMPLE loop.
Definition: XiFluid.C:178
IOdictionary combustionProperties
Dictionary of combustion model coefficients.
Definition: XiFluid.H:140
dimensionedScalar SuMin
Minimum laminar flame-speed allowed for numerical stability.
Definition: XiFluid.H:128
volScalarField Su
Laminar flame-speed field.
Definition: XiFluid.H:125
XiFluid(fvMesh &mesh)
Construct from region mesh.
Definition: XiFluid.C:44
void ftSolve(const fv::convectionScheme< scalar > &mvConvection)
Solve the ft equation for partially-premixed mixtures.
turbulenceThermophysicalTransportModels::unityLewisEddyDiffusivity< RASThermophysicalTransportModel< ThermophysicalTransportModel< compressibleMomentumTransportModel, fluidThermo > > > thermophysicalTransport
Definition: XiFluid.H:176
psiuMulticomponentThermo & thermo_
Definition: XiFluid.H:103
dimensionedScalar SuMax
Maximum laminar flame-speed allowed for numerical stability.
Definition: XiFluid.H:131
const volScalarField & Xi
Flame wrinkling coefficient field.
Definition: XiFluid.H:224
dimensionedScalar XiCoef
Flame wrinkling model coefficient.
Definition: XiFluid.H:152
virtual void postCorrector()
Correct the momentum and thermophysical transport modelling.
Definition: XiFluid.C:189
word XiModel
Name of the flame wrinkling model.
Definition: XiFluid.H:149
dimensionedScalar sigmaExt
Laminar flame extinction strain-rate.
Definition: XiFluid.H:146
void EauSolve(const fv::convectionScheme< scalar > &mvConvection)
Solve the unburnt energy equation.
virtual ~XiFluid()
Destructor.
Definition: XiFluid.C:172
dimensionedScalar uPrimeCoef
Flame wrinkling model u' coefficient.
Definition: XiFluid.H:158
ignition ign
Ignition model.
Definition: XiFluid.H:161
basicCombustionMixture & composition
Reference to the combustion mixture.
Definition: XiFluid.H:109
volScalarField Xi_
Flame wrinkling coefficient field.
Definition: XiFluid.H:134
const psiuMulticomponentThermo & thermo
Reference to the fluid thermophysical properties.
Definition: XiFluid.H:217
void operator=(const XiFluid &)=delete
Disallow default bitwise assignment.
TypeName("XiFluid")
Runtime type information.
word SuModel
Name of the strained laminar flame-speed model.
Definition: XiFluid.H:143
volScalarField St
Turbulent flame-speed field.
Definition: XiFluid.H:137
volScalarField & b_
Reference to the combustion regress variable.
Definition: XiFluid.H:113
void EaSolve(const fv::convectionScheme< scalar > &mvConvection)
Solve the energy equation.
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
Set of fields used for the multivariate convection scheme.
Definition: XiFluid.H:116
autoPtr< laminarFlameSpeed > unstrainedLaminarFlameSpeed
Laminar flame-speed model.
Definition: XiFluid.H:122
dimensionedScalar XiShapeCoef
Flame wrinkling model shape coefficient.
Definition: XiFluid.H:155
dimensionedScalar StCorr(const volScalarField &c, const surfaceScalarField &nf, const dimensionedScalar &dMgb) const
Calculate and return the turbulent flame-speed kernel correction.
Solver module for steady or transient turbulent flow of compressible isothermal fluids with optional ...
Eddy-diffusivity based energy gradient heat flux model for RAS or LES of turbulent flow....
A class for handling words, derived from string.
Definition: word.H:62
const dimensionedScalar c
Speed of light in a vacuum.
Namespace for OpenFOAM.