View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000371OpenFOAM[All Projects] Bugpublic2011-12-22 22:592011-12-23 09:25
Reporteralbertop 
Assigned Toandy 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Platformx86_64OSopenSUSEOS Version12.1
Product Version2.1.x 
Target VersionFixed in Version2.1.x 
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 Fileslog 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 [Show Content]

- Relationships

-  Notes
(0000865)
albertop (reporter)
2011-12-23 00:05

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)
andy (manager)
2011-12-23 09:25

Thanks for the report - bug corrected in commit:

    a22b8fd6d4d3607b5d8a4f00776997ba59b0f4c7

- 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 andy Note Added: 0000866
2011-12-23 09:25 andy Status new => resolved
2011-12-23 09:25 andy Fixed in Version => 2.1.x
2011-12-23 09:25 andy Resolution open => fixed
2011-12-23 09:25 andy Assigned To => andy