×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

2D Lid Driven Cavity Flow simulation using MATLAB

2D Lid Driven Cavity Flow simulation using MATLAB

2D Lid Driven Cavity Flow simulation using MATLAB

(OP)
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?

http://files.engineering.com/getfile.aspx?folder=92493740-11a0-45fd-925b-88ac63bda83c&file=DC_lum_lee.m

RE: 2D Lid Driven Cavity Flow simulation using MATLAB

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources