45 lines
937 B
C
45 lines
937 B
C
tmp<fv::convectionScheme<scalar> > mvConvection
|
|
(
|
|
fv::convectionScheme<scalar>::New
|
|
(
|
|
mesh,
|
|
fields,
|
|
phi,
|
|
mesh.schemesDict().divScheme("div(phi,Yi_h)")
|
|
)
|
|
);
|
|
|
|
{
|
|
|
|
label inertIndex = -1;
|
|
volScalarField Yt("Yt", 0.0*Y[0]);
|
|
|
|
for (label i = 0; i < Y.size(); i++)
|
|
{
|
|
if (Y[i].name() != inertSpecie)
|
|
{
|
|
volScalarField& Yi = Y[i];
|
|
|
|
solve
|
|
(
|
|
fvm::ddt(rho, Yi)
|
|
+ mvConvection->fvmDiv(phi, Yi)
|
|
- fvm::laplacian(turbulence->muEff(), Yi)
|
|
==
|
|
dieselSpray.evaporationSource(i)
|
|
+ kappa*chemistry.RR(i),
|
|
mesh.solutionDict().solver("Yi")
|
|
);
|
|
|
|
Yi.max(0.0);
|
|
Yt += Yi;
|
|
}
|
|
else
|
|
{
|
|
inertIndex = i;
|
|
}
|
|
}
|
|
|
|
Y[inertIndex] = scalar(1) - Yt;
|
|
Y[inertIndex].max(0.0);
|
|
}
|