hi guys i’m quite new to the lattice boltzmann method so i’ve started trying to solve the standard 2d cavity flow. the north wall in my problem is moving with velocity u0. i’m using standard 2dq9 discretization.

i succesfully implemented Zhou and He boundary conditions along moving walls, in my driven cavity.

there’s just one thing puzzling me…how to manage corner nodes. for example the North West node.

There’re more variables than equations

variables:

rho,f1,f5,f7,f4,f8 there’re 6 unknowns but just 5 equations:

rho = f1+f2+f3+f4+f5+f6+f7+f8+f9 (where f9 is the density of particles at rest)

rho*ux = f1+f5+f8 - f3 -f6 -f7

f1 - f1eq = f3 - f3eq

f4 - f4eq = f2 - f2eq

f8 - f8eq = f6 - f6eq

i extrapolate the rho from the closest fluid node therefore rho is no more an unknown and i can solve the system.

i then get:

f1 = f3 + rho*(2*ux/3)*

f4 = f2 + rho(2*uy/3)*

f8 = f6 + rho(ux-uy)/6

f5 = -0.5*f9 - f3 - f2 - f6 + 0.5*rho*(1-2*ux/3 - uy/3)*

f7 = -0.5f9 - f3 - f2 - f6 + 0.5*rho*(1-ux - 2*uy/3)

is this solution correct?

thanks

not sure if you have solved your problem or not, but in case someone else reads this I just reply anyway.

I had exactly the same problem and it was causing me problems for over a month. In the end, if your approach works for you, then I would go with that, if it doesn’t work (you get NaN or Inf values), then you can try my approach which works fine for me (lid driven cavity, backward facing step, sudden expansion, cylinder and airfoil tested so far no problems). The NaN and Inf are most likely the result of obtaining rho, u and v (and w for 3D) since you devide the flux (rho*u, rho*v, rho*w) by density. If you treat the boundaries wrong, especially in the corners, than you density is to low and slowely but surely your solution will diverge.

I am always treating corners as stationary walls so far, so whenever you have a moving element (moving wall, inflow, outflow etc.) this will cause you problems. If you can afford to put walls in the corner (which for the cavity is fine) than make sure that the corners have zero velicities in all direction. In my case, I first update the boundaries, then get the macroscopic values everywhere in the domain but in the end overwrite the values at the boundaries manually (i.e. I put 0 velocity everywhere on my stationary walls and corners plus the moving velocity on the moving wall for the cavity flow)

Hope that helped.