Hi,
First I used the following expression at the
boundaries ( y=0):
f_2(y=1)=f_4(y=0) , f_5(y=1)=f_7(0) ,
f_6(y=1)=f_8(0)
which I think called bounce back.
This is not bounce-back!
“Fullway” Bounce-back is the reflexion of ALL f’s on the node.
swap(f_1(y=0),f_3(0)) , swap(f_2(y=0)=f_4(0)), swap(f_5(y=0),f_7(y=0)), swap(f_6(y=0),f_8(y=0)).
Then you skip the usual condition (you directly apply the propagation step after the swapping). This BC is usually first order accurate (you only make the accuracy twice better when doubling the number of nodes). But for the special case where you put the wall exactly halfway between the BC node and the first bulk node, it becomes second order accurate (you increase the accuracy by a factor 4 when you increase the resolution by a factor 2).
x–|--o----o
This is the “second order” fullway bounce back position of the wall (x is the BC node, | the position of the wall, and o a bulk node).
The halfway bounceback is given by the followin formula (y=0, and therefore the unknown populations are number 2, 5, and 6 according to your numbering).
6 2 5
\ | /
3----0----1
/ | \
7 4 8
f_2(y=0)=f_4(y=0) , f_5(0)=f_7(0) ,
f_6(0)=f_8(0)
This formula is “almost” correct for halfway bounce-back. But you “bounceback” the f_i^(out) of the previous timestep (if the current time is t=t_0)
f_2(y=0,t=t_0)=f_4(y=0,t=t_0-1),
f_5(y=0,t=t_0)=f_7(y=0,t=t_0-1),
f_6(y=0,t=t_0)=f_8(y=0,t=t_0-1).
Then you apply the normal collision step. For this BC to be second order accurate you have to place the wall “after” the BC node.
|–x----o
The idea of the halfway bounceback is that the f_i leaving the domain are traveling up to the wall bouncing back and reentering in the fluid.
I hope things are a bit more clear. If not do not hesitate to ask more questions.
Orestis