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/sonicFoam/eEqn.H
Hrvoje Jasak f206e5ffec Bugfix: Compressible solver update
Conflicts:
	applications/solvers/compressible/steadyCompressibleFoam/pEqn.H
2016-01-05 14:52:10 +00:00

42 lines
812 B
C

{
fvScalarMatrix eEqn
(
fvm::ddt(rho, e)
+ fvm::div(phi, e)
- fvm::laplacian(turbulence->alphaEff(), e)
==
- p*fvc::div(phi/fvc::interpolate(rho))
// - fvm::SuSp
// (
// p*fvc::div(phi/fvc::interpolate(rho))/e,
// e
// )
// viscous heating?
);
if (oCorr == nOuterCorr - 1)
{
if (mesh.solutionDict().relax("eFinal"))
{
eEqn.relax(mesh.solutionDict().relaxationFactor("eFinal"));
}
else
{
eEqn.relax(1);
}
}
else
{
eEqn.relax();
}
eEqn.solve();
thermo.correct();
// Recalculate compressibility
psis = thermo.psi()/thermo.Cp()*thermo.Cv();
// Recalculate density
rho = thermo.rho();
}