2D incompressible + body force

Dear All

I wrote a code to simulate flow in a slit driven by gravity. it requires only bounceback boundaries along the walls. periodic boundaries can be used in the flow direction and flow that leaves the domain reenters on the opposite end of the silt. the system effectively is infinite in length. but my code give a constant value for velocity along silt in all of nodes.
please help me in my problem.
i use Zhaoli Guo article in applying gravity.
tnx in Advance

I tested the method of sokup, and found that it dosent match with analytical solution very well.
I refer this article:" application of LBM to transition in oscillatory channel flow, By J.A. Cosgrove

Hi Sajad,
I got some problems with Guo’s and Sukop’s methods.

I tried to simulate the Poiseuille flow from Sukop’s book. I used bounce back on the vertical walls and periodic boundary conditions in the top and bottom. Re=4.4 g= 1.102e-3 tau=1 u_max=0.1 u_avg=0.667 nx = 2a = 11 lu.
I got mass conservation over all the system which is ok.
I got a good velocity profile, the problem is that the maximum velocity from the profile is not equal to the analytical maximum velocity but something close to the average velocity (0.677).

I tried Guo’s method with other Re values such 40 which leads to nx = 2a = 100 lu and I got a maximum velocity equal to 0.898 after 5000 iterations. Closer to 0.1 but still far…

Am I missing something? Probably some boundary conditions?
Did you manage to simulate Poiseuille’s flow successfully?
Does anybody have some suggestions?



Dear Raul

From the data you posted I can see no problem. Your LB solution should be close to the analytical one. Hence, I believe that your code has some bug…

If you think it helps I can send you a short Matlab code that solves your problem. (Please send me your email).

I also must say that for your flow problem either Guo or Sukop body force yield similar results. As the body force is spatially constant any recovered body force spurious terms will vanish.

In fact, the only error source keeping the LB solution away from the analytical one in this problem comes from the use of bounceback walls.
You can easily prove that by setting your relaxation time value to be kvisc=1/sqrt(48). In this case, the wall in your flow will be exactly located at 1/2 between the solid and the last fluid nodes and your LB solution will be identical to the analytic hydrodynamic solution up to machine accuracy.

I hope I have helped.



Hi Goncalo, thanks for your answer.

Actually I got the same wrong results using Guo’s and Sukop’s methods so probably it is a bug.
I will send you my email as a private message.
I appreciate your help.


Hi Goncalo,

How would you go about calculating the position of the boundary as a function of the relaxation time?


Hello Kezman

Well, what I previously wrote concerns only with the Poiseuille flow with a constant density, i.e. parabolic flow driven by a body force with periodic inlet/outlet BCs. In this simple case several authors deduced expressions for the wall location when the bounce-back boundary method is used. Examples of such authors are Tony Ladd or Irina Ginzburg. They also accounted for several wall orientations. In my previous post I assumed the wall was parallel to the horizontal lattice links. I suggest you to read for instance Ladd and Verberg paper: http://ladd.che.ufl.edu/publications/jsp_01.pdf

For the BGK model they obtained a “slip factor” beta as function of the relaxation time, tau, as:


Based on this parameter they defined the displacement, delta, of the physical to the numerical wall as:


with delta_x your lattice length and L the channel width, for instance.

I must say I am not expert at all in this issue. Therefore, I still suggest you to read the original works.

Good luck,


Just to add to Goncalo’s suggestion one equation:

H^2 = H_eff^2 + 16/3(tau -1/2)^2 - that’s the function of H which you simulate (basically), where H_eff=N_y-2. So if you put Goncalo’s suggestion you will obtain the location of the wall just in the middle.


Dear All

sorry for delay. I had exam. (especially Raul excuse me for this delay)
Sukop method for body force give good result for me with bounce back on wall. but Gue method’s results are not good. please inform me about algorithm of it and where i went wrong maybe. i read Gue articles and i think it was similar to Sulop very much and there is no difference between these two.

Dear GoncaloSilva
I read the Gue’s paper :" Discrete lattice effects on the forcing term in the lattice Boltzmann method" and i become confused about the u* and v. what’s the difference between these two velocity
(rho u*) = sum(e f) + (deltaT F)/2
(rho v) = sum(e f) + (deltaT F)/2
what is the difference between these two velocity


Hello Sajad,

Yes, I agree with you. The nomenclature in Guo’s paper is a bit confusing.


i (rho u*) is the equilibrium momentum, i.e. the velocity data that enters in the feq computation.
(ii) (rho v) is the macroscopic momentum, i.e. your hydrodynamic solution. In Guo’s model the two are the same.[/i]

So, you just have to compute the macroscopic fields once, call it rhou or rho*v and use that for feq and for your hydrodynamic solution.

I suppose the reason Guo used these two parameters was to ensure the generality of his study.
You may have noticed that other body force models are also discussed and that some of them only correct the first order velocity moment (by including the force) in the hydrodynamic solution computation. Guo demonstrates that this procedure leads to spurious terms at macroscopic level.

One last thing!
I suppose you are using Guo’s body force model because you are considering a body force that is not homogeneous.
When the body force is constant (in space and time) all body force models presented in Guo’s paper yield identical results and you can easily check that for instance in a body force driven Poiseuille flow. So if that is your case you can use simpler models.

Furthermore, if you are solving a time-independent problem I defend that Guo’s body force model does not provide consistent steady forcing Navier-Stokes equations. That fact can be proved through a multiscale expansion analysis as the Chapman-Enskog or observed in practice through the accuracy of the LB solutions. If you are interested in this issue please take a look at this paper:


Good luck with your work :slight_smile:



Dear Goncalo
tnx it was helpful, there was a bug in my code and i found it. result now is very good. as a matter of fact i should go on multi block and grid refinement. please give me a hand in if you did work previously in this Area.

Dear Sajad,

I am glad you manage to find the bug in your code.
Multi-block and grid refinement techniques are both quite interesting approaches to increase accuracy without compromising much the computational effort. However, unfortunately I have never worked in neither of these two fields.
You will have to ask someone else with a little more expertise than me :frowning:

Good luck,