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 incorporated 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 regress variable
111 
112  //- Set of fields used for the multivariate convection scheme
114 
115 
116  // Reactions
117 
118  //- Laminar flame-speed model
120 
121  //- Laminar flame-speed field
123 
124  //- Minimum laminar flame-speed allowed for numerical stability
126 
127  //- Maximum laminar flame-speed allowed for numerical stability
129 
130  //- Flame wrinkling coefficient field
132 
133  //- Turbulent flame-speed field
135 
136  //- Dictionary of combustion model coefficients
138 
139  //- Name of the strained laminar flame-speed model
140  word SuModel;
141 
142  //- Laminar flame extinction strain-rate
144 
145  //- Name of the flame wrinkling model
146  word XiModel;
147 
148  //- Flame wrinkling model coefficient
150 
151  //- Flame wrinkling model shape coefficient
153 
154  //- Flame wrinkling model u' coefficient
156 
157  //- Ignition model
158  ignition ign;
159 
160 
161  // Thermophysical transport
162 
164  <
166  <
168  <
171  >
172  >
174 
175 
176  // Protected member functions
177 
178  //- Solve the ft equation for partially-premixed mixtures
179  void ftSolve
180  (
182  );
183 
184  //- Calculate and return the turbulent flame-speed kernel correction
186  (
187  const volScalarField& c,
188  const surfaceScalarField& nf,
189  const dimensionedScalar& dMgb
190  ) const;
191 
192  //- Solve the Xi and regress variable equations
193  void bSolve
194  (
196  );
197 
198  //- Solve the unburnt energy equation
199  void EauSolve
200  (
202  );
203 
204  //- Solve the energy equation
205  void EaSolve
206  (
208  );
209 
210 
211 public:
212 
213  //- Reference to the fluid thermophysical properties
215 
216  //- Reference to the combustion regress variable
217  // obtained from the combustion mixture
218  const volScalarField& b;
219 
220  //- Flame wrinkling coefficient field
221  const volScalarField& Xi;
222 
223 
224  //- Runtime type information
225  TypeName("XiFluid");
226 
227 
228  // Constructors
229 
230  //- Construct from region mesh
231  XiFluid(fvMesh& mesh);
232 
233  //- Disallow default bitwise copy construction
234  XiFluid(const XiFluid&) = delete;
235 
236 
237  //- Destructor
238  virtual ~XiFluid();
239 
240 
241  // Member Functions
242 
243  //- Called at the start of the PIMPLE loop
244  virtual void prePredictor();
245 
246  //- Construct and solve the energy equation,
247  // convert to temperature
248  // and update thermophysical and transport properties
249  virtual void thermophysicalPredictor();
250 
251  //- Correct the momentum and thermophysical transport modelling
252  virtual void postCorrector();
253 
254 
255  // Member Operators
256 
257  //- Disallow default bitwise assignment
258  void operator=(const XiFluid&) = delete;
259 };
260 
261 
262 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
263 
264 } // End namespace solvers
265 } // End namespace Foam
266 
267 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
268 
269 #endif
270 
271 // ************************************************************************* //
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
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:99
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:101
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:217
virtual void prePredictor()
Called at the start of the PIMPLE loop.
Definition: XiFluid.C:164
IOdictionary combustionProperties
Dictionary of combustion model coefficients.
Definition: XiFluid.H:136
dimensionedScalar SuMin
Minimum laminar flame-speed allowed for numerical stability.
Definition: XiFluid.H:124
volScalarField Su
Laminar flame-speed field.
Definition: XiFluid.H:121
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:172
psiuMulticomponentThermo & thermo_
Definition: XiFluid.H:103
dimensionedScalar SuMax
Maximum laminar flame-speed allowed for numerical stability.
Definition: XiFluid.H:127
const volScalarField & Xi
Flame wrinkling coefficient field.
Definition: XiFluid.H:220
dimensionedScalar XiCoef
Flame wrinkling model coefficient.
Definition: XiFluid.H:148
virtual void postCorrector()
Correct the momentum and thermophysical transport modelling.
Definition: XiFluid.C:175
word XiModel
Name of the flame wrinkling model.
Definition: XiFluid.H:145
dimensionedScalar sigmaExt
Laminar flame extinction strain-rate.
Definition: XiFluid.H:142
void EauSolve(const fv::convectionScheme< scalar > &mvConvection)
Solve the unburnt energy equation.
virtual ~XiFluid()
Destructor.
Definition: XiFluid.C:158
dimensionedScalar uPrimeCoef
Flame wrinkling model u' coefficient.
Definition: XiFluid.H:154
ignition ign
Ignition model.
Definition: XiFluid.H:157
volScalarField Xi_
Flame wrinkling coefficient field.
Definition: XiFluid.H:130
const psiuMulticomponentThermo & thermo
Reference to the fluid thermophysical properties.
Definition: XiFluid.H:213
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:139
volScalarField St
Turbulent flame-speed field.
Definition: XiFluid.H:133
volScalarField & b_
Reference to the combustion regress variable.
Definition: XiFluid.H:109
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:112
autoPtr< laminarFlameSpeed > unstrainedLaminarFlameSpeed
Laminar flame-speed model.
Definition: XiFluid.H:118
dimensionedScalar XiShapeCoef
Flame wrinkling model shape coefficient.
Definition: XiFluid.H:151
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.