View Issue Details
ID  Project  Category  View Status  Date Submitted  Last Update 

0000371  OpenFOAM  [All Projects] Bug  public  20111222 22:59  20111223 09:25 
Reporter  albertop  Assigned To  user2  
Priority  normal  Severity  major  Reproducibility  always 
Status  resolved  Resolution  fixed  
Platform  x86_64  OS  openSUSE  OS Version  12.1 
Product Version  
Fixed in Version  
Summary  0000371: Incorrect behaviour of PIMPLE loop in unsteady simulations  
Description  PIMPLE 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 reinitialized.  
Steps To Reproduce  Run, 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 timestep 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 timestep. See attached log for the output of the solver.  
Additional Information  If my understanding is correct, the expected behavior should be that at the end of the timestep, if the solution is converged, the number of PIMPLE iterations is reset to zero, so that 50 iterations are allowed for the new timestep. The current behaviour leads to incorrect results in transient simulations.  
Tags  No tags attached.  

output.log (8,340 bytes) 

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 } 

pimpleControl.C.patch (343 bytes)
*** pimpleControlOld.C 20111223 00:57:19.000000000 +0100  pimpleControl.C 20111223 01:01:53.332168358 +0100 *************** *** 199,204 ****  199,205  Info<< algorithmName_ << ": converged in " << corr_ << " iterations" << endl; completed = true; + corr_ = 0; } else { 

Thanks for the report  bug corrected in commit: a22b8fd6d4d3607b5d8a4f00776997ba59b0f4c7 
Date Modified  Username  Field  Change 

20111222 22:59  albertop  New Issue  
20111222 22:59  albertop  File Added: output.log  
20111223 00:05  albertop  Note Added: 0000865  
20111223 00:06  albertop  File Added: pimpleControl.C.patch  
20111223 09:25 

Note Added: 0000866  
20111223 09:25 

Status  new => resolved 
20111223 09:25 

Fixed in Version  => 2.1.x 
20111223 09:25 

Resolution  open => fixed 
20111223 09:25 

Assigned To  => user2 