CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

The new SIMPLE/PIMPLE loop control structure in OF 2.1

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 10, 2012, 09:23
Default The new SIMPLE/PIMPLE loop control structure in OF 2.1
  #1
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 176
Rep Power: 16
linch is on a distinguished road
Hi guys,

since OF 2.1 there is a new control structure for SIMPLE & PIMPLE loops. So now the outer PIMPLE loop looks just like:
Code:
while (pimple.loop())        {...}
I would like to know how to use it properly. I mean, how can one define convergence criteria for the outer iteration loop?

I tried to look into the pimpleControl.C and hier it is:
Code:
bool Foam::pimpleControl::loop()
00174 {
00175     read();
00176 
00177     corr_++;
00178 
00179     if (debug)
00180     {
00181         Info<< algorithmName_ << " loop: corr = " << corr_ << endl;
00182     }
00183 
00184     if (corr_ == nCorrPIMPLE_ + 1)
00185     {
00186         if ((!residualControl_.empty()) && (nCorrPIMPLE_ != 1))
00187         {
00188             Info<< algorithmName_ << ": not converged within "
00189                 << nCorrPIMPLE_ << " iterations" << endl;
00190         }
00191 
00192         corr_ = 0;
00193         mesh_.data::remove("finalIteration");
00194         return false;
00195     }
00196 
00197     bool completed = false;
00198     if (converged_ || criteriaSatisfied())
00199     {
00200         if (converged_)
00201         {
00202             Info<< algorithmName_ << ": converged in " << corr_ - 1
00203                 << " iterations" << endl;
00204 
00205             mesh_.data::remove("finalIteration");
00206             corr_ = 0;
00207             converged_ = false;
00208 
00209             completed = true;
00210         }
00211         else
00212         {
00213             Info<< algorithmName_ << ": iteration " << corr_ << endl;
00214             storePrevIterFields();
00215 
00216             mesh_.data::add("finalIteration", true);
00217             converged_ = true;
00218         }
00219     }
00220     else
00221     {
00222         if (finalIter())
00223         {
00224             mesh_.data::add("finalIteration", true);
00225         }
00226 
00227         if (corr_ <= nCorrPIMPLE_)
00228         {
00229             if (nCorrPIMPLE_ != 1)
00230             {
00231                 Info<< algorithmName_ << ": iteration " << corr_ << endl;
00232                 storePrevIterFields();
00233             }
00234 
00235             completed = false;
00236         }
00237     }
00238 
00239     return !completed;
00240 }
the first check is done to see if the maximum number of iterations is exceeded
Code:
if (corr_ == nCorrPIMPLE_ + 1)
if so,
Code:
mesh_.data::remove("finalIteration");
what does it mean?

Then convergence is checked
Code:
if (converged_ || criteriaSatisfied())
my question here is, why are there two different indicators of convergence "converged_" and "criteriaSatisfied()"? Where can one provide the criteria to be satisfied? I also looked on the bool Foam:impleControl::criteriaSatisfied(), but it also wasn't easy to understand, what is being done there.

I would really appreciate, if someone takes some time and explains it for such noobs as me.

Best regards,
Illya
linch is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems of running Oscillating plate tutorial vovogoal CFX 20 February 4, 2016 07:03
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 02:09
error in two way fsi kmgraju CFX 1 May 2, 2011 02:32
[CAD formats] my stl surface is seen as just a line rcastilla OpenFOAM Meshing & Mesh Conversion 2 January 6, 2010 01:30
NACA0012 geometry/design software needed Franny Main CFD Forum 13 July 7, 2007 15:57


All times are GMT -4. The time now is 10:45.