34 namespace laminarFlameSpeedModels
50 Foam::laminarFlameSpeedModels::SCOPE::polynomial::polynomial
52 const dictionary& polyDict
55 FixedList<scalar, 7>(polyDict.
lookup(
"coefficients")),
58 llv(polyPhi(ll, *this)),
59 ulv(polyPhi(ul, *this)),
64 Foam::laminarFlameSpeedModels::SCOPE::SCOPE
66 const dictionary&
dict,
67 const psiuReactionThermo& ct
70 laminarFlameSpeed(dict, ct),
83 ).optionalSubDict(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;
110 Info<< phi << token::TAB << SuRef(phi) <<
endl;
124 inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::polyPhi
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])))))
141 inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::SuRef
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 " 224 inline Foam::scalar Foam::laminarFlameSpeedModels::SCOPE::Su0pTphi
231 static const scalar Tref = 300.0;
232 static const scalar pRef = 1.013e5;
234 return SuRef(phi)*
pow((Tu/Tref), Texp_)*
pow((p/pRef), pexp_);
245 tmp<volScalarField> tSu0
266 Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi);
269 volScalarField::Boundary& Su0Bf = Su0.boundaryFieldRef();
279 Su0p[facei] = Su0pTphi(pp[facei], Tup[facei], phi);
294 tmp<volScalarField> tSu0
315 Su0[celli] = Su0pTphi(p[celli], Tu[celli], phi[celli]);
318 volScalarField::Boundary& Su0Bf = Su0.boundaryFieldRef();
348 tmp<volScalarField> tMa
355 phi.time().timeName(),
369 ma[celli] =
Ma(phi[celli]);
372 volScalarField::Boundary& maBf = ma.boundaryFieldRef();
381 map[facei] =
Ma(phip[facei]);
401 )*ft/(scalar(1) - ft)
408 return tmp<volScalarField>
415 mesh.time().timeName(),
442 )*ft/(scalar(1) - ft)
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
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.
scalar equivalenceRatio_
Equivalence ratio of a homogeneous mixture.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< volScalarField > operator()() const
Return the laminar flame speed [m/s].
virtual const volScalarField & Tu() const =0
Unburnt gas temperature [K].
PtrList< volScalarField > & Y()
Return the mass-fraction fields.
Macros for easy insertion into run-time selection tables.
virtual volScalarField & p()
Pressure [Pa].
GeometricField< scalar, fvPatchField, volMesh > volScalarField
stressControl lookup("compactNormalStress") >> compactNormalStress
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
addToRunTimeSelectionTable(laminarFlameSpeed, constant, dictionary)
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
const Mesh & mesh() const
Return mesh.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
Internal & ref()
Return a reference to the dimensioned internal field.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
const dimensionSet dimless(0, 0, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const psiuReactionThermo & psiuReactionThermo_
virtual basicSpecieMixture & composition()=0
Return the composition of the multi-component mixture.
bool contains(const word &specieName) const
Does the mixture include this specie?
A class for managing temporary objects.
tmp< volScalarField > Ma() const
Return the Markstein number.
defineTypeNameAndDebug(constant, 0)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dimensionSet dimVelocity