Hi everybody!
I am the beginner in LBM… I need to understand it for my studying.
I am reading this book [Michael_C._Sukop,_Daniel_T._Thorne]_Lattice_Boltz
and at the page 36 I found this code which is not clear to me.
[code=“cpp-qt”]
// Computing macroscopic density, rho, and velocity, u=(ux,uy).
for( j=0; j<LY; j++)
{
for( i=0; i<LX; i++)
{
u_x[j][i] = 0.0;
u_y[j][i] = 0.0;
rho[j][i] = 0.0;
if( !is_solid_node[j][i]){
for( a=0; a<9; a++){
rho[j][i] +=f[j][i][a];
u_x[j][i] += ex[a]*f[j][i][a];
u_y[j][i] += ey[a]*f[j][i][a];
}
u_x[j][i] /= rho[j][i];
u_y[j][i] /= rho[j][i];
}
}
}
Can someone explain these lines:
[code="cpp-qt"]
u_x[j][i] += ex[a]*f[j][i][a];
u_y[j][i] += ey[a]*f[j][i][a];
and
[code=“cpp”]
u_x[j][i] /= rho[j][i];
u_y[j][i] /= rho[j][i];
any help will be apreciate!
Thank you in advance!