Permalink
Browse files

interDyMFoam: Corrected handling of relative and absolute fluxes in c…

…orrectPhi
  • Loading branch information...
1 parent 34eb8a7 commit 638e9c8e27fc8c28044bad08f55f2dd42441137e Henry committed Nov 28, 2011
@@ -36,7 +36,7 @@
fvc::makeAbsolute(phi, U);
- while (pimple.correctNonOrthogonal())
+ for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++)
{
fvScalarMatrix pcorrEqn
(
@@ -46,7 +46,7 @@
pcorrEqn.setReference(pRefCell, pRefValue);
pcorrEqn.solve();
- if (pimple.finalNonOrthogonalIter())
+ if (nonOrth == pimple.nNonOrthCorr())
{
phi -= pcorrEqn.flux();
phiAbs = phi;
@@ -54,13 +54,13 @@ int main(int argc, char *argv[])
pimpleControl pimple(mesh);
+ surfaceScalarField phiAbs("phiAbs", phi);
+ fvc::makeAbsolute(phiAbs, U);
+
#include "correctPhi.H"
#include "CourantNo.H"
#include "setInitialDeltaT.H"
- surfaceScalarField phiAbs("phiAbs", phi);
- fvc::makeAbsolute(phiAbs, U);
-
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;

0 comments on commit 638e9c8

Please sign in to comment.