This repository has been archived on 2023-11-20. You can view files and clone it, but cannot push or open issues or pull requests.
foam-extend4.1-coherent-io/applications/solvers/compressible/steadyCompressibleFoam/hEqn.H

26 lines
567 B
C++
Raw Normal View History

{
2016-03-15 12:56:56 +00:00
// Solve the enthalpy equation in total enthalpy formulation (see K)
2016-03-15 12:56:56 +00:00
K = 0.5*(magSqr(U));
fvScalarMatrix hEqn
(
fvm::ddt(rho, h)
2016-03-15 12:56:56 +00:00
+ fvc::ddt(rho, K)
+ fvm::div(phi, h)
2016-03-15 12:56:56 +00:00
+ 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();
hEqn.solve();
// Bounding of enthalpy taken out
thermo.correct();
psis = thermo.psi()/thermo.Cp()*thermo.Cv();
}