Palabos LBM Wiki Fortran90 Code

Hello,

This is about Palabos LBM Wiki Fortran90 code (http://wiki.palabos.org/numerics:codes). It seems that the code is very unstable when Reynolds number is high (even with Re=30 and xDim=250, yDim=50). I found some remedies for this. Below is my suggestion.

  1. Change lines 295-297 as follows.

[code=“fortran”]
f(y,x,3) = f(y,x-1,3)
f(y,x,6) = f(y,x-1,6)
f(y,x,7) = f(y,x-1,7)
!u(y,x,0) = uProf(y)
!u(y,x,1) = 0.0d0
!CALL outletZou(f(y,x,:),u(y,x,:),rho(y,x))



2. Change line 471 as follows (line 471 refers to that of before doing 1.).

[code="fortran"]
    if (image(y,x) /= inlet) f(y,x,i) = (1.0d0 - omega) * f(y,x,i) + omega * feq(y,x,i)
!if (image(y,x) /= wall) f(y,x,i) = (1.0d0 - omega) * f(y,x,i) + omega * feq(y,x,i)

This improved the stability of the code. Imposing Poiseuille velocity profile at the outlet is rather strange, I think. I couldn’t make clear why collision at the inlet made the scheme unstable. If anyone has any idea, I would like to know :wink:

There is also a minor problem in Makefile: gfortran compiler doesn’t have -ipo option. So delete -ipo or change FC to ifort compiler.

Thank you