Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

2D Lid Driven Cavity Flow simulation using MATLAB

Status
Not open for further replies.

josephlm

Mechanical
Feb 23, 2010
1
I have been trying to simulate the 2D lid driven cavity flow using the SIMPLE algorithm on the staggered grid, in which velocity is assumed to be coupled with pressure and momentum equations are iterated and u, v and pressure p are corrected by a correction term u_corr, v_corr and p_corr respectively. The looping stops when p_corr decreases to a sufficiently small value.

However, the flow obtain does not seem to look like how it should look like, i.e. a main vortex at the centre with counter vortices at the bottom corners. It would appear that I have a problem with the correction terms, u_corr, v_corr and p_corr being too small, but i checked the discretized equations over and over and they seem to be correct..

Would appreciate any help rendered to take a look at my code and see what could have been the reason for this?

 
Replies continue below

Recommended for you

Hey josephlm,

I'm sorry i haven't used Matlab so some of the syntax didn't make sense to me. I have a few general observations that you might consider though.

1) Assuming the code all runs properly, have you solved using grids of greater resolution to check that you've optimised your mesh spacing. Run with double the mesh density and see whether your numbers change significantly? You should be able to compare values at the same point as the original (21 x 21) grid and then see if this has any influence.

2) For a 2d lid problem - is this a cross section of cylindrical problem? If so you might want to consider that V=r * omega where omega is the rotational velocity. i.e. i think you've assumed a constant velocity across the lid whereas i think it increases radially.

3) check how you've applied boundary conditions, is there a singularity between the edge (wall) and first node of the lid?

4) you are using pressure to check convergence, try using other parameters or a combination of them. you are also using fairly small numbers for a coarse grid, is the 'solution' bouncing around due to discretisation errors - try printing off the values at a few nodes to see what's happening as the 'solution' iterates.

You could also think about using a non-uniform mesh near the lid region since that's the area where all the action is (initally). Check out

P.J. Roache - Fundamentals of Computational Fluid Dynamics
An old book (1972) but still pretty good explanations.

Fletcher - Computational Techniques for Fluid Dynamics, two volumes both with loads of good stuff, well explained.

I'm afraid the vintage of both books reflects on how long ago it was when i last did any CFD but worth a look.

Regards, HM

No more things should be presumed to exist than are absolutely necessary - William of Occam
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor