jviquerat / lbm

A simple full-python 2D lattice-boltzmann code
MIT License
166 stars 26 forks source link

About nb_zou_he_top_wall_velocity() in nb.py #18

Closed SwiftCrown closed 1 year ago

SwiftCrown commented 1 year ago

In line 209 rho[:,0] = (g[0,:,0] + g[1,:,0] + g[2,:,0] +

This seems to be rho[:,ly] = (g[0,:,0] + g[1,:,0] + g[2,:,0] +

jviquerat commented 1 year ago

You are most probably right, have you checked whether it creates large differences in the benchmark results ?

jviquerat commented 1 year ago

@SwiftCrown it's actually more likely to be

rho[:,ly] = (g[0,:,ly] + g[1,:,ly] + g[2,:,ly] +
         2.0*g[3,:,ly] + 2.0*g[5,:,ly] +
         2.0*g[7,:,ly])/(1.0 + u[1,:,ly])
jviquerat commented 1 year ago

Hi @SwiftCrown,

Thanks for noticing the mistake. After running a few tests it seems to not significantly affect the accuracy of the results. I just pushed a fix.

Best,