FreeFOAM The Cross-Platform CFD Toolkit
chemistry.H
Go to the documentation of this file.
1 if (chemistry.chemistry())
2 {
3  Info<< "Solving chemistry" << endl;
4 
5  chemistry.solve
6  (
7  runTime.value() - runTime.deltaTValue(),
8  runTime.deltaTValue()
9  );
10 
11  // turbulent time scale
12  if (turbulentReaction)
13  {
14  tmp<volScalarField> tepsilon(turbulence->epsilon());
15  const volScalarField& epsilon = tepsilon();
16  tmp<volScalarField> tmuEff(turbulence->muEff());
17  const volScalarField& muEff = tmuEff();
18  tmp<volScalarField> ttc(chemistry.tc());
19  const volScalarField& tc = ttc();
20 
21  forAll(epsilon, i)
22  {
23  if (epsilon[i] > 0)
24  {
25  // Chalmers PaSR model
26  scalar tk = Cmix.value()*Foam::sqrt(muEff[i]/rho[i]/epsilon[i]);
27  kappa[i] =
28  (runTime.deltaTValue() + tc[i])
29  /(runTime.deltaTValue() + tc[i] + tk);
30  }
31  else
32  {
33  // Return to laminar combustion
34  kappa[i] = 1.0;
35  }
36  }
37  }
38  else
39  {
40  kappa = 1.0;
41  }
42 
43  chemistrySh = kappa*chemistry.Sh()();
44 }
45 
46 // ************************ vim: set sw=4 sts=4 et: ************************ //