# this is a code snippet that will force the average velocity in the region of the upper and # lower boundaries to approach 0, in both x and y. This is the so-called 'Law of the Wall' # place zero velocity cells on the upper and lower boundary for j in range(0,lenx): if cell[1,j-1]&2: celln[0,j] += 16 #upper boundary is even if cell[1,j]&4: celln[0,j] += 32 #upper boundary is even # lower boundary is odd if cell[leny-1,j]&32: celln[leny,j] += 4 if cell[leny-1,j+1]&16: celln[leny,j] += 2