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                 parcels.Srho(i)
00029               + kappa*chemistry.RR(i)().dimensionedInternalField(),
00030                 mesh.solver("Yi")
00031             );
00032 
00033             Yi.max(0.0);
00034             Yt += Yi;
00035         }
00036         else
00037         {
00038             inertIndex = i;
00039         }
00040     }
00041 
00042     Y[inertIndex] = scalar(1) - Yt;
00043     Y[inertIndex].max(0.0);
00044 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines