Hi My name is shams,
I read a lot of things about LBM from this forum. This is very very informative side regarding to LBM problems.
Dear all i have some questions if any one like to give the answers.
- The extrapolation boundary conditons of Guo et al.(2000). Can we apply these boundary conditions for stationary circular cylinders.
Means for the flow around a circular cylinder. Because i find that these boundary conditions recently apply for the oscillatory circular cylinders. - I develop a code using the incompressible Navier stokes equations proposed by Guo et al. Where no density and from the distribution function they find out the velocity components and pressure.
- I like to post here the streaming step, some boundary conditions, inlet and outlet boundary conditions. This i write for the flow past a circular cylinder. Can any one tell me that these streaming, boundary, inlet and outlet boundary conditions are correct or not. I need a help from some one to check for me the following functions. Especially i would like Janas Lott, Morton Thomas and Orestis help me.Thanks in advance to every one.
void streaming(int wall[NX][NY], int wb[NX][NY])
{
int i,j;
for(j = 1; j <= NY-2; j++){
for( i = NX-3; i >= 0; i–) f_1[i+1][j][1] = f_1[i][j][1]; // 1-direction
for( i = 2; i <= NX-1; i++) f_1[i-1][j][3] = f_1[i][j][3]; // 3-direction
}
for(i = 1; i <= NX-2; i++){
for( j = NY-3; j >= 0; j–) f_1[i][j+1][2] = f_1[i][j][2]; // 2-direction
for( j = 2; j <= NY-1; j++) f_1[i][j-1][4] = f_1[i][j][4]; // 4-direction
}
for(j = NY-3; j >= 0; j–){
for( i = NX-3; i >= 0; i–) f_1[i+1][j+1][5] = f_1[i][j][5]; // 5-direction
for( i = 2; i <= NX-1; i++) f_1[i-1][j+1][6] = f_1[i][j][6]; // 6-direction
}
for(j = 2; j <= NY-1; j++){
for( i = 2; i <= NX-1; i++) f_1[i-1][j-1][7] = f_1[i][j][7]; // 7-direction
for( i = NX-3; i >= 0; i–) f_1[i+1][j-1][8] = f_1[i][j][8]; // 8-direction
}
}
// symmetric bc: j=1 and NY-2 is the symmetry lines.
void bc_symmetry()
{
int i;
for(i=0;i<=NX-1;i++){
f_1[i][0][2] = f_1[i][2][4];
f_1[i][0][5] = f_1[i][2][8];
f_1[i][0][6] = f_1[i][2][7];
f_1[i][NY-1][4] = f_1[i][NY-3][2];
f_1[i][NY-1][7] = f_1[i][NY-3][6];
f_1[i][NY-1][8] = f_1[i][NY-3][5];
}
//periodic boundary condition
void bc_periodic()
{
int i;
for(i=0;i<=NX-1;i++){
f_1[i][0][2] = f_1[i][NY-2][2];
f_1[i][0][5] = f_1[i][NY-2][5];
f_1[i][0][6] = f_1[i][NY-2][6];
f_1[i][NY-1][4] = f_1[i][1][4];
f_1[i][NY-1][7] = f_1[i][1][7];
f_1[i][NY-1][8] = f_1[i][1][8];
}
}
//bounce-back boundary condition for wall(channel) between 0 and 1 or between NY-2 and NY-1
void bc_bounceback()
{
int i;
for(i=0;i<=NX-2;i++){
f_1[i][0][5] = f_1[i+1][1][7];
f_1[i][NY-1][8] = f_1[i+1][NY-2][6];
}
for(i=1;i<=NX-2;i++){
f_1[i][0][2] = f_1[i][1][4];
f_1[i][NY-1][4] = f_1[i][NY-2][2];
}
for(i=2;i<=NX-1;i++){
f_1[i][0][6] = f_1[i-1][1][8];
f_1[i][NY-1][7] = f_1[i-1][NY-2][5];
}
}
void bc_inlet()
{
int i,j;
i=0; // inlet bc
for(j=1;j<=NY-2;j++) {
f_1[i][j][1] = f_1[i+1][j][3] + 6.0rho[i+1][j]w1ui;
f_1[i][j][5] = f_1[i+1][j+1][7] + 6.0rho[i+1][j+1]w2ui;
f_1[i][j][8] = f_1[i+1][j-1][6] + 6.0*rho[i+1][j-1]w2ui;
}
}
void bc_outlet()
{
int i,j,k;
i=NX-1; // downstream bc
for(j=1;j<=NY-2;j++){
for(k=0;k<=8;k++){
// f_1[i][j][k] = 2.0*f_1[i-1][j][k] - f_1[i-2][j][k];
f_1[i][j][k] = f_1[i-1][j][k];
}
}
}