CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

under-relaxation factors -> level of residuals

Register Blogs Community New Posts Updated Threads Search

Like Tree66Likes
  • 42 Post By LuckyTran
  • 4 Post By Zigainer
  • 3 Post By LuckyTran
  • 4 Post By LuckyTran
  • 1 Post By Zigainer
  • 2 Post By LuckyTran
  • 5 Post By yhy20081016
  • 3 Post By wxmoore
  • 2 Post By LuckyTran

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 20, 2012, 10:16
Default under-relaxation factors -> level of residuals
  #1
Senior Member
 
Join Date: May 2011
Location: Germany
Posts: 130
Rep Power: 15
Zigainer is on a distinguished road
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!
Zigainer is offline   Reply With Quote

Old   March 21, 2012, 14:39
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
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.
LuckyTran is offline   Reply With Quote

Old   March 21, 2012, 14:57
Default
  #3
Senior Member
 
Join Date: May 2011
Location: Germany
Posts: 130
Rep Power: 15
Zigainer is on a distinguished road
Hi LuckyTram,

thanks for this answer!!! Really good explanation.

Quote:
Originally Posted by LuckyTran View Post
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 View Post
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 …..
Zigainer is offline   Reply With Quote

Old   March 21, 2012, 15:07
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by Zigainer View Post
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 View Post
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.
Gerhard, Krapf and SphericalCube like this.
LuckyTran is offline   Reply With Quote

Old   March 21, 2012, 15:21
Default
  #5
Senior Member
 
Join Date: May 2011
Location: Germany
Posts: 130
Rep Power: 15
Zigainer is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
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......
Zigainer is offline   Reply With Quote

Old   March 21, 2012, 15:27
Default
  #6
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by Zigainer View Post
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!
tariq, kepler123, vivek162 and 1 others like this.
LuckyTran is offline   Reply With Quote

Old   March 21, 2012, 15:30
Default
  #7
Senior Member
 
Join Date: May 2011
Location: Germany
Posts: 130
Rep Power: 15
Zigainer is on a distinguished road
Quote:
Originally Posted by Zigainer View Post
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) ....
giacoppo likes this.
Zigainer is offline   Reply With Quote

Old   March 29, 2012, 08:34
Default
  #8
Senior Member
 
Join Date: May 2011
Location: Germany
Posts: 130
Rep Power: 15
Zigainer is on a distinguished road
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?

Last edited by Zigainer; March 29, 2012 at 09:39. Reason: add a comment
Zigainer is offline   Reply With Quote

Old   March 31, 2012, 17:30
Default
  #9
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by Zigainer View Post
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.
wc34071209 and Gerhard like this.
LuckyTran is offline   Reply With Quote

Old   March 31, 2012, 23:05
Smile
  #10
Member
 
yehanyu
Join Date: Mar 2012
Location: Beijing, China
Posts: 48
Rep Power: 14
yhy20081016 is on a distinguished road
Quote:
Originally Posted by Zigainer View Post
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.
wc34071209, tariq, Gerhard and 2 others like this.
yhy20081016 is offline   Reply With Quote

Old   April 2, 2012, 04:19
Default
  #11
Senior Member
 
Join Date: May 2011
Location: Germany
Posts: 130
Rep Power: 15
Zigainer is on a distinguished road
Hi,

Quote:
Originally Posted by LuckyTran View Post
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 View Post
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?
Zigainer is offline   Reply With Quote

Old   January 8, 2013, 14:08
Default
  #12
New Member
 
william moore
Join Date: Jan 2013
Posts: 8
Rep Power: 13
wxmoore is on a distinguished road
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.
Mack, kishore96 and kepler123 like this.
wxmoore is offline   Reply With Quote

Old   June 7, 2013, 16:24
Default Automatic change of Under_Relaxation_Factors
  #13
New Member
 
Join Date: May 2012
Posts: 4
Rep Power: 14
Cristian_Alex is on a distinguished road
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
Cristian_Alex is offline   Reply With Quote

Old   June 19, 2013, 14:29
Default
  #14
Senior Member
 
Tanjina Afrin
Join Date: May 2013
Location: South Carolina
Posts: 169
Rep Power: 13
Tanjina is on a distinguished road
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.
Tanjina is offline   Reply With Quote

Old   August 15, 2014, 12:27
Default Under relaxation factor
  #15
New Member
 
Ramesh
Join Date: Aug 2014
Posts: 7
Rep Power: 12
asramesh is on a distinguished road
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.
asramesh is offline   Reply With Quote

Old   March 31, 2015, 04:57
Default
  #16
New Member
 
Agung
Join Date: Mar 2015
Posts: 12
Rep Power: 11
agung123 is on a distinguished road
Quote:
Originally Posted by yhy20081016 View Post
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/dgy6iygrr/
http://postimg.org/image/iivzck3xl/
agung123 is offline   Reply With Quote

Old   April 15, 2015, 00:17
Thumbs up Thank you bro...
  #17
New Member
 
Ramesh
Join Date: Aug 2014
Posts: 7
Rep Power: 12
asramesh is on a distinguished road
It helped me...
asramesh is offline   Reply With Quote

Old   February 6, 2016, 01:12
Default I am facing same problem in my analysis
  #18
New Member
 
kedar manohar
Join Date: Dec 2010
Posts: 11
Blog Entries: 1
Rep Power: 16
kedarjan is on a distinguished road
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?
kedarjan is offline   Reply With Quote

Old   July 21, 2017, 10:37
Default Doubt on under relaxation factor
  #19
Member
 
Abhinand
Join Date: Jun 2016
Posts: 75
Rep Power: 10
Abhinand is on a distinguished road
Hello guys,
Sorry for bringing up this thread again, but I have a fundamental doubt regarding under relaxation factors (URF)

So if we decrease the URF and the residuals oscillate is that a converged solution.

Is it necessary to bring back the relaxation factors higher again. What if it diverged again that time?

At the end of any simulation should the relaxation factors be as high as possible?

Thanks for your time
Any help would be appreciated
Abhinand is offline   Reply With Quote

Old   July 21, 2017, 17:53
Default
  #20
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by Abhinand View Post
At the end of any simulation should the relaxation factors be as high as possible?
Yes, at the end of any simulation the URF's should always be as high as possible. That is because at the end of the simulation, your solution should be the solution. If your solution blows up, then it's probably not the solution.
Abhinand and Gerhard like this.
LuckyTran is offline   Reply With Quote

Reply


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
Relaxation Factors for Transient solvers philippose OpenFOAM Running, Solving & CFD 19 March 20, 2014 05:39
[snappyHexMesh] Adding layers goes wrong with SnappyHexMesh Elise OpenFOAM Meshing & Mesh Conversion 1 April 22, 2013 03:32
[snappyHexMesh] Boundary layer in a pipe Clementhuon OpenFOAM Meshing & Mesh Conversion 6 March 12, 2012 13:41
rESIDUALS and rElaxation factors Mohsin FLUENT 9 October 24, 2010 01:22
Purpose of relaxation factors Mohsin FLUENT 5 April 30, 2010 12:57


All times are GMT -4. The time now is 16:00.