CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Stopping criterion for outer iteration loop

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 15, 2017, 17:01
Default Stopping criterion for outer iteration loop
  #1
New Member
 
Join Date: Jul 2011
Posts: 6
Rep Power: 14
luftraudi is on a distinguished road
Hey,

I am working on an implicit pressure based finite volume solver for incompressible and compressible flows. The momentum and continuity equations were solved segregated.

At present the stopping criterion for the outer iteration loop (solution of momentum equations + pressure correction) depends on the maximum difference of the flow field from one iteration to another. Hence, the definition of the stopping criterion depends on the magnitude of the flow quantities and is very case specific.

Now, I am going to revise the code and change the stopping criterion. I am planning to use instead a relative quantity to obtain a criterion that is less case specific. Precisely, I am planning to compute difference between to iterations and relate it to the value at the last iteration. Then the maximum (absolute) value is compared with the (user) defined stopping criterion.

What do you think? Is this proper definition of the stopping criterion for the outer iteration loop or do I need to use another one?

Thanks in advance!

With best regards,
Michel
luftraudi is offline   Reply With Quote

Old   February 15, 2017, 18:25
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Why do not use the residual of each equation?
FMDenaro is offline   Reply With Quote

Old   February 16, 2017, 05:04
Default
  #3
New Member
 
Join Date: Jul 2011
Posts: 6
Rep Power: 14
luftraudi is on a distinguished road
Hey,

this is a good idea, thank you.

At the moment, it will increase the computational cost since I have to recompute the complete coefficient matrix and source termfor each momentum equation at the end of one outer iteration. If the code has to do another outer iteration, the complete coefficient matrix and source term has to be recomputed again since each equation uses the same arrays to store the linear equation system.

I will now introduce new arrays to store the linear equation system for each momentum equation. Hence, I do not need to recompute it again at the beginning of a new outer iteration. This will increase the memory consumption but only slightly increase the computational cost.
luftraudi is offline   Reply With Quote

Old   February 22, 2017, 08:59
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,667
Rep Power: 65
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Usually you are not doing matrix inversion (very expensive) but some type of system solver. You need a metric to determine whether you've solved the system or not at the inner iterations, so these residual matrices should already have been computed. Numerically you don't just say "solve this system" because you cannot numerically solve it exactly. You always say "solve this system, within this tolerance" and that tolerance is the residual. So you should have been doing these checks at the inner iteration level.

At the outer iteration, you should do one final update and re-calculate your residuals. Usually at the start of a calculation you calculate the residuals to determine whether the system needs to be solved or not and only solve it if needed.

I mean it's not extra memory or computation if you consider it a common best practice.
LuckyTran is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Pressure distribution on a wall darazsbence CFX 17 October 6, 2015 10:38
[Gmsh] Problem with Gmsh nishant_hull OpenFOAM Meshing & Mesh Conversion 23 August 5, 2015 02:09
Asymptotic stopping criterion is not working rob50904 STAR-CCM+ 2 January 28, 2013 08:25
NACA0012 geometry/design software needed Franny Main CFD Forum 13 July 7, 2007 15:57
Creating, loop or iteration using expression edito Jan CFX 3 July 28, 2003 11:01


All times are GMT -4. The time now is 22:07.