  In this paper, the driven cavity problem was solved using finite difference
scheme in stream function-vorticity formulation. A variable grid is adopted to
capture more details and information in the area nearby the wall. The
Navier-Stokes equation is rewritten as a particular form suitable to the
variable grids. In simulation, Reynolds number is set 100 as an example. The
velocity, vorticity and streamline contour are produced by the CFD scheme
developed in this paper and then are compared with those by Ghia et. al. (1982)
to validate this numerical scheme. It shows that the numerical CFD scheme
developed in this paper works very well for both uniform grids and variable
grids. The numerical tests with different grids setting show that a) the
variable grids have advantages in capturing the reversed flow and separation
bubbles produced in the corners associated with a good efficiency, b) the
numerical schemes with symmetric and dense grids gives a more accurate solution
than those with non-symmetric and sparse grids, and c) both the vorticity and
stream function have a better accuracy than velocity.
