ENH: Updated PIMPLE solvers to new pimpleControl framework

This commit is contained in:
andy
2011-10-26 12:04:25 +01:00
parent 4c63590979
commit d05c5a41a1
87 changed files with 312 additions and 440 deletions

View File

@ -76,12 +76,12 @@ int main(int argc, char *argv[])
#include "zonePhaseVolumes.H"
// --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++)
while (pimple.loop())
{
#include "UEqn.H"
// --- PISO loop
for (int corr=0; corr<pimple.nCorr(); corr++)
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}

View File

@ -14,13 +14,14 @@
adjustPhi(phiU, U, p_rgh);
phi = phiU +
(
mixture.surfaceTensionForce()
- ghf*fvc::snGrad(rho)
)*rAUf*mesh.magSf();
phi =
phiU
+ (
mixture.surfaceTensionForce()
- ghf*fvc::snGrad(rho)
)*rAUf*mesh.magSf();
for(int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix p_rghEqn
(
@ -29,12 +30,9 @@
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve
(
mesh.solver(p_rgh.select(pimple.finalInnerIter(corr, nonOrth)))
);
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi -= p_rghEqn.flux();
}

View File

@ -73,12 +73,12 @@ int main(int argc, char *argv[])
rho = mixture.rho();
// --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++)
while (pimple.loop())
{
#include "UEqn.H"
// --- PISO loop
for (int corr=0; corr<pimple.nCorr(); corr++)
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}

View File

@ -19,7 +19,7 @@
- ghf*fvc::snGrad(rho)
)*rAUf*mesh.magSf();
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix p_rghEqn
(
@ -28,12 +28,9 @@
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve
(
mesh.solver(p_rgh.select(pimple.finalInnerIter(corr, nonOrth)))
);
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi -= p_rghEqn.flux();
}