2016-12-09 13:35 GMT

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000371OpenFOAM[All Projects] Bugpublic2011-12-23 09:25
Reporteralbertop 
Assigned Touser2 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Platformx86_64OSopenSUSEOS Version12.1
Product Version 
Target VersionFixed in Version 
Summary0000371: Incorrect behaviour of PIMPLE loop in unsteady simulations
DescriptionPIMPLE solvers seem to have an incorrect behaviour when the residualControl feature is used:

- The solver correctly performs the number of PIMPLE correctors if the solution does *not* converge.
- When the solution converges, the PIMPLE iteration is interrupted, the time is advanced, but the number of PIMPLE iterations is not re-initialized.

Steps To ReproduceRun, for example, the tutorial "angledDuct" for rhoPimpleFoam. Observe what happens at the time steps from Time = 6 to Time = 10.

- The solution converges in 45 iterations (50 is the maximum allowed) at Time = 6. The loop is interrupted, and time advanced (correct behavior).

- The new time-step starts (Time = 7), but the code states "PIMPLE: iteration 46", then it performs one iteration, and it states the solution converged in 47 iterations.

- The time is advanced again (Time = 8), and the code states "PIMPLE: iteration 48", it does one iteration, and states "PIMPLE: converged in 49 iterations".

- Same behaviour at Time = 9, but the solution does not converge "in 50 iterations". At this point, Time is increased again, and PIMPLE iterations start from zero for the new time-step.

See attached log for the output of the solver.


Additional InformationIf my understanding is correct, the expected behavior should be that at the end of the time-step, if the solution is converged, the number of PIMPLE iterations is reset to zero, so that 50 iterations are allowed for the new time-step.

The current behaviour leads to incorrect results in transient simulations.
TagsNo tags attached.
Attached Files
  • log file icon output.log (8,340 bytes) 2011-12-22 22:59
  • patch file icon pimpleControl.C.patch (343 bytes) 2011-12-23 00:06 -
    *** pimpleControlOld.C	2011-12-23 00:57:19.000000000 +0100
    --- pimpleControl.C	2011-12-23 01:01:53.332168358 +0100
    ***************
    *** 199,204 ****
    --- 199,205 ----
              Info<< algorithmName_ << ": converged in " << corr_ << " iterations"
                  << endl;
              completed = true;
    +         corr_ = 0;
          }
          else
          {
    
    patch file icon pimpleControl.C.patch (343 bytes) 2011-12-23 00:06 +

-Relationships
+Relationships

-Notes

~0000865

albertop (reporter)

I attach a proposed patch, where corr_ is reset to zero in pimpleControl.C, if convergence criteria are satisfied:

00197 if (criteriaSatisfied())
00198 {
00199 Info<< algorithmName_ << ": converged in " << corr_ << " iterations"
00200 << endl;
00201 completed = true;
              corr_ = 0; // Added code
00202 }

~0000866

user2

Thanks for the report - bug corrected in commit:

    a22b8fd6d4d3607b5d8a4f00776997ba59b0f4c7
+Notes

-Issue History
Date Modified Username Field Change
2011-12-22 22:59 albertop New Issue
2011-12-22 22:59 albertop File Added: output.log
2011-12-23 00:05 albertop Note Added: 0000865
2011-12-23 00:06 albertop File Added: pimpleControl.C.patch
2011-12-23 09:25 user2 Note Added: 0000866
2011-12-23 09:25 user2 Status new => resolved
2011-12-23 09:25 user2 Fixed in Version => 2.1.x
2011-12-23 09:25 user2 Resolution open => fixed
2011-12-23 09:25 user2 Assigned To => user2
+Issue History