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     label inertIndex = -1;
00014     volScalarField Yt = 0.0*Y[0];
00015 
00016     for (label i=0; i<Y.size(); i++)
00017     {
00018         if (Y[i].name() != inertSpecie)
00019         {
00020             volScalarField& Yi = Y[i];
00021 
00022             solve
00023             (
00024                 fvm::ddt(rho, Yi)
00025               + mvConvection->fvmDiv(phi, Yi)
00026               - fvm::laplacian(turbulence->muEff(), Yi)
00027              ==
00028                 kappa*chemistry.RR(i),
00029                 mesh.solver("Yi")
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 }
00044 
00045 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines