Wrong velocity profile in poiseuille 2D

Hi guys i’m quite new to Lattice Boltzmann simuations and theory, i succesfully simulated a 2D lid driven cavity flow using Zou and He boundary conditions for both moving and stationary walls, i validated the results with results at same Reynolds number obtained with Finite element method.

I decided to turn my attention to poiseuille flow, i’m using a lattice with 128 points both in x and y directions.

i’m imposing a parabolic profile at the inlet (left)and at the outlet (right) boundaries (using zou he moving wall with parabolic ux velocity and uy=0), while on north and south boundaries i use zou and he no slip boundary conditions (ux=0 and uy=0).

what happens is that i have obviously the correct velocity profile at the inlet, and at the outlet, BUT in the middle of the channel the maximum velocity increase from the u0=0.001 imposed to about 0.0017.

the question is: am i doing something wrong with the boundaries conditions? maybe i should impose a density (therefore pressure) difference from inlet/outlet?

i’m really clueless.


My suggestion is instead of using Zou & He velocity boundary conditions… Just use half way bounce back boundary condition at the top and bottom wall. i.e no collision on walls.

By introducing a poisuelle’s force in the fluid nodes you can give periodic boundary condition for inlet and outlet.

You can find a simple Poisuelle’s flow FORTRAN program in the following webpage “http://complex.elte.hu/~csabai/szamszim/lecture7/lbe.f.txt

I hope it will help.
Good luck

Thank you, i knew it was possibile to add a force term to the equations while using periodic boundaries, as written in sauro succi’s book. And i’ll try Also tris way.

But i’m still wondering why with the boundary conditions that i used i’m not getting the correct profile.

Edit: the link is not working, at least from ipad.

A simple thing to try would be to change your dimensions as it could be the case that the flow hasn’t fully developed. Perhaps look at a 128*32 grid instead. Also, check your pressure (density).

More generally, it’s not recommended to impose a velocity profile at both the inlet and outlet because the problem can be mathematically ill-posed. In CFD one would normally impose a velocity at an open boundary and solve for the pressure, or impose an inlet and outlet pressure to ensure a pressure gradient.

In your problem your pressure may not be consistent with your velocity. If you have no density gradient there is probably nothing driving the flow. If you do have a density gradient, then your boundary conditions need to respect this (or vice versa). If you impose rho=1 at both the entrance and exit, what’s going on in the middle?

If you want to solve Poiseuille flow exactly with LBE you can use a horizontally periodic domain with a body force (which acts like a constant pressure gradient). You could alternatively impose an inlet and outlet pressure (density). If you want to impose an inlet parabolic profile, you can set the outlet sufficiently far downstream and extrapolate (this assumes no gradients in the flow direction for velocity, which will be true as long as your outlet isn’t too close to the inlet).

Ok, i imposed a density difference inlet/outlet using zou he boundary conditions, and i’m getting this results:

velocity modulus is plotted here in a channel nx=1000 ny = 34



(the two velocity contours are the same, but in the second contour you can see the scale on the left)

it is very strange to me, any suggestions on what i’m doing wrong?

density is set 2.8 in the inlet and 2.6 in the outlet…

i’ll try anyway the external force driven flow…but i’d like to understand what i’m doing wrong

Make sure you are not also imposing the streamwise velocity profile at the inlet and outlet.: you impose rho, not u(y) here (u is found from the known distributions). Then try and get the same results as in the Zou and He paper. If this doesn’t work then you have a mistake in your code (note that the v component of velocity should be very very close to zero, almost zero to machine precision)

i’m sure i’m not imposing velocity, for example at the inlet boundary i’m imposing rho=rho_inlet, then i compute Ux in this way:

Ux = 1- (f0+f2+f4+2*(f3+f6+f7))/rho_inlet

Zou and he use the incompressible version of d2q9 if i’m correct, therefore i can’t compare directly my results with those obtained in his work.

i’ll turn to force driven poiseuille flow anyway.

I don’t imagine the “incompressible” version (D2Q9i) should make much difference and it should be simple to change your code to this model if you want to check. My guess is there is a bug in your code as I can see no reason why you should get peak velocity at the inlet and exit while not getting it in the middle. Pressure driven Poiseuille like this with LBM should give you almost the exact solution (I don’t think it makes sense for the velocity to be exact at the entrance, then decrease, then increase again!).