# Inamuro Boundary Condition

Dear all,

I have a problem with boundary conditions in LBM,

In the case of non-slip boundary conditions, I used the method of Inamuro in poiseuille flow. The results were not bad, but I want to make sure how this method works.
As we know in this method the unknown distribution functions are assumed to be an equilibrium distribution function completely like f (eq), but we add a slip velocity to our simulations.

But are these equilibrium distribution functions constant for all time steps? Or should we put them with their equations (Us and Rho’ ) inside the loop? (I did that and the velocity profile of the channel became wrong),

So I defined them as constants. for the case of poiseuille flow, the wall velocities are zero and the f (eq) quantities become 2.2 and 0.56 for all time steps.

Is it true or I misunderstood it?

Thanks and good luck

you misunderstood. us and rho’ must be recomputed at each time step because they depend on incoming f’s. read the 1995 Inamuro paper on this, as it is pretty straightforward.

Ouch, Thank you very much,

Now I understand it, I had used all the fi’s as f (eq) in the definition of Us and Rho’.

I am really happy to find this forum, can I ask another question?

I have also used other wall boundary conditions for the poiseuille flow with periodic BC.

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.

then I used the bounce back with the following expression at the boundaries
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)

which I think called modified bounce back.

Now my first question is that am I right?

The second is that how can I use half-way bounce back? In the previous methods the nodes are placed at the boundaries, as we know in the half-way bounce back the boundaries are between the nodes. But I can’t perform it in my code , my code is completely similar to my first expression for the first node which I assume it half a grid distance from the boundary and my nodes are n-1 instead of n,

f_2(y=1)=f_4(y=0) , f_5(y=1)=f_7(0) , f_6(y=1)=f_8(0)

So, can anyone help me about this? is it true? if not what did I do wrong?

Thanks a lot

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

Hi,
Thank you very much for your help

Can I ask you another question?

My code is in Matlab and as you know I work with matrices in it. For example for a simple channel I define a 100-by-51 matrix and fill its elements as lattice nodes. So the channel width will be 49 (+ 2 columns for up and down boundaries). In this case how can I define the boundaries to be placed between the nodes?

For half-way bounce back is it enough to use your definition at the boundaries? Or I should find a way to define the boundaries between the nodes too? If it is yes, how should I define the boundaries between the nodes since I am working with matrices to define the geometry?

Thanks a lot

So the channel width will be 49 (+
2 columns for up and down boundaries).
In this
case how can I define the boundaries to be placed
between the nodes?

The width of your channel is of 49 if you place the wall on the last bulk node. In fact you can put the wall wherever you want. It is just a matter of interpretation. In the case of “fullway” bounceback for example. The situation is the following (x is the BC node, o the bulk, | the position of the wall and ---- the link between the nodes)

x----o----o

The simulation does not know where is the wall. It can be placed on ANY place between “x” and “o” :

x-|—o----o, or x–|--o----o, or x----|o----o, …

Then it’s up to you to decide where you want the wall to be put. It happens that the simulation is lot’s more accurate if you say that the wall is exactly in between the BC and the bulk node. Therefore in your case the width of your channel will be of 50 (51-2*0.5).

For half-way bounce back is it enough to use your
definition at the boundaries? Or I should find a
way to define the boundaries between the nodes
too? If it is yes, how should I define the
boundaries between the nodes since I am working
with matrices to define the geometry?

For halfway bounce-back you don’t need to change a thing, again the only thing that changes is how you interpret your result. In this case to get the better results you have to place the wall halfway after the BC node :

|–x----o

Just to point that out once again. The simulation is not aware by itself of the position of the wall. It can be placed anywhere. This is you who is responsible for that when you analyze your results.

Thank you so much Orestis

I think I got it,

But at the end, when I want to get the results, for example the velocity profile of the channel, how can I have the velocity at the boundaries when they are placed between the lattice nodes? How can I show that the velocity at the boundary is zero for half-way bounce back? We can attain the velocity profile from nodes, so what will happen at the boundaries when they are not on lattice links?

Again, thank you for your guides

To get the information on points which are not on the nodes of the lattice, you have to interpolate the information from the nearest neighbours.

Oh, Thats right

But in my code, at both full-way and Half-way bounce back, the velocity is zero at the BC node, in full way bounce back the BC node is placed on the boundary and so the velocity at the wall will be zero, but in half way bounce back the BC node is outside the channel and after interpolation the velocity at the wall will not be zero.

Is it true or my code is wrong?

Thanks a lot

Hello,

I’m sorry to ask a lot of questions,

But in the case of Inamuro boundary conditions, it is said that the nondimensional results do not change by changing the relaxation time (TAU).

for example it is said that the non-dimensional velocity profile in poiseuille flow is the same for all the values of 0.7<TAU<20.

but in my code, the profile depend on the value of TAU and is more like the case of bounce-back profile.

I have checked my equations many times and they seem true,

So what is wrong?

Hi,

about your bounce back question. When using the fullway bounce-back, you cannot compute the velocity on the bounceback node, because there are unknown distribution function (not physical). If you nevertheless compute it, you may get a zero velocity and therefore think that it has given you the correct velocity, but if you look at the entire profile it should not have the right shape. Furthermore when computing the error you should get only first order accuracy if you place the wll on the BC node.

When dealing with halfway bounceback, here you can compute the velocity, and it should not give zero. Therefore I suspect some “bug” in your code. But there is a remark that puzzles me. You say that in halfway bounceback the BC node is outside the domain. But in fact it’s not. The BC node is IN the domain (bulk) and the position of the wall is half a cell distance from this node (like sktched in a previous pot).

for example it is said that the non-dimensional
velocity profile in poiseuille flow is the same
for all the values of 0.7<TAU<20.

but in my code, the profile depend on the value of
TAU and is more like the case of bounce-back
profile.

The non dimensional velocity profile is related to the reynolds number. Tau is related to the viscosity. Therefore changing tau will change the reynolds number (provided you do not change any other parameter of the reynolds number). Therefore it seems natural to me, that the poiseuille profile will change when changing tau.

Thank you very much Orestis,

for my first question, Consider the boundary on the nodes for full way bounce back. then for example for the bottom wall we have f_2(y=0)=f_4(y=0) , f_5(0)=f_7(0) , f_6(0)=f_8(0)

now if we place the wall between nodes(y=0) and nodes(y=1), then for which of the nearest nodes to the wall should we use the bounce back equation? (y=0) or (y=1)?

for my second question, Thanks a lot !!

Hi,
for the fullway bounce back the formula is rather (at y=0)

swap(f_1,f_3), swap(f_2,f_4), swap(f_5,f_7), swap(f_6,f_8).

Then the wall is located at y=0.5.