CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Lid Driven Cavity (SIMPLE)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 24, 2020, 11:12
Default Lid Driven Cavity (SIMPLE)
  #1
New Member
 
Deep Morzaria
Join Date: Jan 2020
Posts: 10
Rep Power: 6
deepmorzaria is on a distinguished road
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
Attached Images
File Type: jpg Screen Shot 2020-04-24 at 8.40.19 PM.jpg (91.3 KB, 18 views)
File Type: jpg Screen Shot 2020-04-24 at 8.39.59 PM.jpg (46.4 KB, 21 views)
deepmorzaria is offline   Reply With Quote

Old   April 24, 2020, 12:01
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by deepmorzaria View Post
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?
FMDenaro is offline   Reply With Quote

Old   April 24, 2020, 12:08
Default
  #3
New Member
 
Deep Morzaria
Join Date: Jan 2020
Posts: 10
Rep Power: 6
deepmorzaria is on a distinguished road
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.
deepmorzaria is offline   Reply With Quote

Old   April 24, 2020, 12:13
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
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.
FMDenaro is offline   Reply With Quote

Old   April 24, 2020, 12:51
Default
  #5
New Member
 
Deep Morzaria
Join Date: Jan 2020
Posts: 10
Rep Power: 6
deepmorzaria is on a distinguished road
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
File Type: png Screen Shot 2020-04-24 at 10.19.04 PM.png (117.4 KB, 8 views)
File Type: jpg Screen Shot 2020-04-24 at 10.18.54 PM.jpg (31.8 KB, 15 views)
deepmorzaria is offline   Reply With Quote

Old   April 24, 2020, 12:55
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by deepmorzaria View Post
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.
FMDenaro is offline   Reply With Quote

Old   April 24, 2020, 13:35
Default
  #7
New Member
 
Deep Morzaria
Join Date: Jan 2020
Posts: 10
Rep Power: 6
deepmorzaria is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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
File Type: jpg Screen Shot 2020-04-24 at 11.02.32 PM.jpg (32.2 KB, 15 views)
File Type: png Screen Shot 2020-04-24 at 11.04.31 PM.png (122.6 KB, 8 views)
deepmorzaria is offline   Reply With Quote

Old   April 24, 2020, 13:39
Default
  #8
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by deepmorzaria View Post
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?
FMDenaro is offline   Reply With Quote

Old   April 24, 2020, 13:43
Default
  #9
New Member
 
Deep Morzaria
Join Date: Jan 2020
Posts: 10
Rep Power: 6
deepmorzaria is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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.
deepmorzaria is offline   Reply With Quote

Old   April 24, 2020, 14:10
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by deepmorzaria View Post
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
FMDenaro is offline   Reply With Quote

Old   April 24, 2020, 14:23
Default
  #11
New Member
 
Deep Morzaria
Join Date: Jan 2020
Posts: 10
Rep Power: 6
deepmorzaria is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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.
deepmorzaria is offline   Reply With Quote

Old   April 24, 2020, 14:29
Default
  #12
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by deepmorzaria View Post
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
FMDenaro is offline   Reply With Quote

Old   April 26, 2020, 08:52
Default
  #13
New Member
 
Deep Morzaria
Join Date: Jan 2020
Posts: 10
Rep Power: 6
deepmorzaria is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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.
deepmorzaria is offline   Reply With Quote

Old   April 26, 2020, 11:25
Default
  #14
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by deepmorzaria View Post
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?
FMDenaro is offline   Reply With Quote

Old   April 26, 2020, 11:41
Default
  #15
New Member
 
Deep Morzaria
Join Date: Jan 2020
Posts: 10
Rep Power: 6
deepmorzaria is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
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.
deepmorzaria is offline   Reply With Quote

Old   April 26, 2020, 12:00
Default
  #16
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by deepmorzaria View Post
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?
FMDenaro 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
2D Lid Driven Cavity Flow simulation using MATLAB josephlm Main CFD Forum 4 August 17, 2023 20:36
Boundary Conditions for Lid Driven Cavity case (SIMPLE Algorithm) Mandeep Deka Main CFD Forum 1 April 7, 2015 08:01
2-D Lid Driven Cavity (Matlab) DaBears13 Main CFD Forum 0 May 5, 2013 04:11
is there any parallel code for the famous Lid Driven Cavity flow? gholamghar Main CFD Forum 0 August 1, 2010 01:55
Lid driven cavity flow KK FLUENT 1 December 16, 2009 18:10


All times are GMT -4. The time now is 08:09.