This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/lagrangian/coalChemistryFoam/YEqn.H

44 lines
878 B
C++
Raw Permalink Normal View History

2010-08-26 14:22:03 +00:00
tmp<fv::convectionScheme<scalar> > mvConvection
(
fv::convectionScheme<scalar>::New
(
mesh,
fields,
phi,
mesh.schemesDict().divScheme("div(phi,Yi_h)")
2010-08-26 14:22:03 +00:00
)
);
{
label inertIndex = -1;
volScalarField Yt("Yt", 0.0*Y[0]);
2010-08-26 14:22:03 +00:00
forAll(Y, i)
{
if (Y[i].name() != inertSpecie)
{
volScalarField& Yi = Y[i];
solve
(
fvm::ddt(rho, Yi)
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(turbulence->muEff(), Yi)
==
coalParcels.Srho(i)
+ kappa*chemistry.RR(i)().dimensionedInternalField()
);
Yi.max(0.0);
Yt += Yi;
}
else
{
inertIndex = i;
}
}
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].max(0.0);
}