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