Dear all,
I’m new in the field of LBM and I started looking at the code cavity.m given in lbmethod.
I have a doubt concerning the streaming step. As far as I understand the matlab command circshift seems to impose not only the streaming but also a “periodicity” between the left-right and and top-bottom sides. As matter of fact the results provided by replacing
%STREAMING STEP
for i=1:9
fIn(i,:,: ) = circshift(fOut(i,:,: ), [0,cx(i),cy(i)]);
end
with
%STREAMING STEP
% implementation of the streaming without "periodicity"
fIn(2, 2:lx, : ) = fOut(2, 1:lx-1,: );
fIn(3, :, 2:ly) = fOut(3, :, 1:ly-1);
fIn(4, 1:lx-1, :) = fOut(4, 2:lx , :);
fIn(6, 2:lx, 2:ly) = fOut(6, 1:lx-1, 1:ly-1);
fIn(5, :, 1:ly-1 ) = fOut(5, :, 2:ly);
fIn(7, 1:lx-1, 2:ly) = fOut(7, 2:lx , 1:ly-1 );
fIn(8, 1:lx-1, 1:ly-1) = fOut(8, 2:lx , 2:ly);
fIn(9, 2:lx , 1:ly-1) = fOut(9, 1:lx-1, 2:ly);
are not equivalent. I don’t understand why we need this “periodicity” all over the boundaries if we already have already imposed the corresponding boundary conditions. Is this related to the full bounce back condition? How?
Thanks a lot