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

43 lines
812 B
C
Raw Normal View History

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