When "LBM_25_LINES.m" is started, the LBM solves the flow field in a "pseudo-porous" geometry with periodic boundary condition. A perturbation to the velocity field in the x-direction is applied so that the flow moves from the left to the right side of the computational domain.
When "LBM_VIEW.m" is started, the m-file script shows all LBM process at the mesoscopic level. At each time step, the collision, the bounce-back and the streaming step are showed with details and at the same time the macroscopic velocity field is plotted.
Note that these two m-files are not research code! Although, they might be use as a starting point.
Overall, I believe that these two m-files may be of a good addition for a general audience scientific presentation.
If interested, my scientific publications may be found there:
Seb (2020). The lattice Boltzmann method in 25 lines of MATLAB code (LBM) (https://www.mathworks.com/matlabcentral/fileexchange/48103-the-lattice-boltzmann-method-in-25-lines-of-matlab-code-lbm), MATLAB Central File Exchange. Retrieved .
please kindly send me matlab code for two phase flow using two distribution functions. Thanks in anticipation!
how to i calculate hydrogen storage with metal hydride using this
I'm pleased that you like the code. I wish to confirm that it's full-way bounceback and I want to add that I have no concise code with half-way bounceback.
Nice code. But seems that it's full-way bounceback, is there any concise way to do half-way bounceback.