|
[Sponsors] |
The new SIMPLE/PIMPLE loop control structure in OF 2.1 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 10, 2012, 10:23 |
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: 17 |
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 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 } Code:
if (corr_ == nCorrPIMPLE_ + 1) Code:
mesh_.data::remove("finalIteration"); Then convergence is checked Code:
if (converged_ || criteriaSatisfied()) I would really appreciate, if someone takes some time and explains it for such noobs as me. Best regards, Illya |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problems of running Oscillating plate tutorial | vovogoal | CFX | 20 | February 4, 2016 08:03 |
[Gmsh] Problem with Gmsh | nishant_hull | OpenFOAM Meshing & Mesh Conversion | 23 | August 5, 2015 03:09 |
error in two way fsi | kmgraju | CFX | 1 | May 2, 2011 03:32 |
[CAD formats] my stl surface is seen as just a line | rcastilla | OpenFOAM Meshing & Mesh Conversion | 2 | January 6, 2010 02:30 |
NACA0012 geometry/design software needed | Franny | Main CFD Forum | 13 | July 7, 2007 16:57 |