View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
2D Lid driven Cavity Flow

5.0 | 6 ratings Rate this file 47 Downloads (last 30 days) File Size: 3.27 KB File ID: #38089 Version: 1.0
image thumbnail

2D Lid driven Cavity Flow


Suraj Shankar (view profile)


Simulation of the 2D lid driven Cavity Flow of a Newtonian Fluid (laminar flow) using FD.

| Watch this File

File Information

Cavity flow is simulated using the pressure correction method on a staggered grid using explicit differencing for the hyperbolic terms (CD, MacCormack and Richtmyer method) while both explicit and implicit methods are considered for the diffusive (parabolic) terms. For the implicit steps, preconditioned matrices are used using LU decomposition. The Pressure Poisson equation is also solved implicitly. Neumann boundary conditions are used for pressure and Dirichlet conditions for the velocity field

Required Products MATLAB
MATLAB release MATLAB 7.10 (R2010a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (12)
19 Jan 2017 Wei Ting-Kai


03 Nov 2016 lee

lee (view profile)

21 Mar 2016 Shubham Maurya

24 Jan 2016 sigur

sigur (view profile)

I tried to set simply (u,v) = (1,0) as a test for plausibility. The result seems incorrect, due to a strange recirculation in the upper right corner.

Seems to be caused by the projection step.

Do you know how to fix that?

Comment only
21 Oct 2015 Hung Nguyen


Comment only
28 Jan 2015 Mehdi Kh

Thank you for the code.
Is it possible to have documentation of code?

Especially, defining boundaries.

For example:
- why Dirichlet B.Cs should be like " bcT(:,1)=TS/dy^2 " ?

Comment only
18 Jul 2014 Zoltán Csáti

What is the highest Re number, this code can cope with?

Comment only
19 Feb 2014 scott

scott (view profile)

19 Feb 2014 scott

scott (view profile)

05 Sep 2013 Suraj Shankar

Suraj Shankar (view profile)

The code is meant to be pedagogical in nature and has been made in line with the 12-steps to Navier-Stokes practical module, for which I would like to credit Lorena Barba and her online course on CFD.

Comment only
23 Oct 2012 Suraj Shankar

Suraj Shankar (view profile)


Comment only
15 Oct 2012 Mike

Mike (view profile)

very good

Contact us