Files
openfoam/applications/solvers/heatTransfer/chtMultiRegionFoam/fluid/EEqn.H
2021-08-03 20:08:49 +00:00

46 lines
936 B
C

{
volScalarField& he = thermo.he();
fvScalarMatrix EEqn
(
fvm::ddt(rho, he) + fvm::div(phi, he)
+ fvc::ddt(rho, K) + fvc::div(phi, K)
+ (
he.name() == "e"
? fvc::div
(
fvc::absolute(phi/fvc::interpolate(rho), U),
p,
"div(phiv,p)"
)
: -dpdt
)
- fvm::laplacian(turbulence.alphaEff(), he)
==
rho*(U&g)
+ rad.Sh(thermo, he)
+ Qdot
+ fvOptions(rho, he)
);
EEqn.relax();
fvOptions.constrain(EEqn);
if (coupled)
{
fvMatrixAssemblyPtr->addFvMatrix(EEqn);
}
else
{
EEqn.solve(mesh.solver(he.select(finalIter)));
fvOptions.correct(he);
thermo.correct();
rad.correct();
Info<< "Min/max T:" << min(thermo.T()).value() << ' '
<< max(thermo.T()).value() << endl;
}
}