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     for (label i=0; i<Y.size(); i++)
00018     {
00019         if (Y[i].name() != inertSpecie)
00020         {
00021             volScalarField& Yi = Y[i];
00022 
00023             solve
00024             (
00025                 fvm::ddt(rho, Yi)
00026               + mvConvection->fvmDiv(phi, Yi)
00027               - fvm::laplacian(turbulence->muEff(), Yi)
00028               ==
00029                 dieselSpray.evaporationSource(i)
00030               + kappa*chemistry.RR(i),
00031                 mesh.solver("Yi")
00032             );
00033 
00034             Yi.max(0.0);
00035             Yt += Yi;
00036         }
00037         else
00038         {
00039             inertIndex = i;
00040         }
00041     }
00042 
00043     Y[inertIndex] = scalar(1) - Yt;
00044     Y[inertIndex].max(0.0);
00045 }
00046 
00047 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines