CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   solver tolerance in fvSolution (https://www.cfd-online.com/Forums/openfoam-solving/86368-solver-tolerance-fvsolution.html)

fisch March 21, 2011 07:31

solver tolerance in fvSolution
 
Hello,

i found a lot of posts in the forum where some solver tolerances within openFOAM are suggested as accurate. For example in the fvSolution file for solving the p-equation is "tolerance 1e-6", "1e-4" or "1e-8".
I wanted to figure out how this tolerance number is calculated to estimate a number for my simulations, but i can't get it out of the code:confused:. Is there any explanation what this residual number / norm means or which norm is taken from the residual vector!?

A little example would be very nice (for example in relative error if i would have only one cell ... or something else)

Thanks a lot.
rupert

bastil March 22, 2011 08:22

Well,

the relTol is the relative tolerance between the initial and the final residual. Both are reported by the solver:
GAMG: Solving for p, Initial residual = 0.0334352, Final residual = 0.000941545, No Iterations 17

if you specify a relTol of 0.1 the solver will stop iterating if the final residual falls below 0.1*0.0334352=0.00334352.
The absolute tolerance you refer to with "tolerance" in fvSolution is the value the Final residual need to fall below.

Regards Bastian

fisch March 22, 2011 08:43

Thanks for the reply Bastian,

but the question is still how the (total) residuum is calculated or what it means..
Do you know that?

alberto March 22, 2011 13:43

Please check here: http://www.cfd-online.com/Forums/ope...d-solvers.html

Google knows ;-)

fisch March 23, 2011 01:35

thank you alberto

amin_jalalian August 15, 2016 03:28

tolerance relTol question
 
Quote:

Originally Posted by bastil (Post 300525)
Well,

the relTol is the relative tolerance between the initial and the final residual. Both are reported by the solver:
GAMG: Solving for p, Initial residual = 0.0334352, Final residual = 0.000941545, No Iterations 17

if you specify a relTol of 0.1 the solver will stop iterating if the final residual falls below 0.1*0.0334352=0.00334352.
The absolute tolerance you refer to with "tolerance" in fvSolution is the value the Final residual need to fall below.

Regards Bastian


Thanks about this post, But I have 2 question.

1- O.F uses relTol or tolerance for stop iteration?
2- What is difference between tolerance in for example "U" and "UFinal"?

Thanks.

c.vasseur February 4, 2019 06:21

Quote:

1- O.F uses relTol or tolerance for stop iteration?
I think both of them are used. Both conditions have to be respected.
(as read in this article).

sfernaferna July 28, 2020 11:57

tolerance relTol question
 
Hi amin_jalalian, I'm a bit late, but a new user might appreciate the answer. About your second question, I believe UFinal is used for transient algorithms for the final iteration of each inner loop (inside the same timestep). Not 100% sure, though.


All times are GMT -4. The time now is 09:20.