CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Lid driven cavity problem (https://www.cfd-online.com/Forums/main/109976-lid-driven-cavity-problem.html)

thegodfather December 1, 2012 23:59

Lid driven cavity problem
 
I'm trying to develop a finite volume stream function vorticity based solver for a lid driven cavity problem.. I want to use first order upwind scheme for discretization of the advection term... But to use it, the direction of velocities at all cell faces are to be known before hand... How do I incorporate this in my code? Plus, how do I determine the values of velocities at cell faces from cell centre velocities? Is it ok to do linear interpolation for that?

FMDenaro December 2, 2012 04:37

you can use linear interpolation, for example for a generic transport equation, the flux component along x writes

u_face_west = 0.5*(u(i-1,j)+u(i,j))
u_plus = 0.5*(u_face+|u_face|)
u_minus = 0.5*(u_face-|u_face|)
flux_west = u_plus*Phi(i-1,j) + u_minus*Phi(i,j)


All times are GMT -4. The time now is 22:06.