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