# Convergence problem at high reynolds number

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

 July 20, 2022, 14:09 Convergence problem at high reynolds number #1 New Member   Join Date: Jul 2022 Posts: 6 Rep Power: 3 Hi, I am studying on heat transfer with SOR method using Matlab. The code is pretty good for ra=10^3 and ra=10^4. But for ra=10^5 the code is running for hours but never converge. The error is firstly decreasing then increasing and it keep going like this. What could be the problem? Thanks in advance. Last edited by bgm; July 20, 2022 at 18:49.

July 20, 2022, 15:09
#2
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,781
Rep Power: 71
Quote:
 Originally Posted by bgm Hi, I am studying on heat transfer with SOR method using Matlab. The code is pretty good for re=10^3 and re=10^4. But for re=10^5 the code is running for hours but never converge. The error is firstly decreasing then increasing and it keep going like this. What could be the problem? Thanks in advance.
SOR method says almost nothing. You have to address the equations and discretization.

July 20, 2022, 15:19
#3
New Member

Join Date: Jul 2022
Posts: 6
Rep Power: 3
Quote:
 Originally Posted by FMDenaro SOR method says almost nothing. You have to address the equations and discretization.
Thak you, all discretizations are made with FDM, do you mean there is a discretization mistake or should i change the method ? i will check anyway.

but i can not understand how come the others (at lower rayleigh) are giving correct results?

Last edited by bgm; July 20, 2022 at 18:50.

July 20, 2022, 15:26
#4
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,781
Rep Power: 71
Quote:
 Originally Posted by bgm Thak you, all discretizations are made with FDM, do you mean there is a discretization mistake or should i change the method ? i will check anyway. but i can not understand how come the others (at lower reyonolds) are giving correct results?
Again, what about the matrix of your algebric system after the discretization?
How do you check the acceleration factor? The Gauss-Seidel works at that Reynolds?

July 20, 2022, 15:40
#5
New Member

Join Date: Jul 2022
Posts: 6
Rep Power: 3
Quote:
 Originally Posted by FMDenaro Again, what about the matrix of your algebric system after the discretization? How do you check the acceleration factor? The Gauss-Seidel works at that Reynolds?
The acceleration factor has the bounds 0 to 2 you know. But the Gauss-Seidel does not work, yes that is the problem. So how can i fix or modify it?

As I understand it, you are suggesting that I change the method.

 July 20, 2022, 18:50 #6 New Member   Join Date: Jul 2022 Posts: 6 Rep Power: 3 I wrote Reynolds instead of Rayleigh. Please take in Rayleigh.

 July 21, 2022, 11:01 #7 Senior Member     Paolo Lampitella Join Date: Mar 2009 Location: Italy Posts: 2,157 Blog Entries: 29 Rep Power: 39 You still haven't provided any detail on the method (finite difference, per se, still means nothing), problem, boundary conditions. In general, high Re and high Ra cases will get harder and harder to converge, until they don't anymore. If you were doing everything correctly, then you would just be catching the higher Ra for which a steady (guessing from your presentation of the facts) solution exists. In general, I have doubts you are doing everything correctly, so you aren't probably catching the exact Ra for which the solution becomes unsteady, yet the reason for your lack of convergence is roughly/probably the same. FMDenaro and bgm like this.

July 22, 2022, 09:09
#8
New Member

Join Date: Jul 2022
Posts: 6
Rep Power: 3
Quote:
 Originally Posted by sbaffini You still haven't provided any detail on the method (finite difference, per se, still means nothing), problem, boundary conditions. In general, high Re and high Ra cases will get harder and harder to converge, until they don't anymore. If you were doing everything correctly, then you would just be catching the higher Ra for which a steady (guessing from your presentation of the facts) solution exists. In general, I have doubts you are doing everything correctly, so you aren't probably catching the exact Ra for which the solution becomes unsteady, yet the reason for your lack of convergence is roughly/probably the same.
Let me start by thanking you for your interest.

problem: natural convection in square cavity
aim: create my own matlab code
method: SOR method (gauss-seidel) with finite difference discretization
boundary conditions: left and right walls are isolated, heated from below

the problem i have : my code runs and gives very appropriate results both in meaning graphical and numerical at ra=10^3 and ra=10^4 and it has correct convergence. but when taking ra=10^5 there isn't any convergence

my wish: realize and learn my mistake. Is it choosing wrong method or coding the algortihm false? or any other mistakes offer anyone says. i want to run my code correctly.

July 25, 2022, 06:34
#9
Senior Member

Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,157
Blog Entries: 29
Rep Power: 39
Quote:
 Originally Posted by bgm Let me start by thanking you for your interest. problem: natural convection in square cavity aim: create my own matlab code method: SOR method (gauss-seidel) with finite difference discretization boundary conditions: left and right walls are isolated, heated from below the problem i have : my code runs and gives very appropriate results both in meaning graphical and numerical at ra=10^3 and ra=10^4 and it has correct convergence. but when taking ra=10^5 there isn't any convergence my wish: realize and learn my mistake. Is it choosing wrong method or coding the algortihm false? or any other mistakes offer anyone says. i want to run my code correctly.
Obviously, we can't say if your coding is correct or not but, in general, what I already wrote applies. The problem you are trying to solve gets harder and harder to converge with increasing Ra, then it doesn't anymore, no matter what. It obviously depends ALSO from your coding. For example, are all your terms implicitly discretized? What form of convection scheme are you using? But, again, this sort of behavior is expected.

July 26, 2022, 18:09
#10
New Member

Join Date: Jul 2022
Posts: 6
Rep Power: 3
Quote:
 Originally Posted by sbaffini Obviously, we can't say if your coding is correct or not but, in general, what I already wrote applies. The problem you are trying to solve gets harder and harder to converge with increasing Ra, then it doesn't anymore, no matter what. It obviously depends ALSO from your coding. For example, are all your terms implicitly discretized? What form of convection scheme are you using? But, again, this sort of behavior is expected.
thanks a lot for your answers. Is there any way to improve the SOR method?

 July 27, 2022, 01:38 #11 Member   EM Join Date: Sep 2019 Posts: 59 Rep Power: 6 Just in case: the g-s method is convergent when the matrix for inversion is diagonally dominant. have u checked this? otherwise you are shooting in the dark. Second, are we to assume that with increasing Ra you also increase the number of grid points in each direction? if you are doing so, then you should be aware that point-relaxation methods become increasing slow with increasing number of grid points eventually becoming unusuable. This is why multigrid methods were developed. What kinds of grids are you using? Numbers, Stretching etc..? Third, have you checked your converged cases against direct solvers and or with external linear algebra routines? If so, have you also tried doing the non-convergent one with external direct and iterative solvers? These will give you clue if there is physical reason causing the lack of convergence @ higher Ra. Fourth, plot the the state of the struggling unconverged non-solution (i assume your problem is 2d) to check for the presence of gravity waves. These are large-scale ie the wavelength is comparable to the box you are using as opposed to numerical instabilities that tend to be strong at grid scale. you have got the cfd spirit right: you suspect the numerics before any physical reason. people that use ready software tend to jump straight into physical explanations. also, the same convergence difficulties show up in the side-heated/cooled rectangular cavities when increasing Ra but in this case the physical reason is well known: the core flow develops stable stratification giving rise to unsteady gravity waves at the Brunt-Vaisala frequency. I have come across (and ignored) a number of plane channel bottom-heated dns publications that may be worth looking into for any special physical phenomena that the flow may be developing large-scale oscillatory behaviour. -- sbaffini likes this.

July 27, 2022, 04:35
#12
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,781
Rep Power: 71
Quote:
 Originally Posted by bgm thanks a lot for your answers. Is there any way to improve the SOR method?
Ra=O(10^5) should be the limit for a steady solution if I rember correctly the historical test case.
Again, what you did not understand is the fact that you have to see the property of the matrix resulting from you discretization. That depends also on your linearization.
Furthermore, the optimal acceleration parameter depends on the grid size.

 Tags convergence failure, heat and mass transfer, matlab, reynolds number, sor