Question on cylinder matlab example

Good day everyone,

I’m still new with the lattice Boltzmann method, and trying to understand the examples given at the website. There is one function in the matlab cylinder.m code that I still don’t understand. I can’t figure out from where, in the microscopic boundary conditions, left boundary, the function

fOut(i,1,col) = fEq(i,1,col) + 18*t(i)*cx(i)cy(i) (fIn(8,1,col) - fIn(7,1,col) - fEq(8,1,col) + fEq(7,1,col));

is obtained. To my understanding, the boundary conditions in this code is based on the works by Zou and He (1997), but i can’t seem to find the connection between the boundary conditions there and the function above in matlab.

If anyone can shed some light on the problem it will be much appreciated. Thank you.



I think that you might be referring to an old version of the Matlab code on, in which another boundary condition than Zou/He was used. In the meantime, Adriano implemented Zou/He, and the Matlab scripts were updated correspondingly.

Can you verify if this solves your issue, and if not, can you post a link to the code you are referring to?

Dear JLatt,

thank you very much for pointing that out. I was using a file given to me by one of my colleagues which turns out was an older version. The new version very clearly implements the Zou/He Boundary conditions.