Initial conditions in incompressible lattice Boltzmann method I have very recently come to LB methods, and, after some reading, have implemented a little 2D code of my own. It uses some of the most basic assumptions :


*

*D2Q9 lattice

*BGK collision operator

*Zou-He on all boundary conditions (prescribed ux and uy at inlet, prescribed rho and uy at outlet, prescribed ux and uy on top and bottom walls (no-slip condition))


I am computing the flow around custom shapes for Reynolds flow in the range 100-500 maximum (sorry, the gif is a bit short, but Stackoverflow limits size): 

My question is the following : what causes the initial "shocks" that can be seen in the first steps of the resolution ? I suppose it is due to a mismatch in the initial conditions, I have been looking for quite some time for that specific answer, but was unable to find anything relevant.
Edit : 
Initial conditions are : 


*

*U is a Poiseuille flow everywhere, except in the obstacle where it is 0

*rho is 1 everywhere

*the distribution is the equilibrium distribution obtained from these macroscopic states


Thank you in advance !
 A: The waves you see look consistent with the flow adjusting from the (unphysical) initial conditions to the physical equations as the simulation starts. You haven't found anything about it because, well, we basically just ignore it and never report/talk about it when we discuss the results. 
The trick to all simulations is to A) run long enough that you can get information from the simulation that is not corrupted by your choice of initial conditions and B) choose your initial conditions reasonably so your code doesn't crash, take forever to flush out the effect of initial conditions, or move the results into a different solution space. The last one is really tricky because, in general, we cannot guarantee there is a single, unique solution for problems like this. So the choice of initial conditions could kick the solution into some other state that isn't the one you want. 
Anyway, I'd say those waves don't really matter. You can make sure of this by changing your initialization to something else (maybe 0 velocity everywhere except a small region near the inflow, for example) and see if you end up at the same answer at the end -- you should end up with the same drag coefficient and shedding frequency, for example. 
The final tip -- if you are doing a simulation where the transient behavior is what you want (rather than some time-averaged, or some state after the initial transients can leave the domain), then you need to be extremely careful in setting up the initial conditions. There isn't a general way to do this and it will be case specific. But the importance of the initial conditions makes transient problems much harder to study!
