CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Lid Driven Cavity (SIMPLE) (https://www.cfd-online.com/Forums/main/226356-lid-driven-cavity-simple.html)

deepmorzaria April 24, 2020 11:12

Lid Driven Cavity (SIMPLE)
 
2 Attachment(s)
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

FMDenaro April 24, 2020 12:01

Quote:

Originally Posted by deepmorzaria (Post 767221)
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?

deepmorzaria April 24, 2020 12:08

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.

FMDenaro April 24, 2020 12:13

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.

deepmorzaria April 24, 2020 12:51

2 Attachment(s)
Yes, the divergence free condition is satisfied. I've posted the comparison for Ghia et al. Probably this would give you a better picture

FMDenaro April 24, 2020 12:55

Quote:

Originally Posted by deepmorzaria (Post 767250)
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.

deepmorzaria April 24, 2020 13:35

2 Attachment(s)
Quote:

Originally Posted by FMDenaro (Post 767253)
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

FMDenaro April 24, 2020 13:39

Quote:

Originally Posted by deepmorzaria (Post 767266)
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?

deepmorzaria April 24, 2020 13:43

Quote:

Originally Posted by FMDenaro (Post 767267)
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.

FMDenaro April 24, 2020 14:10

Quote:

Originally Posted by deepmorzaria (Post 767269)
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

deepmorzaria April 24, 2020 14:23

Quote:

Originally Posted by FMDenaro (Post 767274)
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.

FMDenaro April 24, 2020 14:29

Quote:

Originally Posted by deepmorzaria (Post 767275)
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

deepmorzaria April 26, 2020 08:52

Quote:

Originally Posted by FMDenaro (Post 767276)
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.

FMDenaro April 26, 2020 11:25

Quote:

Originally Posted by deepmorzaria (Post 767409)
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?

deepmorzaria April 26, 2020 11:41

Quote:

Originally Posted by FMDenaro (Post 767424)
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.

FMDenaro April 26, 2020 12:00

Quote:

Originally Posted by deepmorzaria (Post 767426)
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?


All times are GMT -4. The time now is 13:58.