CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Convergence requirements for residual (https://www.cfd-online.com/Forums/main/140395-convergence-requirements-residual.html)

Anna Tian August 14, 2014 02:57

Convergence requirements for residual
 
When we read the tutorials of commercial CFD software, we see that they always give the convergence residual criteria of quite low value. For example, CFX gives 10^(-5) for industrial application and 10^(-6) for scientific application and tells that some people use 10^(-4). Numeca and Fluent tutorials tell almost the same criteria. But theoretically, that’s too crucial requirements, right? Theoretically, when residual converges to 10^(-2) then the solution residual independence is already about 1% which is always much smaller than the discretization error and turbulence modeling error. From my experience, residual independence (at least for pressure) is always reached at 10^(-3), sometimes even at 10^(-2).

Could anyone tell me why typically people and commercial software use crucial 10^(-4) or even 10^(-5) as the residual criteria?

flotus1 August 14, 2014 05:12

A residual value of 1e-2 only means that the solution changed for 1% compared to the last iteration. Running another 100 iterations that accumulate this error, the result will be way off.

NEVER say that your solution converged by looking at a residual plot alone.

FMDenaro August 14, 2014 05:34

The issue is quite complex, requires some theoretical view...

Consider for example a simple linear algebric system A*x = q. If you start with an initial guess x0 you have

A*x0 - q = r0

then at the iteration n you have

A*xn - q = rn

and you would check in some vector norm on the residual vector rn if it satisfies some constraint. But you can see that we search for the exact vector x while we have actually xn. Therefore, the real error vector is

en =x -xn

that is unknown!
But you can easily see that

A* (x-xn) = -rn -> en = -A^-1*rn

Therefore, the error en is comparable to the norm of rn only if ||A^-1|| <=1. This requires special norm but I can tell that often it is not.

As a practical rule, use the r0 vector to normalze the residual rn

Ford Prefect August 14, 2014 06:06

Hey,

1. There are many ways to define the residual and there is no best, catch-all way to define it. However, as a general rule of thumb what FMDenaro said is a good place to start.

2. If you are using commercial software then going with the recommendations of the company is usually preferred. However, it should be noted that most commercial software are huge today and they are ever changing. This means that the manuals might not be as useful.

3. Testing and making both a mesh sensitivity study together with a residual study might prove to give the most confidence in your results. Looking at the behavior of some key variable together with the residuals is always good.

4. If the question is of a more general nature then my suggestion is to write a simple Matlab test case and "play around" with different matrix setups and solutions where you look at the discretization error and residual error.

Anna Tian August 14, 2014 06:30

Quote:

Originally Posted by flotus1 (Post 505923)
A residual value of 1e-2 only means that the solution changed for 1% compared to the last iteration. Running another 100 iterations that accumulate this error, the result will be way off.

NEVER say that your solution converged by looking at a residual plot alone.


Right. Convergence has two criteria.

1) low residual

2) factor we care about won't change anymore with more iterations

I'm talking about the first one. Here we assume that the second one is already satisfied.

wyldckat August 14, 2014 06:35

Since I don't see any mention yet about this on this thread, here's a link to a thread from about 3 years ago, where a very good description on this topic is given: http://www.cfd-online.com/Forums/flu...nvergence.html

Anna Tian August 14, 2014 06:43

Quote:

Originally Posted by Ford Prefect (Post 505929)
Hey,

1. There are many ways to define the residual and there is no best, catch-all way to define it. However, as a general rule of thumb what FMDenaro said is a good place to start.

2. If you are using commercial software then going with the recommendations of the company is usually preferred. However, it should be noted that most commercial software are huge today and they are ever changing. This means that the manuals might not be as useful.

3. Testing and making both a mesh sensitivity study together with a residual study might prove to give the most confidence in your results. Looking at the behavior of some key variable together with the residuals is always good.

4. If the question is of a more general nature then my suggestion is to write a simple Matlab test case and "play around" with different matrix setups and solutions where you look at the discretization error and residual error.


Thanks for your answer.

2. The commercial software always have a theoretical guide as well. It is clearly stated how they define the residual in the theoretical guide. Their residual is defined in a typical way. So I guess, at least for most of the cases, the residual criteria doesn’t need to be that low. I’m wondering whether the commercial software company gives the crucial criteria on purpose so that they can completely avoid the risk of giving inaccuracy caused by large residual. But actually for 99.9% of the cases, that criteria is too strict?

3. Why the girds independence could be involved with the residual independence? I thought they can be tested and checked completely separately.

FMDenaro August 14, 2014 06:52

be careful of a fact, if in mass, momentum, energy, you consider as "residual" the time derivative, then some cases can simply say to you that your assumption of a steady state is wrong. This is not a convergence failure ....


All times are GMT -4. The time now is 08:42.