# Lattice Boltzmann Method: How is shear flow handled in D2Q5?

I've implemented 2-dimensional, incompressible, high-reynolds fluid-flow using the Lattice Boltzmann Method on a D2Q9 lattice. My main goal is just visual plausibility, not quantitative accuracy. The simulation is initialised in equilibrium and in a small portion of space in the center a constant force to the right is exerted onto the fluid (to simulate a small "pump" to test the flow). The flow nicely moves rightward with emerging vorticies at the top and bottom of the flow as well as turbulence due to shear forces, as expected.

In order to speed up the simulation I experimented with using a D2Q5 lattice instead, but visual plausibility breaks down as no vorticies or any sort of turbulence emerges, just a boring narrow laminar flow to the right. I'd assume the reason is that in D2Q9 shear forces are considered due to the exchange with diagonally neighboring cells which are missing in D2Q5. Therefore the latter does not capture shear forces which are essential for turbulence, vorticies and so on. Since D2Q5 seems to be a practical choice in a bunch of papers I strongly assume I'm missing something here, as completely neglecting shear forces can not result in a physically sound (and not even visually pleasing) flow. See here for comparison:

Can somebody explain to me how D2Q5 is supposed to capture shear forces ? I really don't understand it conceptually.

• Physicists won't be able to answer this easily, consider asking an altered version of this question on scicomp.stackexchange.com. – whn Oct 10 at 14:36
• also looks like your equilibrium step needs to be changed for d2Q5, ie, the probability of water moving up and colliding with other particles causing perpendicular flow is not zero, where it looks like there is zero perpendicular flow happening in your D2Q5 version. – whn Oct 10 at 14:38

First note that LBM doesn't actually work for in-compressible fluids unless you replace the density in your D2Q5 vectors with pressure (or energy etc.. something that doesn't relate to the number of particles per unit volume/area), as density is constant in in-compressible fluids (and I'll be from this point onward considering your LBM implementation in terms of pressure, not density). Second I would probably need to see the code, but it appears your equilibrium equation is wrong.

It looks like your equilibrium equation results in collisions with little to no perpendicular flow, and hence why it just looks like a straight shot across your grid.

Here is visual explanation:

imagine the following adjacent grid points, where blue represents non zero pressure.

On the next step, this is what your simulation looks like it is doing:

This is what it should be doing:

Collisions should result in perpendicular pressure flow to some degree. Think of billiard balls, if you hit one to the side, the ball doesn't just go straight, it hits off at an angle. Now you may be thinking "even with the billard ball situation, I can't get it to go exactly perpendicular to my collision!" and there are two factors to this:

• First LBM equilibrium collision equations happen at the particle level, and the equilibrium equation is supposed to not handle just one collision, but multiple collisions in a time-step. You in effect have multiple "billiard ball" collisions to account for (example):

• The quantized 4 directions + stationary (the Q5 in D2Q5) in LBM are not just supposed to be for the aligned particle movement to that quantized direction, but rather all particles angles more closely aligned with that angle than others. Here is what I'm talking about:

Each color should correspond to all particles flowing in that solid angle range, not just the particles that happen to flow aligned to the axis. Even in the single collision in the billard ball situation, the ball could still end up going in the "left general direction" despite not moving directly left, and would be advected leftwards.

I'm not sure what your equilibrium equation is, but I would suggest making it more isotropic, making sure that (if for example you use energy) you conserve energy.

• Very nice explanation and illustration. Thank you very much. Though, at least to me it seems that the equliibrium distribution function is independent of the lattice and number of neighbors used. I'm using the one stated in wikipedia (en.wikipedia.org/wiki/…). – Lenny Oct 18 at 8:23
• @Lenny collision is $1/tf * (f_i^{eq} - f_i)$, the only thing you really can change in lattice boltzman is the $f_i^{eq}$, so it's pretty much guarnteed the issue is there. Additionally nowhere does it state that equilibrium is independent of lattice, it even shows two different types for D2Q9 and D3Q19, $w_i$ changes between those two, D2Q9 $w_0$ != D3Q19 $w_0$ ($4/9$ vs $1/3$), and so will also be different for D2Q5. – whn Oct 18 at 15:55
• @Lenny Notice how $w_i$'s add up to 1, you can't just steal the values from D2Q9 for D2Q5 – whn Oct 18 at 15:58
• you are correct. i did adjust the w's to 1/3 (center) and 1/6 for N,S,E,W – Lenny Oct 19 at 17:37