Extrapolation boundary conditions

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.

  1. 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.
  2. 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.
  3. 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;
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;

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;
f_1[i][0][5] = f_1[i+1][1][7];
f_1[i][NY-1][8] = f_1[i+1][NY-2][6];
f_1[i][0][2] = f_1[i][1][4];
f_1[i][NY-1][4] = f_1[i][NY-2][2];
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.0
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
// 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];

ok, i’m going to answer this one, even though i’m not on the “wish list”. the code looks good, but i feel it’s impossible to debug by just staring at it. to debug yourself simply run anyone else’s code such as these ones. then check step-by-step to see if your code finds the same results. and sure you can use guo’s boundary condition for cylinder flow. why not?

Thanks Adam,
Thanks a lot, i recently develop codes for circular cylinder (single and tandem arrangement) using c++, to calculate the drag and lift coefficients. I not find a code on net to calculate all those like drag, lift, vorticity etc. I have such codes now my own but still i find some instabilities like i use the convergence criteria but its’ reached to convergence state very soon and even up to 150 Reynolds numbers i not find any disturbance. Thanks again my friend Adam.
If you have any experience in c++ and would like to check my code i can send to you the complete code.
Good luck and bye for now.

1 Like

Dear Mr Shams
please check your inbox at forum.
sincerely yours

hi shams
Can I have the code minutes Thank you