Adding force term

Dear all

I write a c++ program to model free convection heat transfer using LBM ( of course!).
In order to add the force term to the collision stage, I noticed that there are several ways to do so.
One of them is by adding to f an extra df(i) of the form: 3w(i)cF/cs^2.
I tried to develop this expression and couldn’t.

Here I present my expression for D2Q9:

df(1)c(1)+…+ df(9)c(9)=rowu (row is the density and u is the macroscopic velocity).
row
u=rowadt=F*t=F (assuming dt equal 1 at LB units).

df(i)c(i)=w(i)*F
df(i)=w(i)*dot(F,c(I))/c(i)^2

c(i) equal 1 at LB units, so:

dfi(i)= w(i)*dot(F,c(I))

I will really appreciate any comment regarding the way I developed I would which
you could tell me please.

Best Regards,
Tal

The form of the force as you have it (let’s call it R_i) says

sum(R_i*c_i)=F

The LBE algorithm for the collide-force step might be something like

f’_i=f_i-1/tau(f_i-f0_i)+R_i

Multiplying this by c_i and summing over i gives

sum(f’_ic_i)=rhou+F,

because sum(f_ic_i)=rhou, and momentum is conserved by collisions. This is saying that your new velocity is the old velocity plus the force.

Thanks for replying.
Sorry but I don’t understand from your answer how to get 3w(i)cF/cs^2 while I got w(i)*dot(F,c(I)).
Thanks.
Tal.

My apologies; I read the ‘c’ in your first expression as c_i. This is the basic form of a mass conserving acceleration term. The force as you have it (R_i~W_i*constant) will change the mass but not the momentum.