Removed unnecessary return statement
[foam-extend-3.2.git] / applications / solvers / compressible / sonicDyMFoam / eEqn.H
blobe90e504fb457b8ee75b384357c60e545cf19cc5e
2     fvScalarMatrix eEqn
3     (
4         fvm::ddt(rho, e)
5       + fvm::div(phi, e)
6       - fvm::laplacian(turbulence->alphaEff(), e)
7      ==
8       - fvm::SuSp(pDivU/e, e)
9         // viscous heating?
10     );
12     if (oCorr == nOuterCorr - 1)
13     {
14         if (mesh.solutionDict().relax("eFinal"))
15         {
16             eEqn.relax(mesh.solutionDict().relaxationFactor("eFinal"));
17         }
18         else
19         {
20             eEqn.relax(1);
21         }
22     }
23     else
24     {
25         eEqn.relax();
26     }
28     eEqn.solve();
30     // Bound the energy using TMin and TMax
31     {
32         dimensionedScalar Tstd("Tstd", dimTemperature, specie::Tstd());
34         volScalarField Cv = thermo.Cv();
35         volScalarField R = thermo.Cp() - Cv;
37         e = Foam::min(e, TMax*Cv + R*Tstd);
38         e = Foam::max(e, TMin*Cv + R*Tstd);
39         e.correctBoundaryConditions();
40     }
42     thermo.correct();