mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
46 lines
953 B
C
46 lines
953 B
C
{
|
|
fvScalarMatrix hEqn
|
|
(
|
|
fvm::ddt(betav*rho, h)
|
|
- (
|
|
thermo.isotropic()
|
|
? fvm::laplacian(betav*thermo.alpha(), h, "laplacian(alpha,h)")
|
|
: fvm::laplacian(betav*taniAlpha(), h, "laplacian(alpha,h)")
|
|
)
|
|
==
|
|
fvOptions(rho, h)
|
|
);
|
|
|
|
hEqn.relax();
|
|
|
|
fvOptions.constrain(hEqn);
|
|
|
|
if (coupled)
|
|
{
|
|
fvMatrixAssemblyPtr->addFvMatrix(hEqn);
|
|
}
|
|
else
|
|
{
|
|
Info<< "\nSolving for solid region "<< solidRegions[i].name() << endl;
|
|
|
|
if (finalIter)
|
|
{
|
|
mesh.data::add("finalIteration", true);
|
|
}
|
|
|
|
hEqn.solve(mesh.solver(h.select(finalIter)));
|
|
|
|
fvOptions.correct(h);
|
|
|
|
thermo.correct();
|
|
|
|
Info<< "Min/max T:" << min(thermo.T()).value() << ' '
|
|
<< max(thermo.T()).value() << endl;
|
|
|
|
if (finalIter)
|
|
{
|
|
mesh.data::remove("finalIteration");
|
|
}
|
|
}
|
|
}
|