# Halfway Bounce back algorithm

Dear all,

I’m Working on a 2-D SCMP LBM. my code works well with periodic boundary condition. but when I applied Bounce back in up and down boundaries, the results are incorrect. so I have decided to use “Halfway Bounce back” scheme. I searched a lot in literature, but I could not find a clear algorithm for this scheme.

I will be great full, if anybody can share this scheme’s algorithm.

Thanks

The main difference between “half-way” and “full-way” bounce-back is that the boundary nodes are “wet” in the half-way bounce-back, i.e., the collision step is applied on the boundary nodes as well.
So if we consider the following node in 2D (note that opposite directions have consecutive numbers):

``````
7 3 5
\|/
2-0-1
/|\
6 4 8

``````

If we consider the bottom wall, f3,f5,f7 are unknown (they are coming from outside of the domain), while f0,f1,f2,f4,f6,f8 can be streamed fine from the inside of the domain. I should point out that I like to consider the streaming with a “pull” scheme where the distribution functions come from the neighbouring node to the current node, instead of a “push” scheme where the distribution from the current node are written to the neighbouring node. (but both schemes are equivalent)
So instead of streaming f3,f5,f7 from outside of the domain, they are simply replaced by the local opposite distribution functions of the previous step (before streaming).

``````
f3(x,y) = f4(x,y)
f5(x,y) = f6(x,y)
f7(x,y) = f8(x,y)

``````

The collision step is then applied on all the nodes as usual.

Nic

I found this explanation apt. @nicolas : have you tried same algorithm on shan pseudopotential model. I m facing issues with applying bounce back and force on same node.

Hi there,

The Shan/Chen interaction force essentially involves the spatial gradient of the pseudopotential, which is approximated by the weighted sum of the pseudopotential at points surrounding the grid point (node) in question.

If the node is at a boundary, you wouldn’t have the pseudopotential for some of the lattice directions. To get around that, you would need to use an alternative expression for the gradient that extends into the bulk fluid. This can be worked out by using Taylor expansions of a function at both x+h and x+2h - where h is the grid spacing - and finding some combination to give the gradient df/dx as an expression involving f(x+h) and f(x+2h).

Hope this helps!

Michael

The nodes are not at the boundary but halfway away from them. I’m working on multi-component so the adhesive force is in terms of greens function. Hence, I think I can’t use the taylor series here.

Dear AMirLB,

As you used Periodic Boundary Condition, could please explain it to me or show with a clear algorithm for this scheme. Thanks alot

Dear AMirLB,

As you used Periodic Boundary Condition, could please explain it to me or show with a clear algorithm for this scheme. Thanks alot

Nic, thanks for the information.

I have two questions.

First it appears that the half-way bounceback occurs via the same algorithm as full way standard bounceback, the only difference being that we “think” of the wall halfway between (so a total of 1 less lattice cell across a 2D gap) for purposes of Re and physical node location.

Second, can we then say that the average of the two nodes, dry and wet, should be zero, to within discretization and approximation error? And thus the dry node be negative velocity?

I am weary to think of it so simply since I have implemented just about every other type of BC and only one was this simple (the standard BB).

Hello Everyone,

I am trying to simulate Lid-driven cavity using LBM. I used half way boundary condition for bounce back on stationary walls (which is working well). I am interested to implement extrapolation scheme given by Chen (1996) for top plate moving with some velocity U0. But I am confused about how to implement it. Can anyone help please. Thanks in advance

Dear myty,

As you say that you have used half-way bounce back Boundary Condition, could you please explain it to me or show with a clear algorithm for this scheme. My main problem is how to create the half-way configuration that is mean how can i fixe the boundary in half-way from the end node. please if you have a simple fortran code gived to me and i will be so gratful.Thanks a lot.