FreeFOAM The Cross-Platform CFD Toolkit
YEqn.H
Go to the documentation of this file.
1 
2 tmp<fv::convectionScheme<scalar> > mvConvection
3 (
4  fv::convectionScheme<scalar>::New
5  (
6  mesh,
7  fields,
8  phi,
9  mesh.divScheme("div(phi,Yi_h)")
10  )
11 );
12 
13 
14 {
15  label inertIndex = -1;
16  volScalarField Yt = 0.0*Y[0];
17 
18  forAll(Y, i)
19  {
20  if (Y[i].name() != inertSpecie)
21  {
22  volScalarField& Yi = Y[i];
23  solve
24  (
25  fvm::ddt(rho, Yi)
26  + mvConvection->fvmDiv(phi, Yi)
27  - fvm::laplacian(turbulence->muEff(), Yi)
28  ==
29  parcels.Srho(i)
30  + kappa*chemistry.RR(i)().dimensionedInternalField()
31  + massSource.Su(i),
32  mesh.solver("Yi")
33  );
34 
35  Yi.max(0.0);
36  Yt += Yi;
37  }
38  else
39  {
40  inertIndex = i;
41  }
42  }
43 
44  Y[inertIndex] = scalar(1) - Yt;
45  Y[inertIndex].max(0.0);
46 }