# Lid Driven Cavity (SIMPLE)

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

April 24, 2020, 11:12
Lid Driven Cavity (SIMPLE)
#1
New Member

Deep Morzaria
Join Date: Jan 2020
Posts: 10
Rep Power: 4
Hello, I am trying to code the lid driven cavity problem using SIMPLE method and FVM discretization with staggered grid and ghost cells.

Steps followed
1. Found the velocity coefficient matrix for u,v (incorporated the BC in the coefficient matrix for corner and boundary cell)
2. Found the updated velocities using momentum equation
3. Found the coefficient matrix for pressure correction (incorporated the BC in the coefficient matrix for corner and boundary cell)
4. updated p,u,v

Central differencing scheme used to discretize.

I am facing some issues in the results for centerline velocity.

Attached Images
 Screen Shot 2020-04-24 at 8.40.19 PM.jpg (91.3 KB, 14 views) Screen Shot 2020-04-24 at 8.39.59 PM.jpg (46.4 KB, 18 views)

April 24, 2020, 12:01
#2
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,105
Rep Power: 66
Quote:
 Originally Posted by deepmorzaria Hello, I am trying to code the lid driven cavity problem using SIMPLE method and FVM discretization with staggered grid and ghost cells. Steps followed 1. Found the velocity coefficient matrix for u,v (incorporated the BC in the coefficient matrix for corner and boundary cell) 2. Found the updated velocities using momentum equation 3. Found the coefficient matrix for pressure correction (incorporated the BC in the coefficient matrix for corner and boundary cell) 4. updated p,u,v Central differencing scheme used to discretize. I am facing some issues in the results for centerline velocity. Thanks in advance

What is the problem? Why do you think to get exactly the same results obtained by Fluent?

 April 24, 2020, 12:08 #3 New Member   Deep Morzaria Join Date: Jan 2020 Posts: 10 Rep Power: 4 I am not looking for the exact results but I'm concerned about the curvature it achieves after reaching the minima. That curvature increases as I decrease the grid spacing and hence the error.

 April 24, 2020, 12:13 #4 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 6,105 Rep Power: 66 I suggest to compare to the well known results in literature (for example Ghia & Ghia) using the same Re and a similar grid. Check both velocity profiles in the centerline and the recirculation region. Check if the divergence-free constraint is satisfied.

April 24, 2020, 12:51
#5
New Member

Deep Morzaria
Join Date: Jan 2020
Posts: 10
Rep Power: 4
Yes, the divergence free condition is satisfied. I've posted the comparison for Ghia et al. Probably this would give you a better picture
Attached Images
 Screen Shot 2020-04-24 at 10.19.04 PM.png (117.4 KB, 8 views) Screen Shot 2020-04-24 at 10.18.54 PM.jpg (31.8 KB, 13 views)

April 24, 2020, 12:55
#6
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,105
Rep Power: 66
Quote:
 Originally Posted by deepmorzaria Yes, the divergence free condition is satisfied. I've posted the comparison for Ghia et al. Probably this would give you a better picture

What about the Re number? What about the comparison to the other velocity component?
Plot the streamlines and check that your solution achieved a convergent result.

April 24, 2020, 13:35
#7
New Member

Deep Morzaria
Join Date: Jan 2020
Posts: 10
Rep Power: 4
Quote:
 Originally Posted by FMDenaro What about the Re number? What about the comparison to the other velocity component? Plot the streamlines and check that your solution achieved a convergent result.
The Re is 100. V velocity is actually worse
Attached Images
 Screen Shot 2020-04-24 at 11.02.32 PM.jpg (32.2 KB, 12 views) Screen Shot 2020-04-24 at 11.04.31 PM.png (122.6 KB, 6 views)

April 24, 2020, 13:39
#8
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,105
Rep Power: 66
Quote:
 Originally Posted by deepmorzaria The Re is 100. V velocity is actually worse

It seems like you have not reached a fully convergence, how do you stop the run? What about a refining of the grid?

April 24, 2020, 13:43
#9
New Member

Deep Morzaria
Join Date: Jan 2020
Posts: 10
Rep Power: 4
Quote:
 Originally Posted by FMDenaro It seems like you have not reached a fully convergence, how do you stop the run? What about a refining of the grid?
If the successive change in velocity is less than 1e-6, it stop the solution. The grid size is 31x31 which is quite decent. The other results from similar mesh seem to have got a pretty accurate result.

April 24, 2020, 14:10
#10
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,105
Rep Power: 66
Quote:
 Originally Posted by deepmorzaria If the successive change in velocity is less than 1e-6, it stop the solution. The grid size is 31x31 which is quite decent. The other results from similar mesh seem to have got a pretty accurate result.

That makes no sense in terms of convergence, you have to monitor the residuals

April 24, 2020, 14:23
#11
New Member

Deep Morzaria
Join Date: Jan 2020
Posts: 10
Rep Power: 4
Quote:
 Originally Posted by FMDenaro That makes no sense in terms of convergence, you have to monitor the residuals
What do you mean it doesn't make sense ? velocity residuals are calculated in terms of the difference in old and new values (https://www.researchgate.net/publica..._driven_cavity).

Also, keep in mind that am monitoring residuals from continuity equation.

April 24, 2020, 14:29
#12
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,105
Rep Power: 66
Quote:
 Originally Posted by deepmorzaria What do you mean it doesn't make sense ? velocity residuals are calculated in terms of the difference in old and new values (https://www.researchgate.net/publica..._driven_cavity). Also, keep in mind that am monitoring residuals from continuity equation.

Not at all, the differences between old and new values are not the residuals of the equations.

A.x^k-q=r^k is the k-th residual

April 26, 2020, 08:52
#13
New Member

Deep Morzaria
Join Date: Jan 2020
Posts: 10
Rep Power: 4
Quote:
 Originally Posted by FMDenaro Not at all, the differences between old and new values are not the residuals of the equations. A.x^k-q=r^k is the k-th residual
I tried the approach you mentioned. It doesn't seem to work. Do you mind looking at my code ? Please share your email id if so.

April 26, 2020, 11:25
#14
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,105
Rep Power: 66
Quote:
 Originally Posted by deepmorzaria I tried the approach you mentioned. It doesn't seem to work. Do you mind looking at my code ? Please share your email id if so.

I cannot debug your code, tell us what is the problem, did you compute the residuals and they diverge?

April 26, 2020, 11:41
#15
New Member

Deep Morzaria
Join Date: Jan 2020
Posts: 10
Rep Power: 4
Quote:
 Originally Posted by FMDenaro I cannot debug your code, tell us what is the problem, did you compute the residuals and they diverge?
No it does not diverge. To me it seems that either something is wrong with the link coefficients for u,v in momentum equation as I incorporate the boundary conditions. The interior nodes look good to me. Or there could be something wrong in the way I am implementing relaxation factors.

April 26, 2020, 12:00
#16
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,105
Rep Power: 66
Quote:
 Originally Posted by deepmorzaria No it does not diverge. To me it seems that either something is wrong with the link coefficients for u,v in momentum equation as I incorporate the boundary conditions. The interior nodes look good to me. Or there could be something wrong in the way I am implementing relaxation factors.

what do you mean? the norm on the u and v residual become constant?