mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
ENH: Updated SIMPLE solvers to new simpleControl framework
This commit is contained in:
@ -120,7 +120,7 @@ int main(int argc, char *argv[])
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
@ -130,7 +130,7 @@ int main(int argc, char *argv[])
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == simple.nNonOrthCorr())
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
@ -181,7 +181,7 @@ int main(int argc, char *argv[])
|
||||
adjustPhi(phia, Ua, pa);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix paEqn
|
||||
(
|
||||
@ -191,7 +191,7 @@ int main(int argc, char *argv[])
|
||||
paEqn.setReference(paRefCell, paRefValue);
|
||||
paEqn.solve();
|
||||
|
||||
if (nonOrth == simple.nNonOrthCorr())
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phia -= paEqn.flux();
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
@ -20,7 +20,7 @@
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == simple.nNonOrthCorr())
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
adjustPhi(phi, Urel, p);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == simple.nNonOrthCorr())
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
pEqn.solve();
|
||||
|
||||
if (nonOrth == simple.nNonOrthCorr())
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@ UEqn.clear();
|
||||
phi = fvc::interpolate(U) & mesh.Sf();
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
|
||||
while (simple.correctNonOrthogonal())
|
||||
{
|
||||
tmp<fvScalarMatrix> tpEqn;
|
||||
|
||||
@ -25,17 +25,10 @@ for (int nonOrth=0; nonOrth<=simple.nNonOrthCorr(); nonOrth++)
|
||||
}
|
||||
|
||||
tpEqn().setReference(pRefCell, pRefValue);
|
||||
// retain the residual from the first iteration
|
||||
if (nonOrth == 0)
|
||||
{
|
||||
tpEqn().solve();
|
||||
}
|
||||
else
|
||||
{
|
||||
tpEqn().solve();
|
||||
}
|
||||
|
||||
if (nonOrth == simple.nNonOrthCorr())
|
||||
tpEqn().solve();
|
||||
|
||||
if (simple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= tpEqn().flux();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user