Dear all,
I have been trying to write a LBM code for convective flow inside a square cavity with nonBoussinesq approximation but it seems certain problem with the algorithm. If anyone can help me out with this…
Algorithm followed:

Macroscopic variables at time step “t” are solved by usual LBE with collision and propagation procedure. The force term is included in the collision step: F=((3w_f[k]RiprprReRe*(rhos[i][j])rhost)ey[k])/(16eps);

With the available temperature at every lattice nodes, the dimentional temperatures at those lattice points are obtained:
temp[i][j]= (th[i][j]*(ThTl))+Tl;
where, th[i][j] are nondimentional tempeeratures and Th and Tl and dimensional hot wall and cold wall temperature. 
New densities are calculated : rhos[i][j]=(1.0(beta*(temp[i][j]T0)));

New velocites are calculated: uxs[i][j]=uxsum/rhos[i][j];
uys[i][j]=uysum/rhos[i][j];
However, I am unable to get the correct results.