CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   under-relaxation factors -> level of residuals (http://www.cfd-online.com/Forums/fluent/98836-under-relaxation-factors-level-residuals.html)

Zigainer March 20, 2012 10:16

under-relaxation factors -> level of residuals
 
Hi,

I have a question regarding the under-relaxation factors.
If I use the default values I can’t get convergence so I started to decrease the under-relaxation values (to about 1/3 of default), as the user’s guide recommends this. So then I do not get divergence and my simulation is running. It seems, that it would take quite a while to get good convergence. I then started to increase the under-relaxation factors, which results in a rise of residuals. The residuals begin to drop again, but they do not reach the level as before! After a couple of iterations the residuals start to oscillate around a level, but with lower under-relaxation factors I can reach a lower level of residuals (difference is half a level of magnitude). So I wondered, if I should use the lower under-relaxation factors and iterate until the residuals do not change any more. This would mean, I have more iterations (at all) but the level of residuals would be less.
So what do you think?
Thanks in advance!

LuckyTran March 21, 2012 14:39

No magic here, that's what's supposed to happen. Unless your solution is diverging, do not bother with the under-relaxation factors. If it is diverging, do as you did, lower the factors until you can a stable solution, and then raise them again if possible. If not, then it is a hint that there is an inherent stability issues in the problem you are trying to solve or perhaps one of your modeling parameters is incorrect.

All your observations are correct. Lowering the under-relaxation factors will limit the change in the solution per iteration, which will make the residuals appear to change less per iteration. Be careful, as this can give a false sense of "oh, my solution is now converged". That is why residuals are not a good measure of solution convergence, they are really only useful for determining if the solution is diverging. Under-relaxation factors does not change the way the solution evolves in the long run, you still arrive at the same solution more or less (unless the solution diverges) it just takes you longer to get there.

As a test (do this as a mental exercise to not waste compute hours), setting all your under-relaxation factors to 0 will make the residuals constant because the solution does not change between iterations. It is possible to obtain very very very small residuals by setting the under-relaxation factors to very small fractions. Again, this does not mean that the solution is converged.

So in general, and this was obvious from the start, you want the highest under-relaxation factors. In fact, over-relaxation (under-relaxation factor greater than 1.0) would be ideal in the sense that you would arrive at the converged solution in the least number of iterations. However, because of the numerical schemes involved there are stability problems, and conservative values for the under-relaxation are necessary to prevent the solution from diverging.

Zigainer March 21, 2012 14:57

Hi LuckyTram,

thanks for this answer!!! Really good explanation.

Quote:

Originally Posted by LuckyTran (Post 350731)
Be careful, as this can give a false sense of "oh, my solution is now converged".

That is one very important point I am facing right now. I do iterate until my residuals do not change any more (problem so far was, that energy residuals are still decreasing). And my result is so far different from the case with higher relaxation factors. So that’s tricky.


But just hypothetically, if I iterate until residuals are not changing any more (maybe the start oscillating around a level) the results should be the same no matter how high/low the under-relaxation factors are??? Am I right with this?


Quote:

Originally Posted by LuckyTran (Post 350731)
you want the highest under-relaxation factors


Exactly, but for my problem (impingement configuration of a rotating leading edge) I have to increase the under-relaxation factors very slowly (otherwise I get divergence). So I am not sure if I can reach the default values at all (I actually don’t think so).
So how could I judge if my results are converged? Because the wall heat flux distribution is changing, when I start to increase the numbers of iterations. But the distribution is not moving in one direction, so I do not achieve convergence right now with the lowest under-relaxation factors …..

LuckyTran March 21, 2012 15:07

Quote:

Originally Posted by Zigainer (Post 350737)
But just hypothetically, if I iterate until residuals are not changing any more (maybe the start oscillating around a level) the results should be the same no matter how high/low the under-relaxation factors are??? Am I right with this?

Everything else being the same, yes you are right. That means same grid, same settings, same everything but under-relaxation factors.

On the same note, once the residuals reach constant, with small oscillations around a level then that is the limit of your simulation (most likely your solution has long been converged already). Iterating more will not improve anything. On the other hand, it is possible for a solution to be well converged (depending on how you define convergence) but residuals have not reached a constant level and are still decreasing. Both are acceptable!


Quote:

Originally Posted by Zigainer (Post 350737)
Hi LuckyTram,
So how could I judge if my results are converged? Because the wall heat flux distribution is changing, when I start to increase the numbers of iterations. But the distribution is not moving in one direction, so I do not achieve convergence right now with the lowest under-relaxation factors …..

Monitor solution values (so watch your wall heat flux distribution) until it converges. It's as simple as that! Don't let residuals fool you. If the problem is still diverging, then it's probably because of a bigger problem than under-relaxation factors.

Zigainer March 21, 2012 15:21

Quote:

Originally Posted by LuckyTran (Post 350739)
On the same note, once the residuals reach constant, with small oscillations around a level then that is the limit of your simulation (most likely your solution has long been converged already)

But if I reach my limit, my solution should not be change any more, right. So just to be safe, if I reach the limit of my simulation I can be sure that the distribution does not change any more, right?

I am just running some simulations (different under relaxation, everything else same) and I'll see the results tomorrow. So far, the residuals are not changing very much, but the heat flux distribution is changing (-> no convergence at the moment). But the case with higher under relaxation shows a more excepted distribution and I am not sure if the case with lower under relaxation will ever get to this distribution......

LuckyTran March 21, 2012 15:27

Quote:

Originally Posted by Zigainer (Post 350743)
But if I reach my limit, my solution should not be change any more, right. So just to be safe, if I reach the limit of my simulation I can be sure that the distribution does not change any more, right?

I am just running some simulations (different under relaxation, everything else same) and I'll see the results tomorrow. So far, the residuals are not changing very much, but the heat flux distribution is changing (-> no convergence at the moment). But the case with higher under relaxation shows a more excepted distribution and I am not sure if the case with lower under relaxation will ever get to this distribution......

Depending on the grid and scheme used, it is very possible, for all your solution values to be converged to very high accuracy but residuals to still be decreasing for many many iterations after. As an example: say solution values converged at 5,000 iterations to less than 0.01%. You can keep going to 100,000 iterations and residuals not level off, but not achieve any higher accuracy in convergence! You don't need to waste the extra 95,000 iterations for no reason, you could have solved another 95 problems in that time!

If you can afford to wait until the residuals become steady then sure. But for large problems, then definitely not!

Zigainer March 21, 2012 15:30

Quote:

Originally Posted by Zigainer (Post 350743)
So far, the residuals are not changing very much, but the heat flux distribution is changing (-> no convergence at the moment).

But as long as my distribution is changing, I have to continue ..... right
What I just wanted to say, if my residuals are at one level the distribution should not change any more, right. OItherwise I have some other problems (settings, mesh etc) ....

Zigainer March 29, 2012 07:34

So I could manage to increase the under relaxation factors (not to the default values, but around 2/3 of them).
So now I am at the point where residuals do not decrease any more, they oscillate around a level. But when I calculate the Nusselt distribution (span wise averaged) the characteristic is almost constant but the level differs.
So lets say I have a specific distribution after 20000 iterations and I do another 3000 iterations the level is different (1-8% derivation). If I do another 3000 iteration I get almost exactly the first distribution. And again 3000 iterations give me again almost exactly the second one.
So I thought if my problem is not steady state, then steady state will give me an average of the transient one, but it seems the steady state solution is oscillating.... Any idea?

edit: or is this behavior due to the implicit formulation for the pressure based solver?

LuckyTran March 31, 2012 16:30

Quote:

Originally Posted by Zigainer (Post 352161)
So I could manage to increase the under relaxation factors (not to the default values, but around 2/3 of them).
So now I am at the point where residuals do not decrease any more, they oscillate around a level. But when I calculate the Nusselt distribution (span wise averaged) the characteristic is almost constant but the level differs.
So lets say I have a specific distribution after 20000 iterations and I do another 3000 iterations the level is different (1-8% derivation). If I do another 3000 iteration I get almost exactly the first distribution. And again 3000 iterations give me again almost exactly the second one.
So I thought if my problem is not steady state, then steady state will give me an average of the transient one, but it seems the steady state solution is oscillating.... Any idea?

edit: or is this behavior due to the implicit formulation for the pressure based solver?

probably isn't a problem with the pressure based solver

if the flow is inherently unsteady, then the steady solver tends to collapse into one of the preferentially stable modes and can sometimes switch back and forth, producing oscillatory solutions like you are describing. The steady solver does not give you the average of the transient simulation.
A crude way of imagining it, is that the steady solver will give you 1 instantaneous solution of the unsteady flow.

if this is the case, it may be necessary to run an unsteady simulation and collect statistics to get meaningful time-averaged data.

yhy20081016 March 31, 2012 22:05

Quote:

Originally Posted by Zigainer (Post 350434)
Hi,

I have a question regarding the under-relaxation factors.
If I use the default values I can’t get convergence so I started to decrease the under-relaxation values (to about 1/3 of default), as the user’s guide recommends this. So then I do not get divergence and my simulation is running. It seems, that it would take quite a while to get good convergence. I then started to increase the under-relaxation factors, which results in a rise of residuals. The residuals begin to drop again, but they do not reach the level as before! After a couple of iterations the residuals start to oscillate around a level, but with lower under-relaxation factors I can reach a lower level of residuals (difference is half a level of magnitude). So I wondered, if I should use the lower under-relaxation factors and iterate until the residuals do not change any more. This would mean, I have more iterations (at all) but the level of residuals would be less.
So what do you think?
Thanks in advance!

You should:
1. Create some surface monitors.
2. Firstly, iterate with default under-relaxation factors.
3. If the solver divergence, then decrease the under-relaxation factors.
4. If the residual don't drop any more, then watch the convergence history of the surface monitors. If all monitors convergence, then you can stop calculation.
5. If the residual don't drop any more but the monitored value oscillate, then decrease the under-relaxation factors and continue to iterate.
6. Repeat step 4 and step 5 again and again.
Some additional tips: Don't decrease all under-relaxation factors at the same time. It usually doesn't work. The correct method is try to decrease one kind of under-relaxation factors at a time(for example, decrease under-relaxation factors of all species), then iterate for a while, then ,if it doesn't work, return to the previous solution and try to decrease another kind of under-relaxation factors.

Zigainer April 2, 2012 03:19

Hi,

Quote:

Originally Posted by LuckyTran (Post 352473)
if the flow is inherently unsteady, then the steady solver tends to collapse into one of the preferentially stable modes and can sometimes switch back and forth, producing oscillatory solutions like you are describing. The steady solver does not give you the average of the transient simulation.
A crude way of imagining it, is that the steady solver will give you 1 instantaneous solution of the unsteady flow.

if this is the case, it may be necessary to run an unsteady simulation and collect statistics to get meaningful time-averaged data.

I guess that is my problem .... I would like to avoid using unsteady solver ... but it actually seems that you described the problem perfectly!
I only have this problem with the highest rotation number, for the other cases it's fine ...

Quote:

Originally Posted by yhy20081016 (Post 352487)
You should:
1. Create some surface monitors.
2. Firstly, iterate with default under-relaxation factors.
3. If the solver divergence, then decrease the under-relaxation factors.
4. If the residual don't drop any more, then watch the convergence history of the surface monitors. If all monitors convergence, then you can stop calculation.
5. If the residual don't drop any more but the monitored value oscillate, then decrease the under-relaxation factors and continue to iterate.
6. Repeat step 4 and step 5 again and again.
Some additional tips: Don't decrease all under-relaxation factors at the same time. It usually doesn't work. The correct method is try to decrease one kind of under-relaxation factors at a time(for example, decrease under-relaxation factors of all species), then iterate for a while, then ,if it doesn't work, return to the previous solution and try to decrease another kind of under-relaxation factors.

I think I'll create monitor surfaces, but as I can see from my results (at different iterations) these values are oscillating.
But I have a question about point 5). Why should a decrease in under-relaxation factor bring my solution to convergence? As far as I know with lower under relaxation the change in solution is limited and therefore it would take longer to get a solution. But the problem LuckyTran (instantaneous solution of unsteady flow) would still exist, right?

wxmoore January 8, 2013 14:08

In my experience it is often more productive to address the root cause of the convergence issue, which is typically poor mesh quality (high skewness), insufficient mesh resolution in the boundary layer or regions of high gradient, ill-posed boundary conditions or the wrong turbulence model. Once these issues are resolved then the default under-relaxation factors should be used at the start of the calculation. The model should be allowed to run for a reasonable number of iterations before attempting to change the URF's. Decreasing the URF's at the start of the calculation, impedes the speed of convergence by limiting the size of the step taken for each variable from one iteration to the next. This can produce misleading results unless convergence is verified by monitoring other variables such as mass and energy balance, temperature and pressure monitors, etc. The advice is don't just automatically reduce the URF's because it causes the residuals to immediately decrease, but allow the solver time to reach overall global convergence without impeding it with URF's.

Others users feedback and experience would be greatly appreciated.:)

Cristian_Alex June 7, 2013 15:24

Automatic change of Under_Relaxation_Factors
 
Godd afternoon everyone

Iīm working in a laminar diffusive flame in fluent. In the firsts iterations is important to keep the URF very small to avoid blow-up, but after some time is possible going to increase the URF slowly to acelerate the convergence,so, I was thinking on use some kind of automatic under-relaxation factors (in Fluentīs option or with an UDF).


Please, anyone know how set up fluent to automatically change the under-relaxiation factors? Or itīs not posible to do that?

Thankīs

Tanjina June 19, 2013 13:29

Hi All,

I am trying to model flow through the a circular pipe from rectangular reservoir. After some iteration, divergence in x-momentum message appeared. Then I reduce relaxation factor from 1 to 0.1, now its running, but residual upto 500 run, it was almost constant, but from 500-800, its oscillating with increasing value. What does it mean. if anyone can suggest anything, that will be really very helpful. Thanks in advance.

asramesh August 15, 2014 11:27

Under relaxation factor
 
After reducing under relaxation factor I am getting convergence. My doubt is after getting the convergence whether I have to increase the under relaxation factor again and to run the iteration? Or whether I can take the result obtained as it is. Kindly help.

agung123 March 31, 2015 03:57

Quote:

Originally Posted by yhy20081016 (Post 352487)
You should:
1. Create some surface monitors.
2. Firstly, iterate with default under-relaxation factors.
3. If the solver divergence, then decrease the under-relaxation factors.
4. If the residual don't drop any more, then watch the convergence history of the surface monitors. If all monitors convergence, then you can stop calculation.
5. If the residual don't drop any more but the monitored value oscillate, then decrease the under-relaxation factors and continue to iterate.
6. Repeat step 4 and step 5 again and again.
Some additional tips: Don't decrease all under-relaxation factors at the same time. It usually doesn't work. The correct method is try to decrease one kind of under-relaxation factors at a time(for example, decrease under-relaxation factors of all species), then iterate for a while, then ,if it doesn't work, return to the previous solution and try to decrease another kind of under-relaxation factors.

Hey bro, i do the similar thing like that. i reduced the momentum under-relaxation factor every the residual seems to be increased. these are my solution graph, please see the picture below if u dont mind. Thanks and best regards
http://postimg.org/image/iivzck3xl/http://postimg.org/image/dgy6iygrr/

http://postimg.org/image/dgy6iygrr/
http://postimg.org/image/iivzck3xl/

asramesh April 14, 2015 23:17

Thank you bro...
 
It helped me...

kedarjan February 6, 2016 01:12

I am facing same problem in my analysis
 
I am doing air compressor analysis
inlet BC- mass flow inlet (0.5 kg/s)
outlet BC - pressure outlet (back pressure 3.5bar)
compressor walls - wall BC with ambient temp
the mesh is very complex as the screw inside the air compressor makes it complex and there are much more elements in my mesh
When I run the solution with laminar model and energy eq ON
it runs for few iterations
I get reversed flow in pressure outlet
also I get temperature limited to 1.0000e1 warnings during iteratins

later it diverges because of the temperature

Kindly anybody can help me to get solution

would under relaxation factor help in this regard?


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