Dear all

I want to implement combination of the bounce-back and specular-reflection B.C in my code . i have studied several papers such as :“A boundary condition with adjustable slip length for lattice Boltzmann simulations Nayaz Khalid Ahmed1 and Martin Hecht2 . Stat. Mech. (2009) P09017” and “PHYSICAL REVIEW E 76, 056704 2007 Discrete effects on boundary conditions for the lattice Boltzmann equation in simulating

microscale gas flows, Zhaoli Guo,1,* Baochang Shi,2 T. S. Zhao,3 and Chuguang Zheng.”

they have mentioned that slip velocity is independent from body force.“The accelerating force is varied by factors of a

few hundreds, but this does not affect the slip length calculated in all cases, when the slip parameter is kept constant.”

I want apply this B.C to both upper and lower channel’s walls but in my code slip velocity varies with changing body force.

can you help me to find bug in my code?

is my B.C correct for both of upper and lower wall?

if (ob[i][j]==1.){//if solid then apply combination of the bounce-back and specular-reflection

//r being the bounce-back fraction

```
n1 [i] [j][1]=r*n1temp[i][j][3]+(1.-r)*n1temp [i][j][1];
n1 [i] [j][2]=n1temp[i][j][4];
n1 [i] [j][3]=r*n1temp[i][j][1]+(1.-r)*n1temp [i][j][3];
n1 [i] [j][4]=n1temp[i][j][2];
n1 [i] [j][5]=r*n1temp[i][j][7]+(1.-r)*n1temp [i][j][8];
n1 [i] [j][6]=r*n1temp[i][j][8]+(1.-r)*n1temp [i][j][7];
n1 [i] [j][7]=r*n1temp[i][j][5]+(1.-r)*n1temp [i][j][6];
n1 [i] [j][8]=r*n1temp[i][j][6]+(1.-r)*n1temp [i][j][5];
}// if ob==1
```