Commit d05c5a41 authored by andy's avatar andy
Browse files

ENH: Updated PIMPLE solvers to new pimpleControl framework

parent 4c635909
......@@ -114,12 +114,12 @@ int main(int argc, char *argv[])
#include "rhoEqn.H"
// --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++)
while (pimple.loop())
{
#include "UEqn.H"
// --- PISO loop
for (int corr=1; corr<=pimple.nCorr(); corr++)
// --- Pressure corrector loop
while (pimple.correct())
{
#include "bEqn.H"
#include "ftEqn.H"
......
......@@ -167,13 +167,13 @@ int main(int argc, char *argv[])
#include "rhoEqn.H"
// --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++)
while (pimple.loop())
{
#include "UEqn.H"
// --- PISO loop
for (int corr=1; corr<=pimple.nCorr(); corr++)
// --- Pressure corrector loop
while (pimple.correct())
{
#include "bEqn.H"
#include "ftEqn.H"
......
......@@ -15,7 +15,7 @@ if (pimple.transonic())
)
);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
......@@ -24,12 +24,9 @@ if (pimple.transonic())
- fvm::laplacian(rho*invA, p)
);
pEqn.solve
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi == pEqn.flux();
}
......@@ -44,7 +41,7 @@ else
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
......@@ -53,12 +50,9 @@ else
- fvm::laplacian(rho*invA, p)
);
pEqn.solve
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi += pEqn.flux();
}
......
......@@ -91,7 +91,7 @@ int main(int argc, char *argv[])
#include "rhoEqn.H"
// --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++)
while (pimple.loop())
{
#include "UEqn.H"
......@@ -105,8 +105,8 @@ int main(int argc, char *argv[])
hu == h;
}
// --- PISO loop
for (int corr=0; corr<pimple.nCorr(); corr++)
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
......
......@@ -15,7 +15,7 @@ if (pimple.transonic())
)
);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
......@@ -24,12 +24,9 @@ if (pimple.transonic())
- fvm::laplacian(rho*rAU, p)
);
pEqn.solve
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi == pEqn.flux();
}
......@@ -44,7 +41,7 @@ else
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
......@@ -53,12 +50,9 @@ else
- fvm::laplacian(rho*rAU, p)
);
pEqn.solve
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi += pEqn.flux();
}
......
......@@ -74,12 +74,12 @@ int main(int argc, char *argv[])
#include "rhoEqn.H"
// --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++)
while (pimple.loop())
{
#include "UEqn.H"
// --- PISO loop
for (int corr=1; corr<=pimple.nCorr(); corr++)
// --- Pressure corrector loop
while (pimple.correct())
{
#include "hEqn.H"
#include "pEqn.H"
......
......@@ -83,14 +83,14 @@ int main(int argc, char *argv[])
#include "rhoEqn.H"
for (pimple.start(); pimple.loop(); pimple++)
while (pimple.loop())
{
#include "UEqn.H"
#include "YEqn.H"
#include "hsEqn.H"
// --- PISO loop
for (int corr=1; corr<=pimple.nCorr(); corr++)
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
......
......@@ -12,7 +12,7 @@ if (pimple.transonic())
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U))
);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
......@@ -23,12 +23,9 @@ if (pimple.transonic())
Sevap
);
pEqn.solve
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi == pEqn.flux();
}
......@@ -39,7 +36,7 @@ else
phi = fvc::interpolate(rho)
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U));
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
......@@ -50,12 +47,9 @@ else
Sevap
);
pEqn.solve
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi += pEqn.flux();
}
......
......@@ -80,14 +80,14 @@ int main(int argc, char *argv[])
#include "rhoEqn.H"
// --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++)
while (pimple.loop())
{
#include "UEqn.H"
#include "YEqn.H"
#include "hsEqn.H"
// --- PISO loop
for (int corr=0; corr<pimple.nCorr(); corr++)
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
......
......@@ -15,7 +15,7 @@ if (pimple.transonic())
)
);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
......@@ -26,12 +26,9 @@ if (pimple.transonic())
Sevap
);
pEqn.solve
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi == pEqn.flux();
}
......@@ -46,7 +43,7 @@ else
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
......@@ -57,14 +54,11 @@ else
Sevap
);
pEqn.solve
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi += pEqn.flux();
phi == pEqn.flux();
}
}
}
......
......@@ -97,7 +97,7 @@ int main(int argc, char *argv[])
#include "rhoEqn.H"
// --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++)
while (pimple.loop())
{
#include "UEqn.H"
......@@ -111,8 +111,8 @@ int main(int argc, char *argv[])
hu == h;
}
// --- PISO loop
for (int corr=1; corr<=pimple.nCorr(); corr++)
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
......
......@@ -12,7 +12,7 @@ if (pimple.transonic())
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U))
);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
......@@ -21,12 +21,9 @@ if (pimple.transonic())
- fvm::laplacian(rho*rAU, p)
);
pEqn.solve
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi == pEqn.flux();
}
......@@ -37,7 +34,7 @@ else
phi = fvc::interpolate(rho)
*((fvc::interpolate(U) & mesh.Sf()) - fvc::meshPhi(rho, U));
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
......@@ -46,12 +43,9 @@ else
- fvm::laplacian(rho*rAU, p)
);
pEqn.solve
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi += pEqn.flux();
}
......
......@@ -91,13 +91,13 @@ int main(int argc, char *argv[])
#include "rhoEqn.H"
// --- PIMPLE loop
for (pimple.start(); pimple.loop(); pimple++)
while (pimple.loop())
{
#include "UEqn.H"
#include "YhsEqn.H"
// --- PISO loop
for (int corr=1; corr<=pimple.nCorr(); corr++)
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
......
......@@ -15,7 +15,7 @@ surfaceScalarField phiU
phi = phiU - rhorAUf*ghf*fvc::snGrad(rho)*mesh.magSf();
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix p_rghEqn
(
......@@ -28,12 +28,9 @@ for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
+ surfaceFilm.Srho()
);
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();
}
......
......@@ -15,7 +15,7 @@ if (pimple.transonic())
)
);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
......@@ -24,12 +24,9 @@ if (pimple.transonic())
- fvm::laplacian(rho*rAU, p)
);
pEqn.solve
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi == pEqn.flux();
}
......@@ -44,7 +41,7 @@ else
+ fvc::ddtPhiCorr(rAU, rho, U, phi)
);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
......@@ -53,12 +50,9 @@ else
- fvm::laplacian(rho*rAU, p)
);
pEqn.solve
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi += pEqn.flux();
}
......
......@@ -66,14 +66,14 @@ int main(int argc, char *argv[])
#include "rhoEqn.H"
for (pimple.start(); pimple.loop(); pimple++)
while (pimple.loop())
{
#include "UEqn.H"
#include "YEqn.H"
#include "hsEqn.H"
// --- PISO loop
for (int corr=0; corr<pimple.nCorr(); corr++)
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
......
......@@ -30,7 +30,7 @@
+ correction(fvm::ddt(psi, p) + fvm::div(phid, p))
);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
......@@ -38,12 +38,9 @@
- fvm::laplacian(rho*rAU, p)
);
pEqn.solve
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi += pEqn.flux();
}
......@@ -64,7 +61,7 @@
+ fvc::div(phi)
);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
......@@ -72,12 +69,9 @@
- fvm::laplacian(rho*rAU, p)
);
pEqn.solve
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi += pEqn.flux();
}
......
......@@ -68,14 +68,14 @@ int main(int argc, char *argv[])
#include "rhoEqn.H"
// --- Pressure-velocity PIMPLE corrector loop
for (pimple.start(); pimple.loop(); pimple++)
while (pimple.loop())
{
#include "UEqn.H"
#include "YEqn.H"
#include "hsEqn.H"
// --- PISO loop
for (int corr=1; corr<=pimple.nCorr(); corr++)
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
......
......@@ -5,7 +5,7 @@ rho.relax();
U = rAU*UEqn().H();
if (pimple.nCorr() <= 1)
if (pimple.nCorrPIMPLE() <= 1)
{
UEqn.clear();
}
......@@ -22,7 +22,7 @@ if (pimple.transonic())
)
);
for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix pEqn
(
......@@ -31,12 +31,9 @@ if (pimple.transonic())
- fvm::laplacian(rho*rAU, p)
);
pEqn.solve
(
mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth)))
);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (nonOrth == pimple.nNonOrthCorr())
if (pimple.finalNonOrthogonalIter())
{
phi == pEqn.flux();
}
......@@ -51,7 +48,7 @@ else