mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: Updated PIMPLE solvers to new pimpleControl framework
This commit is contained in:
@ -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"
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -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"
|
||||
}
|
||||
|
||||
@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user