Minor consistency changes.

This commit is contained in:
henry
2008-08-13 12:40:48 +01:00
parent 9a7ca2b988
commit 09f5d38fb4
3 changed files with 47 additions and 27 deletions

View File

@ -7,11 +7,17 @@
+ turbulence->divDevRhoReff(U)
);
//if (oCorr != nOuterCorr-1)
if (oCorr == nOuterCorr-1)
{
UEqn().relax(1);
}
else
{
UEqn().relax();
}
volScalarField rUA = 1.0/UEqn().A();
if (momentumPredictor)
{
if (oCorr == nOuterCorr-1)
@ -23,3 +29,8 @@
solve(UEqn() == -fvc::grad(p));
}
}
else
{
U = rUA*(UEqn().H() - fvc::grad(p));
U.correctBoundaryConditions();
}

View File

@ -29,7 +29,12 @@ if (transonic)
- fvm::laplacian(rho*rUA, p)
);
if (oCorr == nOuterCorr-1 && corr == nCorr-1 && nonOrth == nNonOrthCorr)
if
(
oCorr == nOuterCorr-1
&& corr == nCorr-1
&& nonOrth == nNonOrthCorr
)
{
pEqn.solve(mesh.solver("pFinal"));
}
@ -57,6 +62,7 @@ else
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
{
// Pressure corrector
fvScalarMatrix pEqn
(
fvm::ddt(psi, p)
@ -64,7 +70,12 @@ else
- fvm::laplacian(rho*rUA, p)
);
if (oCorr == nOuterCorr-1 && corr == nCorr-1 && nonOrth == nNonOrthCorr)
if
(
oCorr == nOuterCorr-1
&& corr == nCorr-1
&& nonOrth == nNonOrthCorr
)
{
pEqn.solve(mesh.solver("pFinal"));
}

View File

@ -68,9 +68,8 @@ int main(int argc, char *argv[])
rho.storePrevIter();
}
// --- PIMPLE loop
int oCorr=0;
do
// --- Pressure-velocity PIMPLE corrector loop
for (int oCorr=0; oCorr<nOuterCorr; oCorr++)
{
#include "UEqn.H"
#include "hEqn.H"
@ -82,8 +81,7 @@ int main(int argc, char *argv[])
}
turbulence->correct();
} while (++oCorr < nOuterCorr);
}
runTime.write();