Monday, 3 April 2017

Lid Driven Cavity - Mini Project (Post 1)

Lid Driven Cavity - Post 1

The following series of posts starting from this one gives you my approach in solving the Lid Driven Cavity , the numerical methods used and my collection of results up to Reynolds Number = 3200 . 
The series of posts also gives you my results in comparison with standard results that already exist for the problem such as the Ghia Ghia and Shin.  
This post gives you an outline of the approach used in solving the problem.
Before discussing the methods involved ,let me give you a brief introduction to what the problem actually is about. This problem is a standard benchmarking problem for testing any new software,code,etc. This consists of a rectangular or square cavity (2D or 3D) ,for now consider it to be a 2D square cavity whose top side is of infinite length driven with a constant velocity.
Image Courtesy : http://www.nacad.ufrj.br/~rnelias/gallery/cavity.html

Numerical Approach 

This problem has been solved using using the Stream Vorticity approach.
  •  The Navier Stokes Equation has been solved using  Point Successive Over  Relaxation method.
  • The Vorticity function has also been solved using the PSOR method.
  • The Velocity functions have been solved by straight forward Central differencing scheme . 

  Algorithm used for Solving

  1. Assuming a specific grid size  $N_x,N_y$  (best if they are equal).
  2. Construct matrices for $\psi , \omega ,u,v$ using the above mentioned size using random values (best if values are zeros.)  
  3. Assume appropriate boundary conditions for $\psi , \omega ,u,v$ . 
  4. Solve for $\psi$ using the PSOR method using Vorticity function .
  5.  Compute $u,v$ using central difference scheme .
  6. Iterate the PSOR method for $\omega$  using Navier Stokes Equation (using the presolved $\psi,u,v$ .
    (Note : Don't solve for $\omega$ just run the PSOR over the entire grid just once.) 
  7. Compute necessary Error Functions. Check for convergence.
  8. If converged , STOP. Else go to Step 4.  

Note :
 In the above algorithm I haven't Explicitly mentioned what those Error functions are,there are many methods to check convergence . But I have mainly used four Parameters ,namely:
  • Error 1 :RMSE $\left ( \frac{\psi  ^{k+1} _{i,j} -\psi  ^k _{i,j}}{\psi  ^k _{i,j}} \right )$ (where k is the iteration number)
    Variable name used in my code ("err").
  • Error 2 :RMSE$\left ( \frac{\omega  ^{k+1} _{i,j} -\omega  ^k _{i,j}}{\omega  ^k _{i,j}}\right )$ .
    Variable name used in my code ("err1")
  • Error 3 : Numerical solution accuracy of Vorticity equation .
    Variable name used in my code ("ERR1")
  • Error 4 : Numerical solution accuracy of Navier stokes equation .
    Variable name used in my code ("ERR2")
It is necessary to note that out of these error parameters , Error 4 is the dominant parameter , this parameter would be used in monitoring the accuracy of the numerical scheme as well as convergence.

The following post would consist of the derivation of the stream vorticity functions , the math of the numerical schemes deployed. For now as a motivation for you to continue reading my blog I give you a beautiful graph of the vorticity contour solution for the $R_e = 600$.

Note: I still haven't introduced as of now the numerical schemes employed in Elliptic,hyperbolic PDEs (check timeline of blog),  which I soon hope to,but as of now I would explicitly mention the Numerical schemes used in the code.

No comments:

Post a Comment