FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

YEqn.H

Go to the documentation of this file.
00001 tmp<fv::convectionScheme<scalar> > mvConvection
00002 (
00003     fv::convectionScheme<scalar>::New
00004     (
00005         mesh,
00006         fields,
00007         phi,
00008         mesh.divScheme("div(phi,Yi_h)")
00009     )
00010 );
00011 
00012 
00013 {
00014     label inertIndex = -1;
00015     volScalarField Yt = 0.0*Y[0];
00016 
00017     forAll(Y, i)
00018     {
00019         if (Y[i].name() != inertSpecie)
00020         {
00021             volScalarField& Yi = Y[i];
00022             solve
00023             (
00024                 fvm::ddt(rho, Yi)
00025               + mvConvection->fvmDiv(phi, Yi)
00026               - fvm::laplacian(turbulence->muEff(), Yi)
00027               ==
00028                 coalParcels.Srho(i)
00029               + kappa*chemistry.RR(i)().dimensionedInternalField()
00030             );
00031 
00032             Yi.max(0.0);
00033             Yt += Yi;
00034         }
00035         else
00036         {
00037             inertIndex = i;
00038         }
00039     }
00040 
00041     Y[inertIndex] = scalar(1) - Yt;
00042     Y[inertIndex].max(0.0);
00043 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines