# No-slip velocity at wall in LBM sample codes

Dear all

When checking the sample codes of the 2D flow past a cylinder I noticed that the velocity (u and v components) on the wall nodes are not zero. (I checked both Matlab and Fortran versions). If I understood correctly, the boundary conditions used at the walls are full-way bounce-back BC, according to this website nomenclature, or also named as on-grid bounce-back according to Succi’s book nomenclature. Fist question: Although with different names these boundary conditions are the same, aren´t they?

In my opinion the fact that the no-slip velocity at the wall is not attained is because a periodic BC is imposed along the domain edges when performing the streaming step. When I remove these periodic conditions I get the expected zero velocity.
Moreover, If I displace the wall node velocity to a location 1/2 inside the fluid domain I also get the correct shear stress.
Second question: Is my reasoning correct? I read somewhere in this forum that someone (I believe it was Tim, if not I apologize) used periodic bc conditions in all boundaries and after that, over them, superimposed the right boundary conditions, i.e. the ones that he wanted to have in his flow. I am not sure but I think that by doing this, in this specific order, one might end up having incorrect results.

My final question has nothing to do with boundary conditions.

As much debated in this forum when one has a constant force acting in the flow it is unanimous that the following simple expression for the body force term can be used: Fi=wieiF/cs^2.
Now my question is how fluid velocity is defined.
Everyone defines the fluid velocity as being equal to the “equilibrium” velocity (i.e. the velocity used in the equilibrium distribution computation).
But in Buick and Greated article “Gravity in a lattice Boltzmann model” it is said that the fluid velocity is different from the equilbrium one in 1/2*F. I think that in Ladd’s paper “Lattice Boltzmann Simulations of Particle-Fluid Suspensions” the same is said.

I performed computations using both velocity definitions and found out that, for instance, keeping all parameters constant except tau, the Buick’s definition is better for small tau’s, i.e. below 1, while the traditional definition is better for tau>=1.
I also substituted both definitions of the fluid velocity in the mass and momentum conservation equations, which resulted from the Chapman-Enskog procedure applied to the LB equations with this particular forcing term, and found out that Buick’s definition yields the exact continuity equation but also more extra artificial terms in the momentum equations than with the traditional velocity definition. However, this traditional velocity definition does not yield a correct continuity equation if div(F) is different from zero.

Thanks in advance for the help.

Goncalo

Hi Goncalo,

It was really me using a periodic structure and velocity boundary conditions. The point is that the periodicity has no influence in my case. Everything leaving the numerical grid (> LX and < 1) reenters at the other side, but the velocity boundary conditions overwrite the entire information at the inlet (x = 1) and outlet (x = LX) at each time step. Since the populations only propagate one lattice node in each time step, there is no problem. The reason why I did this: I had a periodic code and I didn’t want to modify it too much. But the results are the same.

Concerning the body force: Right now I am performing simulations with red blood cells in a channel. The acting forces are highly inhomogeneous and vary strongly in time. I have seen that the traditional definition of the force leads to instabilities, whereas I do not observe problems using the definition by Guo et al. (2002). I have also experimented with the definition of the velocity, but at this point I am not completely sure, whether my immersed boundary method code is really correct.
Do you know a paper (beside that by Guo et al.) where the velocity issue is discussed?

Best,
Timm

Hi,

Yes, I think that full-way bounce-back, as described on LBMethod.org, is identical with on-grid bounce-back in Sauro Succi’s book. On such a boundary node, the usual lattice Boltzmann collision is replaced by a bounce-back operation (assign to each f the opposite value). After this, a normal streaming step is performed. In this case, it doesn’t really matter if streaming is periodic or not, because all information coming from inside the domain is scattered back into the domain, and all domain coming from outside the domain (no matter whether it is random or if it is determined by periodicity) is scattered back outside.

To be more accurate, I should say that the periodicity vs. non-periodicity issue doesn’t matter as far as the overall evolution of the fluid in the bulk is concerned. It does matter if you try to extract information directly from the bounce-back node, for example by computing the velocity from the particle populations on the node. However, I don’t think that it is actually possible to extract hydrodynamic information from a bounce-back node. First of all, as you have noted yourself, it is unclear what value should be attributed to the unknown f’s (Should they be computed by periodicity of the computational domain? But this only works if the flow is symmetric, right?). Even more importantly, there is no theory to support the claim that the quantity sum_i f_i c_i corresponds to the fluid velocity on a bounce-back node. Usually, the correspondence between LB variables and macroscopic quantities is made through a multi-scale expansion, which is based on the assumption that the cell performs a BGK (or MRT or whatever) collision. Full-way bounce-back does however not perform such a collision and therefore does not fit within the theory.

My personal approach is to consider a full-way bounce-back node as a node which is outside the fluid (and on which the fluid velocity is therefore undefined), and which has the effect to produce a flow with zero velocity at a position half-way between the bounce-back node and the next fluid node (this is a fact which is known mainly from numerical experiment, and also from analytical solutions of the LB scheme in a few simple geometries).

Hello,

It is really interesting what you said Jonas. I think I read the Boundary Conditions explanation, which is present in this web page, like a million times and it never came into my mind the explanation that you gave me Now everything is pretty clear

Regarding Tim’s comment. If I understand correctly red blood cells in a fluid can be modeled as particle suspensions. So this article, which you possible already know, may be useful:

Lattice-Boltzmann Simulations of Particle-Fluid Suspensions. Journal of Statistical Physics ,Volume 104, Numbers 5-6 / September, 2001, pp 1191-1251, DOI 10.1023/A:1010414013942

It explains everything in a really thorough way. Moreover, in pages 1220-1221 the author explains why he considers the fluid velocity to be u+g/2. According to him this yields a velocity that is an average of the velocity before and after the forcing term is applied. I buy his explanation! But after reading other papers (where a body force is used) it seems to me that no one else really cares…

The paper by Buick and Greated (description below) is also specifically devoted to the study of body forces in LBM. You possibly also know this paper as well… Nevertheless, it has some interesting discussions on different approaches to account for a body force in a LBM.

Gravity in a lattice Boltzmann model. Phys. Rev. E 61, 5307 - 5320 (2000)

I also think that in Jonas’ thesis the body force subject is discussed (in which results similar to Guo are achieved). I do not know however if any simulation is performed with the body force presence. I do not know more articles where this subject is studied. If I find some more papers I will say something

Best regards and once more thank you for the help

Goncalo

Hello Goncalo,

thank you for the references!
The paper by Ladd and Verberg is not really of use to me, since the implementation of red blood cells in the flow is completely different. But I was not aware of the paper by Buick and Greated. Maybe it contains some relevant information.

Bye,
Timm

I am sorry Jonas. One last question regarding the bounce-back scheme, now the momentum correction one.
Is this scheme equal to that of Ziegler’s paper “Boundary Conditions for Lattice Boltzmann Simulations”? To me they seem equal however, in Ziegler’s paper he assigns the boundary location as being exactly at the wall node and not half way into the fluid domain.

I implemented his approach (also placing the wall at the last node) and compared it against the full way bounce-back for a D2Q9 poiseuille flow (constant body force, periodic inlet/outlet, Re=10, Ma=0.1 and tau=0.9 and 0.1). As a result I found that the last scheme (named in Ziegler’s paper as “reinterpreted bounce-back condition” ) always yielded much more accurate results than Ziegler’s one, which contradicts his paper!
To your knowledge do you have any idea concerning the accuracy differences of the full way and the momentum correction bounce-back schemes.

Thank you a lot for helping me once more

Goncalo

I don’t know Ziegler’s paper, unfortunately. As a last remark, let me insist once more on what it means for a wall to be half-way between two nodes. This information has not necessarily an impact on how you implement the simulation, but rather on how you interpret the results (the coordinates must be shifted by 1/2 in lattice units). Let me link to this forum thread which contains an in-depth discussion.

The force term presented in my thesis is the Guo one, it’s not an alternative force term. Let me clarify the technical details of this scheme. If we call u the quantity related to the moment of the particle populations (u=1/rho sum_i c_i f_i), then the “physical velocity” (the one which matches the velocity in the Navier-Stokes equations) is u+F/2, and the “equilibrium velocity” (the one used to compute the equilibrium distribution) is also u+F/2. Furthermore, this scheme makes use of an external force term, which contains a projection of the tensor ((u+F/2)F + F(u+F/2)) onto the lattice tensor Q_i.

Hello,

Thanks for your answer Jonas. I read the forum discussion that you suggested me. Although interesting it did not find an answer to my question concerning what was the bounce-back scheme that has better accuracy (the full way or the halfway) for simulating no-slip BC. Maybe my question has no answer in general…

Regarding my first statement in this post where I say:

" I performed computations using both velocity definitions and found out that, for instance, keeping all parameters constant except tau, the Buick’s definition is better for small tau’s, i.e. below 1, while the traditional definition is better for tau>=1."

It is incorrect!! Because I was computing moments in the bounce-back nodes. After Jonas explanation I repeated my simulations and, as in fact it should be expected, for a body force driven periodic poiseuille flow both fluid velocity definitions yield exactly the same results! I hope not have mistaken anyone…

Goncalo

Unfortunately, once more I have to correct myself.
What I said in the begging of this post was in fact correct. The reason for the confusion in my previous post was because the differences in the L2 norms were not as big as they were initially. Nevertheless, they still exist…(It was a fortunate combinations of parameters Ma, tau, LY, etc… that lead me to a wrong conclusion because in general L2 norms will have different values)

So summarizing this fluid velocity subject:

2 approaches can be followed:

1. The fluid velocity is considered to be equal to equilibrium velocity
2. The fluid velocity is considered to be equal to equilibrium velocity plus one half the acceleration magnitude, i.e. the force over the density.

The conclusions described in my first post still remain valid.

I hope have putting an end to all this my confusion

Goncalo

Dear GoncaloSilva
I meet the same problem with you at cylinder.m, unfortunately I have been not modifed it successfuly. and can you send me by email modified cylinder.m,. thank you in an advance. my email tywoyangda@126.com.