Go to the documentation of this file.
34 namespace laminarFlameSpeedModels
52 const dictionary& polyDict
55 FixedList<scalar, 7>(polyDict.
lookup(
"coefficients")),
58 llv(polyPhi(ll, *this)),
59 ulv(polyPhi(ul, *this)),
66 const dictionary&
dict,
67 const psiuReactionThermo& ct
70 laminarFlameSpeed(
dict, ct),
83 ).subDict(typeName +
"Coeffs")
87 SuPolyL_(coeffsDict_.subDict(
"lowerSuPolynomial")),
88 SuPolyU_(coeffsDict_.subDict(
"upperSuPolynomial")),
91 MaPolyL_(coeffsDict_.subDict(
"lowerMaPolynomial")),
92 MaPolyU_(coeffsDict_.subDict(
"upperMaPolynomial"))
94 SuPolyL_.ll =
max(SuPolyL_.ll, LFL_) + SMALL;
95 SuPolyU_.ul =
min(SuPolyU_.ul, UFL_) - SMALL;
97 SuPolyL_.lu = 0.5*(SuPolyL_.ul + SuPolyU_.ll);
98 SuPolyU_.lu = SuPolyL_.lu - SMALL;
100 MaPolyL_.lu = 0.5*(MaPolyL_.ul + MaPolyU_.ll);
101 MaPolyU_.lu = MaPolyL_.lu - SMALL;
105 Info<<
"phi Su (T = Tref, p = pref)" <<
endl;
107 for (
int i=0; i<
n; i++)
109 scalar
phi = (2.0*i)/
n;
130 scalar
x =
phi - 1.0;
136 +
x*(a[1] +
x*(a[2] +
x*(a[3] +
x*(a[4] +
x*(a[5] +
x*a[6])))))
146 if (phi < LFL_ || phi > UFL_)
151 else if (
phi < SuPolyL_.ll)
155 return SuPolyL_.llv*(
phi - LFL_)/(SuPolyL_.ll - LFL_);
157 else if (
phi > SuPolyU_.ul)
161 return SuPolyU_.ulv*(UFL_ -
phi)/(UFL_ - SuPolyU_.ul);
163 else if (
phi < SuPolyL_.lu)
166 return polyPhi(
phi, SuPolyL_);
168 else if (
phi > SuPolyU_.lu)
171 return polyPhi(
phi, SuPolyU_);
177 <<
" cannot be handled by SCOPE function with the "
191 if (
phi < MaPolyL_.ll)
196 else if (
phi > MaPolyU_.ul)
201 else if (
phi < SuPolyL_.lu)
204 return polyPhi(
phi, MaPolyL_);
206 else if (
phi > SuPolyU_.lu)
209 return polyPhi(
phi, MaPolyU_);
215 <<
" cannot be handled by SCOPE function with the "
231 static const scalar Tref = 300.0;
232 static const scalar
pRef = 1.013e5;
245 tmp<volScalarField> tSu0
266 Su0[celli] = Su0pTphi(
p[celli], Tu[celli],
phi);
277 Su0p[facei] = Su0pTphi(pp[facei], Tup[facei],
phi);
292 tmp<volScalarField> tSu0
313 Su0[celli] = Su0pTphi(
p[celli], Tu[celli],
phi[celli]);
344 tmp<volScalarField> tMa
351 phi.time().timeName(),
365 ma[celli] = Ma(
phi[celli]);
375 map[facei] = Ma(phip[facei]);
386 if (psiuReactionThermo_.composition().contains(
"ft"))
388 const volScalarField& ft = psiuReactionThermo_.composition().Y(
"ft");
394 psiuReactionThermo_.lookup(
"stoichiometricAirFuelMassRatio")
395 )*ft/(scalar(1) - ft)
400 const fvMesh&
mesh = psiuReactionThermo_.p().mesh();
402 return tmp<volScalarField>
409 mesh.time().timeName(),
425 if (psiuReactionThermo_.composition().contains(
"ft"))
427 const volScalarField& ft = psiuReactionThermo_.composition().Y(
"ft");
431 psiuReactionThermo_.p(),
432 psiuReactionThermo_.Tu(),
435 psiuReactionThermo_.lookup(
"stoichiometricAirFuelMassRatio")
436 )*ft/(scalar(1) - ft)
443 psiuReactionThermo_.p(),
444 psiuReactionThermo_.Tu(),
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
defineTypeNameAndDebug(constant, 0)
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
const dimensionSet dimVelocity
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< volScalarField > operator()() const
Return the laminar flame speed [m/s].
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
scalar Su0pTphi(scalar p, scalar Tu, scalar phi) const
Laminar flame speed evaluated from the given equivalence ratio.
scalar SuRef(scalar phi) const
Laminar flame speed evaluated from the given equivalence ratio.
SCOPE(const SCOPE &)
Construct as copy (not implemented)
polynomial(const dictionary &polyDict)
Construct from dictionary.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Macros for easy insertion into run-time selection tables.
addToRunTimeSelectionTable(laminarFlameSpeed, constant, dictionary)
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static scalar polyPhi(scalar phi, const polynomial &a)
Polynomial evaluated from the given equivalence ratio.
tmp< volScalarField > Ma() const
Return the Markstein number.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
stressControl lookup("compactNormalStress") >> compactNormalStress