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

33 lines
663 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
);
eEqn.relax
(
mesh.solutionDict().relaxationFactor(e.select(pimple.finalIter()))
);
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();
rho.correctBoundaryConditions();
2010-08-26 14:22:03 +00:00
}