# Outlet boundary conditions in lattice Boltzmann method

Here is the flow past a square cylinder configuration. The problem is a viscous and incompressible with parabolic velocity profile using freestream velocity $$U$$ across a single cylinder. I use the single relaxation time lattice Boltzmann method. For the two-dimensional nine-velocity lattice(D2Q9), the directions of the particles are shown in the picture.

The parameters: $$H=160$$, $$L=780$$, $$I=170$$, $$D=20$$, $$U_\max=0.0438$$, $$\mathrm{density}=1.0$$, $$dy=dx=1$$, $$dt=1$$, $$\mathrm{Re}=160$$

The boundary conditions:

• Inlet: He-Zou boundary condition

• Wall: bounce-back conditions

• Outlet: interpolation (Here is the code for outlet BCs)

f(1,n,j)=2*f(1,n-1,j)-f(1,n-2,j)
f(5,n,j)=2*f(5,n-1,j)-f(5,n-2,j)
f(8,n,j)=2*f(8,n-1,j)-f(8,n-2,j)


My problem is whether the outlet boundary conditions are right or not. If it is right, why it's about f1, f5, f8 rather than f3, f6, f7? In my opinion, it seems that we can't get f3, f6, f7 from streaming on the outlet.

Your outlet boundary condition is not correct. In your outlet BCs, you have to impose the value of $f_6$, $f_3$ and $f_7$ since these populations are not updated by the streaming step.
1. You could save the post-collision values of the missing populations $$f_3, f_6, f_7$$ at timestep $$j - 1$$ and set them in the $$j$$'th streaming step as incoming populations.
2. Based on the macroscopic variables $$u, \rho$$ you can set $$f_3, f_6, f_7$$ in the streaming step to their equilibrium values.
3. If you know one of $$u_x, u_y, \rho$$ at the outlet, you can also use the Zou-He boundary conditions you already used at the inlet.