Gulder_laminarFlameSpeed.C
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) 2011-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 \*---------------------------------------------------------------------------*/
25 
28 
29 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
30 
31 namespace Foam
32 {
33 namespace laminarFlameSpeedModels
34 {
36 
38  (
40  Gulder,
42  );
43 }
44 }
45 
46 
47 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
48 
50 (
51  const dictionary& dict,
52  const dictionary& coeffDict,
53  const uRhoMulticomponentThermo& ct
54 )
55 :
57 
58  W_(coeffDict.lookup<scalar>("W")),
59  eta_(coeffDict.lookup<scalar>("eta")),
60  xi_(coeffDict.lookup<scalar>("xi")),
61  f_(coeffDict.lookup<scalar>("f")),
62  alpha_(coeffDict.lookup<scalar>("alpha")),
63  beta_(coeffDict.lookup<scalar>("beta"))
64 {}
65 
66 
67 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
68 
70 {}
71 
72 
73 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
74 
75 inline Foam::scalar Foam::laminarFlameSpeedModels::Gulder::SuRef
76 (
77  const scalar Phi
78 ) const
79 {
80  if (Phi > small)
81  {
82  return W_*pow(Phi, eta_)*exp(-xi_*sqr(Phi - 1.075));
83  }
84  else
85  {
86  return 0;
87  }
88 }
89 
90 
91 inline Foam::scalar Foam::laminarFlameSpeedModels::Gulder::Su0pTPhi
92 (
93  const scalar p,
94  const scalar Tu,
95  const scalar Phi,
96  const scalar Yegr
97 ) const
98 {
99  static const scalar Tref = 300.0;
100  static const scalar pRef = 1.013e5;
101 
102  return
103  SuRef(Phi)*pow((Tu/Tref), alpha_)*pow((p/pRef), beta_)
104  *max(1 - f_*Yegr, 0);
105 }
106 
107 
108 // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
109 
111 (
112  const volScalarField& p,
113  const volScalarField& Tu,
114  const volScalarField& Phi
115 ) const
116 {
118  (
120  (
121  "Su0",
122  p.mesh(),
124  )
125  );
126 
127  volScalarField& Su0 = tSu0.ref();
128 
129  forAll(Su0, celli)
130  {
131  Su0[celli] = Su0pTPhi(p[celli], Tu[celli], Phi[celli], 0);
132  }
133 
135 
136  forAll(Su0Bf, patchi)
137  {
138  forAll(Su0Bf[patchi], facei)
139  {
140  Su0Bf[patchi][facei] =
141  Su0pTPhi
142  (
143  p.boundaryField()[patchi][facei],
144  Tu.boundaryField()[patchi][facei],
145  Phi.boundaryField()[patchi][facei],
146  0
147  );
148  }
149  }
150 
151  return tSu0;
152 }
153 
154 
156 (
157  const volScalarField& p,
158  const volScalarField& Tu,
159  const volScalarField& Phi,
160  const volScalarField& egr
161 ) const
162 {
164  (
166  (
167  "Su0",
168  p.mesh(),
170  )
171  );
172 
173  volScalarField& Su0 = tSu0.ref();
174 
175  forAll(Su0, celli)
176  {
177  Su0[celli] = Su0pTPhi(p[celli], Tu[celli], Phi[celli], egr[celli]);
178  }
179 
181 
182  forAll(Su0Bf, patchi)
183  {
184  forAll(Su0Bf[patchi], facei)
185  {
186  Su0Bf[patchi][facei] =
187  Su0pTPhi
188  (
189  p.boundaryField()[patchi][facei],
190  Tu.boundaryField()[patchi][facei],
191  Phi.boundaryField()[patchi][facei],
192  egr.boundaryField()[patchi][facei]
193  );
194  }
195  }
196 
197  return tSu0;
198 }
199 
200 
201 // ************************************************************************* //
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:449
Macros for easy insertion into run-time selection tables.
Generic GeometricBoundaryField class.
Generic GeometricField class.
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
static tmp< GeometricField< Type, GeoMesh, PrimitiveField > > New(const word &name, const Internal &, const PtrList< Patch > &, const HashPtrTable< Source > &=HashPtrTable< Source >())
Return a temporary field constructed from name,.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Laminar flame speed obtained from Gulder's correlation.
Gulder(const dictionary &dict, const dictionary &coeffDict, const uRhoMulticomponentThermo &)
Construct from dictionary and uRhoMulticomponentThermo.
Abstract class for laminar flame speed.
virtual tmp< volScalarField > Su() const
Return the laminar flame speed [m/s].
A class for managing temporary objects.
Definition: tmp.H:55
T & ref() const
Return non-const reference or generate a fatal error.
Definition: tmpI.H:197
Base-class for combustion fluid thermodynamic properties based on compressibility.
label patchi
addToRunTimeSelectionTable(laminarFlameSpeed, constant, dictionary)
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
Definition: units.C:346
Namespace for OpenFOAM.
dimensionedScalar exp(const dimensionedScalar &ds)
tmp< DimensionedField< typename outerProduct< Type, Type >::type, GeoMesh, Field >> sqr(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
const dimensionSet & dimVelocity
Definition: dimensions.C:154
tmp< DimensionedField< typename powProduct< Type, r >::type, GeoMesh, Field > > pow(const DimensionedField< Type, GeoMesh, PrimitiveField > &df, typename powProduct< Type, r >::type)
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
dictionary dict
volScalarField & p