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

@ -114,12 +114,12 @@ int main(int argc, char *argv[])
#include "rhoEqn.H" #include "rhoEqn.H"
// --- Pressure-velocity PIMPLE corrector loop // --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++) while (pimple.loop())
{ {
#include "UEqn.H" #include "UEqn.H"
// --- PISO loop // --- Pressure corrector loop
for (int corr=1; corr<=pimple.nCorr(); corr++) while (pimple.correct())
{ {
#include "bEqn.H" #include "bEqn.H"
#include "ftEqn.H" #include "ftEqn.H"

View File

@ -167,13 +167,13 @@ int main(int argc, char *argv[])
#include "rhoEqn.H" #include "rhoEqn.H"
// --- Pressure-velocity PIMPLE corrector loop // --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++) while (pimple.loop())
{ {
#include "UEqn.H" #include "UEqn.H"
// --- PISO loop // --- Pressure corrector loop
for (int corr=1; corr<=pimple.nCorr(); corr++) while (pimple.correct())
{ {
#include "bEqn.H" #include "bEqn.H"
#include "ftEqn.H" #include "ftEqn.H"

View File

@ -15,7 +15,7 @@ if (pimple.transonic())
) )
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -24,12 +24,9 @@ if (pimple.transonic())
- fvm::laplacian(rho*invA, p) - fvm::laplacian(rho*invA, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi == pEqn.flux(); phi == pEqn.flux();
} }
@ -44,7 +41,7 @@ else
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -53,12 +50,9 @@ else
- fvm::laplacian(rho*invA, p) - fvm::laplacian(rho*invA, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi += pEqn.flux();
} }

View File

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

View File

@ -15,7 +15,7 @@ if (pimple.transonic())
) )
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -24,12 +24,9 @@ if (pimple.transonic())
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi == pEqn.flux(); phi == pEqn.flux();
} }
@ -44,7 +41,7 @@ else
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -53,12 +50,9 @@ else
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi += pEqn.flux();
} }

View File

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

View File

@ -83,14 +83,14 @@ int main(int argc, char *argv[])
#include "rhoEqn.H" #include "rhoEqn.H"
for (pimple.start(); pimple.loop(); pimple++) while (pimple.loop())
{ {
#include "UEqn.H" #include "UEqn.H"
#include "YEqn.H" #include "YEqn.H"
#include "hsEqn.H" #include "hsEqn.H"
// --- PISO loop // --- Pressure corrector loop
for (int corr=1; corr<=pimple.nCorr(); corr++) while (pimple.correct())
{ {
#include "pEqn.H" #include "pEqn.H"
} }

View File

@ -12,7 +12,7 @@ if (pimple.transonic())
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U)) *((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U))
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -23,12 +23,9 @@ if (pimple.transonic())
Sevap Sevap
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi == pEqn.flux(); phi == pEqn.flux();
} }
@ -39,7 +36,7 @@ else
phi = fvc::interpolate(rho) phi = fvc::interpolate(rho)
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U)); *((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U));
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -50,12 +47,9 @@ else
Sevap Sevap
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi += pEqn.flux();
} }

View File

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

View File

@ -15,7 +15,7 @@ if (pimple.transonic())
) )
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -26,12 +26,9 @@ if (pimple.transonic())
Sevap Sevap
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi == pEqn.flux(); phi == pEqn.flux();
} }
@ -46,7 +43,7 @@ else
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -57,14 +54,11 @@ else
Sevap Sevap
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi == pEqn.flux();
} }
} }
} }

View File

@ -97,7 +97,7 @@ int main(int argc, char *argv[])
#include "rhoEqn.H" #include "rhoEqn.H"
// --- Pressure-velocity PIMPLE corrector loop // --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++) while (pimple.loop())
{ {
#include "UEqn.H" #include "UEqn.H"
@ -111,8 +111,8 @@ int main(int argc, char *argv[])
hu == h; hu == h;
} }
// --- PISO loop // --- Pressure corrector loop
for (int corr=1; corr<=pimple.nCorr(); corr++) while (pimple.correct())
{ {
#include "pEqn.H" #include "pEqn.H"
} }

View File

@ -12,7 +12,7 @@ if (pimple.transonic())
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U)) *((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U))
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -21,12 +21,9 @@ if (pimple.transonic())
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi == pEqn.flux(); phi == pEqn.flux();
} }
@ -37,7 +34,7 @@ else
phi = fvc::interpolate(rho) phi = fvc::interpolate(rho)
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U)); *((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U));
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -46,12 +43,9 @@ else
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi += pEqn.flux();
} }

View File

@ -91,13 +91,13 @@ int main(int argc, char *argv[])
#include "rhoEqn.H" #include "rhoEqn.H"
// --- PIMPLE loop // --- PIMPLE loop
for (pimple.start(); pimple.loop(); pimple++) while (pimple.loop())
{ {
#include "UEqn.H" #include "UEqn.H"
#include "YhsEqn.H" #include "YhsEqn.H"
// --- PISO loop // --- Pressure corrector loop
for (int corr=1; corr<=pimple.nCorr(); corr++) while (pimple.correct())
{ {
#include "pEqn.H" #include "pEqn.H"
} }

View File

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

View File

@ -15,7 +15,7 @@ if (pimple.transonic())
) )
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -24,12 +24,9 @@ if (pimple.transonic())
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi == pEqn.flux(); phi == pEqn.flux();
} }
@ -44,7 +41,7 @@ else
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -53,12 +50,9 @@ else
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi += pEqn.flux();
} }

View File

@ -66,14 +66,14 @@ int main(int argc, char *argv[])
#include "rhoEqn.H" #include "rhoEqn.H"
for (pimple.start(); pimple.loop(); pimple++) while (pimple.loop())
{ {
#include "UEqn.H" #include "UEqn.H"
#include "YEqn.H" #include "YEqn.H"
#include "hsEqn.H" #include "hsEqn.H"
// --- PISO loop // --- Pressure corrector loop
for (int corr=0; corr<pimple.nCorr(); corr++) while (pimple.correct())
{ {
#include "pEqn.H" #include "pEqn.H"
} }

View File

@ -30,7 +30,7 @@
+ correction(fvm::ddt(psi, p) + fvm::div(phid, p)) + correction(fvm::ddt(psi, p) + fvm::div(phid, p))
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -38,12 +38,9 @@
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi += pEqn.flux();
} }
@ -64,7 +61,7 @@
+ fvc::div(phi) + fvc::div(phi)
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -72,12 +69,9 @@
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi += pEqn.flux();
} }

View File

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

View File

@ -5,7 +5,7 @@ rho.relax();
U = rAU*UEqn().H(); U = rAU*UEqn().H();
if (pimple.nCorr() <= 1) if (pimple.nCorrPIMPLE() <= 1)
{ {
UEqn.clear(); UEqn.clear();
} }
@ -22,7 +22,7 @@ if (pimple.transonic())
) )
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -31,12 +31,9 @@ if (pimple.transonic())
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi == pEqn.flux(); phi == pEqn.flux();
} }
@ -51,7 +48,7 @@ else
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
// Pressure corrector // Pressure corrector
fvScalarMatrix pEqn fvScalarMatrix pEqn
@ -61,12 +58,9 @@ else
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi += pEqn.flux();
} }

View File

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

View File

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

View File

@ -6,7 +6,7 @@ rho.relax();
volScalarField rAU(1.0/UEqn().A()); volScalarField rAU(1.0/UEqn().A());
U = rAU*UEqn().H(); U = rAU*UEqn().H();
if (pimple.nCorr() <= 1) if (pimple.nCorrPIMPLE() <= 1)
{ {
UEqn.clear(); UEqn.clear();
} }
@ -24,7 +24,7 @@ if (pimple.transonic())
); );
mrfZones.relativeFlux(fvc::interpolate(psi), phid); mrfZones.relativeFlux(fvc::interpolate(psi), phid);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -33,12 +33,9 @@ if (pimple.transonic())
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi == pEqn.flux(); phi == pEqn.flux();
} }
@ -54,7 +51,7 @@ else
); );
mrfZones.relativeFlux(fvc::interpolate(rho), phi); mrfZones.relativeFlux(fvc::interpolate(rho), phi);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
// Pressure corrector // Pressure corrector
fvScalarMatrix pEqn fvScalarMatrix pEqn
@ -64,12 +61,9 @@ else
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi += pEqn.flux();
} }

View File

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

View File

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

View File

@ -10,7 +10,7 @@
surfaceScalarField buoyancyPhi(rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf()); surfaceScalarField buoyancyPhi(rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf());
phi -= buoyancyPhi; phi -= buoyancyPhi;
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix p_rghEqn fvScalarMatrix p_rghEqn
( (
@ -19,12 +19,9 @@
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell)); p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
(
mesh.solver(p_rgh.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
// Calculate the conservative fluxes // Calculate the conservative fluxes
phi -= p_rghEqn.flux(); phi -= p_rghEqn.flux();

View File

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

View File

@ -25,7 +25,7 @@
+ fvc::div(phi) + fvc::div(phi)
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix p_rghEqn fvScalarMatrix p_rghEqn
( (
@ -33,12 +33,9 @@
- fvm::laplacian(rhorAUf, p_rgh) - fvm::laplacian(rhorAUf, p_rgh)
); );
p_rghEqn.solve p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
(
mesh.solver(p_rgh.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
// Calculate the conservative fluxes // Calculate the conservative fluxes
phi += p_rghEqn.flux(); phi += p_rghEqn.flux();

View File

@ -65,12 +65,12 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
// --- Pressure-velocity PIMPLE corrector loop // --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++) while (pimple.loop())
{ {
#include "UrelEqn.H" #include "UrelEqn.H"
// --- PISO loop // --- Pressure corrector loop
for (int corr=0; corr<pimple.nCorr(); corr++) while (pimple.correct())
{ {
#include "pEqn.H" #include "pEqn.H"
} }

View File

@ -1,7 +1,7 @@
volScalarField rAUrel(1.0/UrelEqn().A()); volScalarField rAUrel(1.0/UrelEqn().A());
Urel = rAUrel*UrelEqn().H(); Urel = rAUrel*UrelEqn().H();
if (pimple.nCorr() <= 1) if (pimple.nCorrPIMPLE() <= 1)
{ {
UrelEqn.clear(); UrelEqn.clear();
} }
@ -12,7 +12,7 @@ phi = (fvc::interpolate(Urel) & mesh.Sf())
adjustPhi(phi, Urel, p); adjustPhi(phi, Urel, p);
// Non-orthogonal pressure corrector loop // Non-orthogonal pressure corrector loop
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
// Pressure corrector // Pressure corrector
fvScalarMatrix pEqn fvScalarMatrix pEqn
@ -22,12 +22,9 @@ for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi -= pEqn.flux(); phi -= pEqn.flux();
} }

View File

@ -1,6 +1,6 @@
U = rAU*UEqn().H(); U = rAU*UEqn().H();
if (pimple.nCorr() <= 1) if (pimple.nCorrPIMPLE() <= 1)
{ {
UEqn.clear(); UEqn.clear();
} }
@ -11,7 +11,7 @@ phi = (fvc::interpolate(U) & mesh.Sf())
adjustPhi(phi, U, p); adjustPhi(phi, U, p);
// Non-orthogonal pressure corrector loop // Non-orthogonal pressure corrector loop
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
// Pressure corrector // Pressure corrector
fvScalarMatrix pEqn fvScalarMatrix pEqn
@ -21,12 +21,9 @@ for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi -= pEqn.flux(); phi -= pEqn.flux();
} }

View File

@ -50,7 +50,7 @@
pcorrTypes pcorrTypes
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pcorrEqn fvScalarMatrix pcorrEqn
( (
@ -60,7 +60,7 @@
pcorrEqn.setReference(pRefCell, pRefValue); pcorrEqn.setReference(pRefCell, pRefValue);
pcorrEqn.solve(); pcorrEqn.solve();
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi -= pcorrEqn.flux(); phi -= pcorrEqn.flux();
} }

View File

@ -1,6 +1,6 @@
U = rAU*UEqn().H(); U = rAU*UEqn().H();
if (pimple.nCorr() <= 1) if (pimple.nCorrPIMPLE() <= 1)
{ {
UEqn.clear(); UEqn.clear();
} }
@ -19,7 +19,7 @@ if (p.needReference())
fvc::makeAbsolute(phi, U); fvc::makeAbsolute(phi, U);
} }
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -28,12 +28,9 @@ for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi -= pEqn.flux(); phi -= pEqn.flux();
} }

View File

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

View File

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

View File

@ -58,7 +58,7 @@ int main(int argc, char *argv[])
#include "CourantNo.H" #include "CourantNo.H"
// --- Pressure-velocity PIMPLE corrector loop // --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++) while (pimple.loop())
{ {
surfaceScalarField phiv("phiv", phi/fvc::interpolate(h)); surfaceScalarField phiv("phiv", phi/fvc::interpolate(h));
@ -89,8 +89,8 @@ int main(int argc, char *argv[])
} }
} }
// --- PISO loop // --- Pressure corrector loop
for (int corr=0; corr<pimple.nCorr(); corr++) while (pimple.correct())
{ {
volScalarField rAU(1.0/hUEqn.A()); volScalarField rAU(1.0/hUEqn.A());
surfaceScalarField ghrAUf(magg*fvc::interpolate(h*rAU)); surfaceScalarField ghrAUf(magg*fvc::interpolate(h*rAU));
@ -110,7 +110,7 @@ int main(int argc, char *argv[])
+ fvc::ddtPhiCorr(rAU, h, hU, phi) + fvc::ddtPhiCorr(rAU, h, hU, phi)
- phih0; - phih0;
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix hEqn fvScalarMatrix hEqn
( (
@ -119,15 +119,9 @@ int main(int argc, char *argv[])
- fvm::laplacian(ghrAUf, h) - fvm::laplacian(ghrAUf, h)
); );
hEqn.solve hEqn.solve(mesh.solver(h.select(pimple.finalInnerIter())));
(
mesh.solver
(
h.select(pimple.finalInnerIter(corr, nonOrth))
)
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi += hEqn.flux(); phi += hEqn.flux();
} }

View File

@ -87,7 +87,7 @@ int main(int argc, char *argv[])
#include "rhoEqn.H" #include "rhoEqn.H"
// --- Pressure-velocity PIMPLE corrector loop // --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++) while (pimple.loop())
{ {
turbulence->correct(); turbulence->correct();
@ -95,8 +95,8 @@ int main(int argc, char *argv[])
#include "YEqn.H" #include "YEqn.H"
#include "hsEqn.H" #include "hsEqn.H"
// --- PISO loop // --- Pressure corrector loop
for (int corr=0; corr<pimple.nCorr(); corr++) while (pimple.correct())
{ {
#include "pEqn.H" #include "pEqn.H"
} }

View File

@ -32,7 +32,7 @@
+ massSource.SuTot() + massSource.SuTot()
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -40,12 +40,9 @@
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi += pEqn.flux();
} }

View File

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

View File

@ -15,7 +15,7 @@ if (pimple.transonic())
) )
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -26,12 +26,9 @@ if (pimple.transonic())
coalParcels.Srho() coalParcels.Srho()
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi == pEqn.flux(); phi == pEqn.flux();
} }
@ -46,7 +43,7 @@ else
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -57,12 +54,9 @@ else
coalParcels.Srho() coalParcels.Srho()
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi += pEqn.flux();
} }

View File

@ -32,7 +32,7 @@
+ massSource.SuTot() + massSource.SuTot()
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -40,12 +40,9 @@
- fvm::laplacian(rho*rAU, p) - fvm::laplacian(rho*rAU, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi += pEqn.flux();
} }

View File

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

View File

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

View File

@ -83,14 +83,14 @@ int main(int argc, char *argv[])
#include "rhoEqn.H" #include "rhoEqn.H"
// --- PIMPLE loop // --- PIMPLE loop
for (pimple.start(); pimple.loop(); pimple++) while (pimple.loop())
{ {
#include "UEqn.H" #include "UEqn.H"
#include "YEqn.H" #include "YEqn.H"
#include "hsEqn.H" #include "hsEqn.H"
// --- PISO loop // --- Pressure corrector loop
for (int corr=1; corr<=pimple.nCorr(); corr++) while (pimple.correct())
{ {
#include "pEqn.H" #include "pEqn.H"
} }

View File

@ -15,7 +15,7 @@ if (pimple.transonic())
) )
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -26,12 +26,9 @@ if (pimple.transonic())
parcels.Srho() parcels.Srho()
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi == pEqn.flux(); phi == pEqn.flux();
} }
@ -46,7 +43,7 @@ else
+ fvc::ddtPhiCorr(rAU, rho, U, phi) + fvc::ddtPhiCorr(rAU, rho, U, phi)
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -57,12 +54,9 @@ else
parcels.Srho() parcels.Srho()
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi += pEqn.flux(); phi += pEqn.flux();
} }

View File

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

View File

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

View File

@ -68,14 +68,14 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
// --- Pressure-velocity PIMPLE corrector loop // --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++) while (pimple.loop())
{ {
#include "alphaEqn.H" #include "alphaEqn.H"
#include "liftDragCoeffs.H" #include "liftDragCoeffs.H"
#include "UEqns.H" #include "UEqns.H"
// --- PISO loop // --- Pressure corrector loop
for (int corr=0; corr<pimple.nCorr(); corr++) while (pimple.correct())
{ {
#include "pEqn.H" #include "pEqn.H"

View File

@ -42,7 +42,7 @@
alphaf*rUaAf/rhoa + betaf*rUbAf/rhob alphaf*rUaAf/rhoa + betaf*rUbAf/rhob
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -51,12 +51,9 @@
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
surfaceScalarField SfGradp(pEqn.flux()/Dp); surfaceScalarField SfGradp(pEqn.flux()/Dp);

View File

@ -68,13 +68,15 @@ int main(int argc, char *argv[])
runTime++; runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
for (pimple.start(); pimple.loop(); pimple++) // --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{ {
#include "rhoEqn.H" #include "rhoEqn.H"
#include "gammaPsi.H" #include "gammaPsi.H"
#include "UEqn.H" #include "UEqn.H"
for (int corr=0; corr<pimple.nCorr(); corr++) // --- Pressure corrector loop
while (pimple.correct())
{ {
#include "pEqn.H" #include "pEqn.H"
} }

View File

@ -1,5 +1,5 @@
{ {
if (pimple.nOuterCorr() == 1) if (pimple.nCorrPIMPLE() == 1)
{ {
p = p =
( (
@ -26,7 +26,7 @@
#include "resetPhivPatches.H" #include "resetPhivPatches.H"
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -37,12 +37,9 @@
- fvm::laplacian(rAUf, p) - fvm::laplacian(rAUf, p)
); );
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phiv += (phiGradp + pEqn.flux())/rhof; phiv += (phiGradp + pEqn.flux())/rhof;
} }

View File

@ -30,7 +30,8 @@
#include "alphaEqns.H" #include "alphaEqns.H"
} }
if (pimple.corr() == 0) // correct interface on first PIMPLE corrector
if (pimple.corrPIMPLE() == 1)
{ {
interface.correct(); interface.correct();
} }

View File

@ -32,7 +32,8 @@
#include "alphaEqns.H" #include "alphaEqns.H"
} }
if (pimple.corr() == 0) // correct interface on first PIMPLE corrector
if (pimple.corrPIMPLE() == 1)
{ {
interface.correct(); interface.correct();
} }

View File

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

View File

@ -42,7 +42,7 @@
adjustPhi(phi, U, pcorr); adjustPhi(phi, U, pcorr);
for(int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pcorrEqn fvScalarMatrix pcorrEqn
( (
@ -51,7 +51,7 @@
pcorrEqn.solve(); pcorrEqn.solve();
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi -= pcorrEqn.flux(); phi -= pcorrEqn.flux();
} }

View File

@ -39,7 +39,7 @@
- ghf*fvc::snGrad(rho) - ghf*fvc::snGrad(rho)
)*rAUf*mesh.magSf(); )*rAUf*mesh.magSf();
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix p_rghEqnIncomp fvScalarMatrix p_rghEqnIncomp
( (
@ -55,10 +55,10 @@
) )
*p_rghEqnComp() *p_rghEqnComp()
+ p_rghEqnIncomp, + p_rghEqnIncomp,
mesh.solver(p_rgh.select(pimple.finalInnerIter(corr, nonOrth))) mesh.solver(p_rgh.select(pimple.finalInnerIter()))
); );
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
dgdt = dgdt =
(pos(alpha2)*(psi2/rho2) - pos(alpha1)*(psi1/rho1)) (pos(alpha2)*(psi2/rho2) - pos(alpha1)*(psi1/rho1))

View File

@ -4,7 +4,7 @@
label nAlphaSubCycles(readLabel(pimple.dict().lookup("nAlphaSubCycles"))); label nAlphaSubCycles(readLabel(pimple.dict().lookup("nAlphaSubCycles")));
if (nAlphaSubCycles > 1 && pimple.nOuterCorr() != 1) if (nAlphaSubCycles > 1 && pimple.nCorrPIMPLE() != 1)
{ {
FatalErrorIn(args.executable()) FatalErrorIn(args.executable())
<< "Sub-cycling alpha is only allowed for PISO, " << "Sub-cycling alpha is only allowed for PISO, "

View File

@ -74,8 +74,8 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
// --- Outer-corrector loop // --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++) while (pimple.loop())
{ {
#include "alphaEqnsSubCycle.H" #include "alphaEqnsSubCycle.H"
@ -83,8 +83,8 @@ int main(int argc, char *argv[])
#include "UEqn.H" #include "UEqn.H"
// --- PISO loop // --- Pressure corrector loop
for (int corr=0; corr<pimple.nCorr(); corr++) while (pimple.correct())
{ {
#include "pEqn.H" #include "pEqn.H"
} }

View File

@ -39,7 +39,7 @@
- ghf*fvc::snGrad(rho) - ghf*fvc::snGrad(rho)
)*rAUf*mesh.magSf(); )*rAUf*mesh.magSf();
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix p_rghEqnIncomp fvScalarMatrix p_rghEqnIncomp
( (
@ -55,10 +55,10 @@
) )
*p_rghEqnComp() *p_rghEqnComp()
+ p_rghEqnIncomp, + p_rghEqnIncomp,
mesh.solver(p_rgh.select(pimple.finalInnerIter(corr, nonOrth))) mesh.solver(p_rgh.select(pimple.finalInnerIter()))
); );
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
dgdt = dgdt =
(pos(alpha2)*(psi2/rho2) - pos(alpha1)*(psi1/rho1)) (pos(alpha2)*(psi2/rho2) - pos(alpha1)*(psi1/rho1))

View File

@ -1,19 +1,13 @@
#include "readTimeControls.H" #include "readTimeControls.H"
label nAlphaCorr label nAlphaCorr(readLabel(pimple.dict().lookup("nAlphaCorr")));
(
readLabel(pimple.dict().lookup("nAlphaCorr"))
);
label nAlphaSubCycles label nAlphaSubCycles(readLabel(pimple.dict().lookup("nAlphaSubCycles")));
(
readLabel(pimple.dict().lookup("nAlphaSubCycles"))
);
if (nAlphaSubCycles > 1 && pimple.nOuterCorr() != 1) if (nAlphaSubCycles > 1 && pimple.nCorrPIMPLE() != 1)
{ {
FatalErrorIn(args.executable()) FatalErrorIn(args.executable())
<< "Sub-cycling alpha is only allowed for PISO, " << "Sub-cycling alpha is only allowed for PISO operation, "
"i.e. when the number of outer-correctors = 1" "i.e. when the number of outer-correctors = 1"
<< exit(FatalError); << exit(FatalError);
} }

View File

@ -77,7 +77,7 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
// --- Pressure-velocity PIMPLE corrector loop // --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++) while (pimple.loop())
{ {
#include "alphaEqn.H" #include "alphaEqn.H"
#include "kEpsilon.H" #include "kEpsilon.H"
@ -85,8 +85,8 @@ int main(int argc, char *argv[])
#include "TEqns.H" #include "TEqns.H"
#include "UEqns.H" #include "UEqns.H"
// --- PISO loop // --- Pressure corrector loop
for (int corr=0; corr<pimple.nCorr(); corr++) while (pimple.correct())
{ {
#include "pEqn.H" #include "pEqn.H"
} }

View File

@ -69,7 +69,7 @@
+ alpha2f*rAlphaAU2f/fvc::interpolate(rho2)) + alpha2f*rAlphaAU2f/fvc::interpolate(rho2))
); );
for(int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqnIncomp fvScalarMatrix pEqnIncomp
( (
@ -82,12 +82,11 @@
( (
(alpha1/rho1)*pEqnComp1() (alpha1/rho1)*pEqnComp1()
+ (alpha2/rho2)*pEqnComp2() + (alpha2/rho2)*pEqnComp2()
) + )
pEqnIncomp, + pEqnIncomp,
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth))) mesh.solver(p.select(pimple.finalInnerIter())));
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
surfaceScalarField mSfGradp = pEqnIncomp.flux()/Dp; surfaceScalarField mSfGradp = pEqnIncomp.flux()/Dp;
phi1 += rAlphaAU1f*mSfGradp/fvc::interpolate(rho1); phi1 += rAlphaAU1f*mSfGradp/fvc::interpolate(rho1);

View File

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

View File

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

View File

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

View File

@ -34,7 +34,7 @@
adjustPhi(phi, U, pcorr); adjustPhi(phi, U, pcorr);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pcorrEqn fvScalarMatrix pcorrEqn
( (
@ -44,7 +44,7 @@
pcorrEqn.setReference(pRefCell, pRefValue); pcorrEqn.setReference(pRefCell, pRefValue);
pcorrEqn.solve(); pcorrEqn.solve();
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi -= pcorrEqn.flux(); phi -= pcorrEqn.flux();
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -7,7 +7,7 @@ surfaceScalarField rhoPhi
mesh mesh
), ),
mesh, mesh,
dimensionedScalar("0", dimensionSet(1, 0, -1, 0, 0), 0) dimensionedScalar("0", dimMass/dimTime, 0)
); );
{ {
@ -40,7 +40,7 @@ surfaceScalarField rhoPhi
#include "alphaEqn.H" #include "alphaEqn.H"
} }
if (pimple.nOuterCorr() == 1) if (pimple.nCorrPIMPLE() == 1)
{ {
interface.correct(); interface.correct();
} }

View File

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

View File

@ -13,8 +13,9 @@
adjustPhi(phiU, U, p_rgh); adjustPhi(phiU, U, p_rgh);
phi = phiU + phi =
( phiU
+ (
fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1) fvc::interpolate(interface.sigmaK())*fvc::snGrad(alpha1)
- ghf*fvc::snGrad(rho) - ghf*fvc::snGrad(rho)
)*rAUf*mesh.magSf(); )*rAUf*mesh.magSf();
@ -23,7 +24,7 @@
const volScalarField& vDotcP = vDotP[0](); const volScalarField& vDotcP = vDotP[0]();
const volScalarField& vDotvP = vDotP[1](); const volScalarField& vDotvP = vDotP[1]();
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix p_rghEqn fvScalarMatrix p_rghEqn
( (
@ -33,12 +34,9 @@
p_rghEqn.setReference(pRefCell, pRefValue); p_rghEqn.setReference(pRefCell, pRefValue);
p_rghEqn.solve p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
(
mesh.solver(p_rgh.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi += p_rghEqn.flux(); phi += p_rghEqn.flux();
} }

View File

@ -34,7 +34,7 @@
adjustPhi(phi, U, pcorr); adjustPhi(phi, U, pcorr);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pcorrEqn fvScalarMatrix pcorrEqn
( (
@ -44,7 +44,7 @@
pcorrEqn.setReference(pRefCell, pRefValue); pcorrEqn.setReference(pRefCell, pRefValue);
pcorrEqn.solve(); pcorrEqn.solve();
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
phi -= pcorrEqn.flux(); phi -= pcorrEqn.flux();
} }

View File

@ -75,7 +75,7 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
// --- Pressure-velocity PIMPLE corrector loop // --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++) while (pimple.loop())
{ {
sgsModel->correct(); sgsModel->correct();
fluid.solve(); fluid.solve();
@ -85,8 +85,8 @@ int main(int argc, char *argv[])
//#include "TEqns.H" //#include "TEqns.H"
#include "UEqns.H" #include "UEqns.H"
// --- PISO loop // --- Pressure corrector loop
for (int corr=0; corr<pimple.nCorr(); corr++) while (pimple.correct())
{ {
#include "pEqn.H" #include "pEqn.H"
} }

View File

@ -134,7 +134,7 @@
Dp = mag(Dp); Dp = mag(Dp);
adjustPhi(phi, U, p); adjustPhi(phi, U, p);
for(int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqnIncomp fvScalarMatrix pEqnIncomp
( (
@ -152,7 +152,7 @@
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth))) mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
); );
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
surfaceScalarField mSfGradp = pEqnIncomp.flux()/Dp; surfaceScalarField mSfGradp = pEqnIncomp.flux()/Dp;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -67,7 +67,7 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
// --- Pressure-velocity PIMPLE corrector loop // --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++) while (pimple.loop())
{ {
twoPhaseProperties.correct(); twoPhaseProperties.correct();
@ -75,8 +75,8 @@ int main(int argc, char *argv[])
#include "UEqn.H" #include "UEqn.H"
// --- PISO loop // --- Pressure corrector loop
for (int corr=0; corr<pimple.nCorr(); corr++) while (pimple.correct())
{ {
#include "pEqn.H" #include "pEqn.H"
} }

View File

@ -58,7 +58,7 @@
alphaf*rUaAf/rhoa + betaf*rUbAf/rhob alphaf*rUaAf/rhoa + betaf*rUbAf/rhob
); );
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) while (pimple.correctNonOrthogonal())
{ {
fvScalarMatrix pEqn fvScalarMatrix pEqn
( (
@ -67,12 +67,9 @@
pEqn.setReference(pRefCell, pRefValue); pEqn.setReference(pRefCell, pRefValue);
pEqn.solve pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
if (nonOrth == pimple.nNonOrthCorr()) if (pimple.finalNonOrthogonalIter())
{ {
surfaceScalarField SfGradp(pEqn.flux()/Dp); surfaceScalarField SfGradp(pEqn.flux()/Dp);

View File

@ -76,14 +76,14 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl; Info<< "Time = " << runTime.timeName() << nl << endl;
// --- Pressure-velocity PIMPLE corrector loop // --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++) while (pimple.loop())
{ {
#include "alphaEqn.H" #include "alphaEqn.H"
#include "liftDragCoeffs.H" #include "liftDragCoeffs.H"
#include "UEqns.H" #include "UEqns.H"
// --- PISO loop // --- Pressure corrector loop
for (int corr=0; corr<pimple.nCorr(); corr++) while (pimple.correct())
{ {
#include "pEqn.H" #include "pEqn.H"