ENH: directMappedFixedValue: use different tag
[OpenFOAM-2.0.x.git] / applications / solvers / combustion / reactingFoam / chemistry.H
blob99f418af6f10ac69b44d08fc2271e2dd79c73fc4
1 if (chemistry.chemistry())
3     Info<< "Solving chemistry" << endl;
5     chemistry.solve
6     (
7         runTime.value() - runTime.deltaTValue(),
8         runTime.deltaTValue()
9     );
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();
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     }
43     chemistrySh = kappa*chemistry.Sh()();