CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Re: Convergence problem for refined grid (https://www.cfd-online.com/Forums/main/14760-re-convergence-problem-refined-grid.html)

CFD_Novice February 11, 2008 12:28

Re: Convergence problem for refined grid
 
Hi,

I wrote a 2D CFD code using SIMPLE on collocated grid. I test the code with some simple cases. I found that when the grid is coarse, the solution agrees with the theoretical solution. When I refine the grid, the solution becomes divergent. So what is wrong with my code? How can I improve the convergence?

Thank you for any help.


alpha February 11, 2008 20:59

Re: Convergence problem for refined grid
 
Are you solving RANS equations on your grid. If yes, how dense was your grid? If you use both infinitely fine grid and turbulence model then you are bound to have problems, because you will be solving reynolds stresses directly and your turbulence model will also take into account effects of turbulence in your flow field. Therefore, you end up with wrong results.

alpha

CFD_novice February 11, 2008 23:07

Re: Convergence problem for refined grid
 
Thank you for your answer. Currently, I am only considering Laminar flow and solving a simple flow problem which has theoretical results. The numerical solution with 5 X 5 grid agree well with the theoretical one. However, when I refine grid from 5 X 5 to 60 X 60, the result is even not convergent.

Any input will be appreciated.

alpha February 12, 2008 07:42

Re: Convergence problem for refined grid
 
What i dont understand is why would you refine your grid to this extent for a laminar flow. What sort of Reynolds number are you working on? If boundary layer is laminar there is no need for DNS type grid resolution, a coarse grid will be fine.

alpha

student February 12, 2008 08:49

Re: Convergence problem for refined grid
 
Brief you problem definition, method used,


agg February 12, 2008 13:15

Re: Convergence problem for refined grid
 
Looks like you are not conserving mass, maybe because of your numerical scheme. This doesn't show up on a coarse grid, but does when you refine. I assume you are solving incompressible flow. Compute du/dx+dv/dy for each cell, for the coarse and fine simulations (for each time step and see if you are maintaining a divergence-free velocity).

CFD_novice February 12, 2008 13:32

Re: Convergence problem for refined grid
 
Response to Alpha,

Thank you for your quick response. I agree with you that for laminar flow, coarse grid works fine. In fact, I encountered divergence problem when I calculate turbulent flow (Re =4000) with my code. I can not figure out why. So I go back check my laminar flow simulation. I found that if I use fine mesh, there is some convergence problem even for laminar flow. Therefore, I think I need to solve the divergence problem for laminar flow then go to turbulent flow.


CFD_novice February 12, 2008 13:42

Re: Convergence problem for refined grid
 
Hello agg,

I use SIMPLE method on collocate grid. The numerical scheme is UPWIND. To test my code, I use several simple laminar flow cases. For example, flow inside a square container with a moving lid. They show some divergence problem when the grid becomes finer, more or less.

Thank you.

CFD_novice February 12, 2008 13:53

Re: Convergence problem for refined grid
 
I will check the mass conservation and get back to you later.

Thanks.

CFD_novice February 12, 2008 17:43

Re: Convergence problem for refined grid
 
I solve the pressure correction equation derived with mass-conservation equation. Is there any way to measure how well the mass conversation is satisfied when the grid becomes finer?

Thank you.

santo February 12, 2008 23:05

Re: Convergence problem for refined grid
 
Pressure oscillations plays an important role in colocated grid. Have you used Rhie and Chow interpolation to avoid this problem for calculating mass flux.

continuity eq is your convergence criteria du/dx + dv/dy =0 on integrating over a C.V yields (u_e-u_w)dely + (v_n-v_s)delx=0 here one has to apply Rhie and Chow interpolationss for calculating flux velocities.

Please correct me if I am wrong.

San

quarkz February 12, 2008 23:34

Re: Convergence problem for refined grid
 
Speaking from my own personal experience, if everything else is correct (scheme,Rhie and Chow interpolation etc), most likely you have a careless mistake. You may need to inspect your code.

Btw, you should also check when and where does it diverge. Is it due to momentum or poisson eqn?

Hope that helps...

CFD_Novice February 15, 2008 13:39

Re: Convergence problem for refined grid
 
Hi,

Thank you all for suggestions. I did find several careless mistakes when inpsecting the code. But it is frustrating to see that the result doesn't have obvious improvment. To avoid the pressure's osillations on collocated grid, I utilize A.W. Date's method, not Rhie and Chow's interpolation.

The paper for this method is "Complete pressure correction algorithm for solution of incompressible Navier-Stokes equations on a nonstaggered grid" by A.W.Date, Numerical Heat Transfer B, Vol.29,1996

Do you have any comment on the difference of this two methods?

Cheers,


CFD_novice February 17, 2008 22:56

SUMMARY
 
Hi,

I finally overcome the divergence problem for the refined grid on Laminar flow. The reason is that the careless mistakes I made in my code. Hope that it will be helpful when others encounter similar problem.

Thank you all for help.



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