26 lines
648 B
C
26 lines
648 B
C
{
|
|
// Solve the enthalpy equation in total enthalpy formulation (see K)
|
|
|
|
K = 0.5*(magSqr(U));
|
|
|
|
fvScalarMatrix hEqn
|
|
(
|
|
fvm::ddt(rho, h)
|
|
+ fvc::ddt(rho, K)
|
|
+ fvm::div(phi, h)
|
|
+ fvc::div(phi, K)
|
|
- fvm::laplacian(turbulence->alphaEff(), h)
|
|
==
|
|
// Viscous heating: note sign (devRhoReff has a minus in it)
|
|
- (turbulence->devRhoReff() && fvc::grad(U))
|
|
);
|
|
|
|
hEqn.relax();
|
|
|
|
eqnResidual = hEqn.solve().initialResidual();
|
|
maxResidual = max(eqnResidual, maxResidual);
|
|
|
|
// Bounding of enthalpy taken out
|
|
thermo.correct();
|
|
psis = thermo.psi()/thermo.Cp()*thermo.Cv();
|
|
}
|