mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
46 lines
936 B
C
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;
|
|
}
|
|
}
|