53Foam::laminarFlameSpeedModels::SCOPE::polynomial::polynomial
58 FixedList<scalar, 7>(polyDict.lookup(
"coefficients")),
59 ll(polyDict.
get<scalar>(
"lowerLimit")),
60 ul(polyDict.
get<scalar>(
"upperLimit")),
61 llv(polyPhi(ll, *this)),
62 ulv(polyPhi(ul, *this)),
67Foam::laminarFlameSpeedModels::SCOPE::SCOPE
70 const psiuReactionThermo& ct
73 laminarFlameSpeed(
dict, ct),
83 ).optionalSubDict(typeName +
"Coeffs")
87 coeffsDict_.getCompat<scalar>
89 "lowerFlammabilityLimit",
90 {{
"lowerFlamabilityLimit", 1712}}
95 coeffsDict_.getCompat<scalar>
97 "upperFlammabilityLimit",
98 {{
"upperFlamabilityLimit", 1712}}
101 SuPolyL_(coeffsDict_.subDict(
"lowerSuPolynomial")),
102 SuPolyU_(coeffsDict_.subDict(
"upperSuPolynomial")),
103 Texp_(coeffsDict_.get<scalar>(
"Texp")),
104 pexp_(coeffsDict_.get<scalar>(
"pexp")),
105 MaPolyL_(coeffsDict_.subDict(
"lowerMaPolynomial")),
106 MaPolyU_(coeffsDict_.subDict(
"upperMaPolynomial"))
108 SuPolyL_.ll =
max(SuPolyL_.ll, LFL_) + SMALL;
109 SuPolyU_.ul =
min(SuPolyU_.ul, UFL_) - SMALL;
111 SuPolyL_.lu = 0.5*(SuPolyL_.ul + SuPolyU_.ll);
112 SuPolyU_.lu = SuPolyL_.lu - SMALL;
114 MaPolyL_.lu = 0.5*(MaPolyL_.ul + MaPolyU_.ll);
115 MaPolyU_.lu = MaPolyL_.lu - SMALL;
119 Info<<
"phi Su (T = Tref, p = pref)" <<
endl;
121 for (
int i=0; i<
n; i++)
123 scalar
phi = (2.0*i)/
n;
138inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::polyPhi
144 scalar
x =
phi - 1.0;
150 +
x*(a[1] +
x*(a[2] +
x*(a[3] +
x*(a[4] +
x*(a[5] +
x*a[6])))))
155inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::SuRef
165 else if (
phi < SuPolyL_.ll)
169 return SuPolyL_.llv*(
phi - LFL_)/(SuPolyL_.ll - LFL_);
171 else if (
phi > SuPolyU_.ul)
175 return SuPolyU_.ulv*(UFL_ -
phi)/(UFL_ - SuPolyU_.ul);
177 else if (
phi < SuPolyL_.lu)
180 return polyPhi(
phi, SuPolyL_);
182 else if (
phi > SuPolyU_.lu)
185 return polyPhi(
phi, SuPolyU_);
191 <<
" cannot be handled by SCOPE function with the "
205 if (
phi < MaPolyL_.ll)
210 else if (
phi > MaPolyU_.ul)
215 else if (
phi < SuPolyL_.lu)
218 return polyPhi(
phi, MaPolyL_);
220 else if (
phi > SuPolyU_.lu)
223 return polyPhi(
phi, MaPolyU_);
229 <<
" cannot be handled by SCOPE function with the "
238inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
245 static const scalar Tref = 300.0;
246 static const scalar pRef = 1.013e5;
248 return SuRef(
phi)*
pow((Tu/Tref), Texp_)*
pow((
p/pRef), pexp_);
252Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
266 auto& Su0 = tSu0.ref();
270 Su0[celli] = Su0pTphi(
p[celli], Tu[celli],
phi);
279 const scalarField& Tup = Tu.boundaryField()[patchi];
283 Su0p[facei] = Su0pTphi(
pp[facei], Tup[facei],
phi);
291Foam::tmp<Foam::volScalarField> Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
305 auto& Su0 = tSu0.ref();
309 Su0[celli] = Su0pTphi(
p[celli], Tu[celli],
phi[celli]);
318 const scalarField& Tup = Tu.boundaryField()[patchi];
349 auto& ma = tMa.ref();
353 ma[celli] = Ma(
phi[celli]);
365 map[facei] = Ma(phip[facei]);
373Foam::tmp<Foam::volScalarField>
376 if (psiuReactionThermo_.composition().contains(
"ft"))
378 const volScalarField& ft = psiuReactionThermo_.composition().Y(
"ft");
384 "stoichiometricAirFuelMassRatio",
dimless, psiuReactionThermo_
385 )*ft/(scalar(1) - ft)
390 const fvMesh&
mesh = psiuReactionThermo_.p().mesh();
403Foam::tmp<Foam::volScalarField>
406 if (psiuReactionThermo_.composition().contains(
"ft"))
408 const volScalarField& ft = psiuReactionThermo_.composition().Y(
"ft");
412 psiuReactionThermo_.p(),
413 psiuReactionThermo_.Tu(),
416 "stoichiometricAirFuelMassRatio",
dimless, psiuReactionThermo_
417 )*ft/(scalar(1) - ft)
424 psiuReactionThermo_.p(),
425 psiuReactionThermo_.Tu(),
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
GeometricBoundaryField< scalar, fvPatchField, volMesh > Boundary
@ NO_REGISTER
Do not request registration (bool: false).
Laminar flame speed obtained from the SCOPE correlation.
tmp< volScalarField > operator()() const
Return the laminar flame speed [m/s].
tmp< volScalarField > Ma() const
Return the Markstein number.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
Namespace for laminar flame speed models.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
const dimensionSet dimless
Dimensionless.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
const dimensionSet dimVelocity
messageStream Info
Information stream (stdout output on master, null elsewhere).
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Ostream & endl(Ostream &os)
Add newline and flush stream.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define forAll(list, i)
Loop across all elements in list.