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
2016-05-30 10:40:08 +02:00

32 lines
671 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?
);
eEqn.relax
(
mesh.solutionDict().equationRelaxationFactor(e.select(pimple.finalIter()))
);
eEqn.solve();
thermo.correct();
// Recalculate compressibility
psis = thermo.psi()/thermo.Cp()*thermo.Cv();
// Recalculate density
rho = thermo.rho();
rho.correctBoundaryConditions();
}