5 volScalarField c(
"c", scalar(1) -
b);
9 volScalarField rhou(
thermo.rhou());
14 volVectorField
n(
"n", fvc::grad(
b));
16 volScalarField mgb(mag(
n));
18 dimensionedScalar dMgb = 1.0e-3*
19 (
b*c*mgb)().weightedAverage(
mesh.V())
20 /((
b*c)().weightedAverage(
mesh.V()) + SMALL)
21 + dimensionedScalar(
"ddMgb", mgb.dimensions(), SMALL);
25 surfaceVectorField SfHat(
mesh.Sf()/
mesh.magSf());
26 surfaceVectorField nfVec(fvc::interpolate(
n));
27 nfVec += SfHat*(fvc::snGrad(
b) - (SfHat & nfVec));
28 nfVec /= (mag(nfVec) + dMgb);
29 surfaceScalarField nf((
mesh.Sf() & nfVec));
37 surfaceScalarField phiSt(
"phiSt", fvc::interpolate(rhou*
StCorr*
Su*Xi)*nf);
41 mesh.surfaceInterpolation::deltaCoeffs()
42 *mag(phiSt)/(fvc::interpolate(
rho)*
mesh.magSf())
43 ).value()*
runTime.deltaTValue();
45 Info<<
"Max St-Courant Number = " << StCoNum << endl;
54 - fvm::Sp(fvc::div(phiSt),
b)
76 Info<<
"min(b) = " << min(
b).value() << endl;
82 volScalarField up(uPrimeCoef*sqrt((2.0/3.0)*
turbulence->k()));
94 + dimensionedScalar(
"1e-8", up.dimensions(), 1
e-8)
103 surfaceScalarField phiXi
106 - fvc::interpolate(fvc::laplacian(
turbulence->alphaEff(),
b)/mgb)*nf
107 + fvc::interpolate(
rho)*fvc::interpolate(
Su*(1.0/Xi - Xi))*nf
114 volVectorField Ut(
U +
Su*Xi*
n);
115 volScalarField sigmat((
n &
n)*fvc::div(Ut) - (
n & fvc::grad(Ut) &
n));
117 volScalarField sigmas
119 ((
n &
n)*fvc::div(
U) - (
n & fvc::grad(
U) &
n))/Xi
121 (
n &
n)*fvc::div(
Su*
n)
122 - (
n & fvc::grad(
Su*
n) &
n)
123 )*(Xi + scalar(1))/(2*Xi)
134 volScalarField SuInf(Su0*
max(scalar(1) - sigmas/sigmaExt, scalar(0.01)));
136 if (SuModel ==
"unstrained")
140 else if (SuModel ==
"equilibrium")
144 else if (SuModel ==
"transport")
151 (sigmas*SuInf*(Su0 - SuInf) + sqr(SuMin)*sigmaExt)
152 /(sqr(Su0 - SuInf) + sqr(SuMin))
158 + fvm::div(
phi + phiXi,
Su,
"div(phiXi,Su)")
159 - fvm::Sp(fvc::div(phiXi),
Su)
161 - fvm::SuSp(-
rho*Rc*Su0/
Su,
Su)
162 - fvm::SuSp(
rho*(sigmas + Rc),
Su)
183 << abort(FatalError);
190 if (XiModel ==
"fixed")
194 else if (XiModel ==
"algebraic")
200 (scalar(1) + (2*XiShapeCoef)*(scalar(0.5) -
b))
201 *XiCoef*sqrt(up/(
Su + SuMin))*Reta;
203 else if (XiModel ==
"transport")
210 volScalarField XiEqStar
212 scalar(1.001) + XiCoef*sqrt(up/(
Su + SuMin))*Reta
221 *(scalar(0.5) - min(
max(
b, scalar(0)), scalar(1)))
222 )*(XiEqStar - scalar(1.001))
225 volScalarField Gstar(0.28/tauEta);
226 volScalarField
R(Gstar*XiEqStar/(XiEqStar - scalar(1)));
227 volScalarField G(
R*(XiEq - scalar(1.001))/XiEq);
236 + fvm::div(
phi + phiXi, Xi,
"div(phiXi,Xi)")
237 - fvm::Sp(fvc::div(phiXi), Xi)
240 - fvm::Sp(
rho*(
R - G), Xi)
246 dimensionedScalar(sigmat.dimensions(), Zero)
264 Info<<
"max(Xi) = " <<
max(Xi).value() << endl;
265 Info<<
"max(XiEq) = " <<
max(XiEq).value() << endl;
271 << abort(FatalError);
274 Info<<
"Combustion progress = "
275 << 100*(scalar(1) -
b)().weightedAverage(
mesh.V()).value() <<
"%"
tmp< fv::convectionScheme< scalar > > mvConvection(fv::convectionScheme< scalar >::New(mesh, fields, phi, mesh.divScheme("div(phi,ft_b_ha_hau)")))
#define R(A, B, C, D, E, F, K, M)
dimensionedScalar StCorr("StCorr", dimless, 1.0)
const word & executable() const noexcept
Name of executable without the path.
Basic thermodynamics type based on the use of fitting functions for cp, h, s obtained from the templa...
compressible::turbulenceModel & turbulence
Foam::argList args(argc, argv)
Info<< "Creating the unstrained laminar flame speed\n"<< endl;autoPtr< laminarFlameSpeed > unstrainedLaminarFlameSpeed(laminarFlameSpeed::New(thermo))