Backported steadyCompressibleFoam, steadyCompressibleMRFFoam, steadyCompressibleSRFFo...
[foam-extend-4.0.git] / applications / solvers / compressible / steadyCompressibleMRFFoam / hEqn.H
blob0579637b969c1583f6226b5be5f65ce5a55a282d
2     // Solve the enthalpy equation
3     T.storePrevIter();
5     surfaceScalarField faceU = phi/fvc::interpolate(rho);
7     fvScalarMatrix hEqn
8     (
9         fvm::ddt(rho, h)
10       + fvm::div(phi, h)
11       - fvm::laplacian(turbulence->alphaEff(), h)
12      ==
13         fvc::div(faceU + mrfZones.fluxCorrection(), p, "div(U,p)")
14         // Note: div flux correction is zero so there is no need to
15         // carry it.  HJ, 4/Dec/2015
16       - p*fvc::div(faceU)
17         // Viscous heating: note sign (devRhoReff has a minus in it)
18       - (turbulence->devRhoReff() && fvc::grad(U))
19     );
21     hEqn.relax();
23     // Bounding of enthalpy taken out
24     thermo.correct();
25     psis = thermo.psi()/thermo.Cp()*thermo.Cv();