CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Running, Solving & CFD

Questions about fvsolution, Why OF set relTol to control convergence?

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

Like Tree2Likes
  • 1 Post By chpjz0391
  • 1 Post By Zbynek

LinkBack Thread Tools Display Modes
Old   March 14, 2016, 05:31
Smile Questions about fvsolution, Why OF set relTol to control convergence?
Ping Chang
Join Date: Feb 2016
Location: Perth
Posts: 92
Rep Power: 3
chpjz0391 is on a distinguished road
Hi everyone,
I am a newer to OF, I am confusing that why OF set relTol to control convergence .In fvsolution, tolerance is already exist to control the convergence of the equation.

And I found the value of reTol are varies in many cases. Could someone tell me the reason of this?

Thanks a lot.
adrieno likes this.
chpjz0391 is offline   Reply With Quote

Old   May 10, 2016, 03:51
Join Date: Mar 2016
Location: Bordeaux
Posts: 91
Rep Power: 3
adrieno is on a distinguished road
Good question (I was wondering exactly the same )
any reply ?
adrieno is offline   Reply With Quote

Old   May 10, 2016, 04:50
New Member
Nene Lee
Join Date: Mar 2015
Location: Jinan, China
Posts: 2
Rep Power: 0
Nene Lee is on a distinguished road
Firstly, the 'relTol' entry is as an aternative method to control the solving of linear algebraic equations. To avoid the tolerance getting too small, even under the VSMALL, the 'relTol' is used.
Nene Lee is offline   Reply With Quote

Old   May 10, 2016, 09:21
Senior Member
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 271
Rep Power: 11
anishtain4 is on a distinguished road
As the documents says:

Before solving an equation for a particular field, the initial residual is evaluated based on the current values of the field. After each solver iteration the residual is re-evaluated. The solver stops if either of the following conditions are reached:

the residual falls below the solver tolerance, tolerance;
the ratio of current to initial residuals falls below the solver relative tolerance, relTol;
the number of iterations exceeds a maximum number of iterations, maxIter;
The solver tolerance should represent the level at which the residual is small enough that the solution can be deemed sufficiently accurate. The solver relative tolerance limits the relative improvement from initial to final solution. In transient simulations, it is usual to set the solver relative tolerance to 0 to force the solution to converge to the solver tolerance in each time step. The tolerances, tolerance and relTol must be specified in the dictionaries for all solvers; maxIter is optional.
anishtain4 is offline   Reply With Quote

Old   July 2, 2016, 06:23
New Member
Amelie Rohlfs
Join Date: Jan 2013
Posts: 19
Rep Power: 6
AmRo is on a distinguished road

are there reasons why I would want to control the difference between the initial and the final residual with relTol?
Are there any disadvantages when the step from initial to final is very big?

Greetings, Amelie
AmRo is offline   Reply With Quote

Old   July 3, 2016, 12:54
Join Date: Jun 2016
Posts: 63
Rep Power: 4
Zbynek is on a distinguished road
Simply because you do not need to push convergence to an absolute tolerance value during each inner iteration loop. Consider a transient simulation with several outer iteration loops in each time step. Inside the inner iteration loop, you perform several iterations (aka sweeps) and achieve an absolute tolerance, let's say 10e-6. You finish the outer loop and recalculate the coefficient matrix to start another outer loop. Now again you have to iterate till the absolute tolerance achieves 10e-6. This is, however, usually not necessary to do in every single loop since it may take a lot of iterations to achieve the absolute tolerance. The subsequent update of the coefficient matrix increases the residual value significantly anyway (initial residual) and kind of "ruins" the efforts to push the tolerance that low. Therefore, you are just happy to push the residual down by a factor, let's say, 0.01 (=relTol), and go to the next outer loop. In OF, you usually set the relative tolerance to 0 in the last outer iteration loop of the time step (UFinal, pFinal and so on), which means that you enforce the absolute residual only at the end of the time step. To sum it up, it is convenient to use relTol to avoid superfluous iterations and so to save some computational time.
adrieno likes this.
Zbynek is offline   Reply With Quote

Old   July 4, 2016, 03:54
New Member
Amelie Rohlfs
Join Date: Jan 2013
Posts: 19
Rep Power: 6
AmRo is on a distinguished road
Thank you for that explanation, I got it
AmRo is offline   Reply With Quote


Thread Tools
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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
control convergence criteria? hamidciv CFX 18 October 22, 2015 02:18
determining displacement for added points CFDnewbie147 OpenFOAM Native Meshers: snappyHexMesh and Others 1 October 22, 2013 09:53
Questions for a species transport problems (snapshots attached) aleisia FLUENT 2 October 9, 2011 04:40
Help with GNUPlot Renato. Main CFD Forum 6 June 6, 2007 19:51
2 Fundamental CFD Questions regarding convergence Jon Main CFD Forum 0 September 24, 2005 20:47

All times are GMT -4. The time now is 23:30.