Relaxation parameter/viscosity question

Hi all,

I’ve implemented a version of the D2Q9 LBModel in C++ (I’m a computer scientist, not a physicist), and have a few questions related to its behavior.

First some context:

The equilibrium function I use is the following (based on the work of He and Luo “Lattice Boltzmann Model for the Incompressible Navier-Stokes Equation”):

fi_eq = wi * ( rho + rho0 * [3 eiu + 9/2 * (eiu)^2 - 3/2 (u*u) ] )

for simplicity, rho0 (average fluid density) = 1.0, and also dx (lattice spacing) and dt (time step) are 1.0.

The formula I implemented is simply:

fi(x + ei, t + 1) = (1 - w) * fi (x,t) + w * fi_eq(x,t)

;while executing first the propagation step followed by the collision step and the calculation of new densities and velocities.
Everything seems to work fine, there is conservation of mass and momentum.

Now my first question: according to the relation viscosity = (1/w - 1/2)/3, the viscosity of my fluid should increase when I lower the relaxation parameter w, and vice versa. However, in my simulation the exact opposite occurs, which seems natural to me as more weight is given to the streaming step, creating a more fluent flow. What am I misinterpreting here?

Also, when setting the initial cell conditions in terms of velocity and density, I initialize the distribution functions of the cell to fi_eq, as indicated by some on-line resource. However, if afterward one would recalculate the density/velocity according to the formulas

rho = sum[0…8] fi;
u = (1 / rho0)* (sum[1…8] ei * fi);

we obtain the correct initial value for the density again, but the velocity is of course much smaller. So I wonder if this initialization method is correct.

Thanks in advance,

you’re a mindful student, all your formulas are right. what’s wrong is that you think they’re wrong. the intuition why viscosity increases when w decreases is that the f relax to equilibrium:

fi(x + ei, t + 1)-fi  = - w  (fi - fi_eq)

large omega means fast relaxation means low viscosity. implement something like a cylinder flow, and you’ll see that the vortex street behind becomes more turbulent at low viscosity.
if you initialize f at fi_eq(rho,u), then sum fi=rho and sum ei fi = rho0 u. if that’s not what you get you did something wrong.