D3Q19 boundary problem

Dear all,
I have a problem with implementing a boundary condition on inlet/outlet in a D3Q19 lattice model. I try to explain what is happening on the inlet, but the same problem is present also in the outlet. On the mesh 60x20x10 for the solid boundary I use bounce back condition, while on the inlet and outlet I use a velocity condition and pressure, respectively. The problem that I get when I start simulation is actually in the computational lines in the inlet, x=1, y=1 - 20, z=1 - 10, i.e. in lines that lies next to the last computational line, x=1, z=2, y=2 - 19, and x=1, z=9, y=2 - 19.In that lines only, during the simulation, pressure is constantly rising, which is increasing velocity in the next line (in horizontal direction) up to the instability. In all other lines, regarding the inlet and rest of the domain, model is not showing any problems. What I noticed is that the problem is actually caused by diagonal velocity vectors that point out towards the solid boundary. Hence, because during the stream step they travel only one node to the solid boundary, and after the that they are shifted back to the boundary node from which they came from, for some reason that probability functions f are increasing, which is immediately leading to the rise of the pressure and instability that I earlier mentioned. I try everything to resolve this problem, but I can’t find a solution.

Thank you in advance


for me, this just sound like a typical coding bug. I think it is very hard to find a solution here in the forum.
Some hints:

  • is the code bug-free if you switch off the boundary conditions?
  • what happens if you inverse the flow direction, is the “odd behavior” symmetric?
  • do you use a parallelized code?