from espressomd import System, lb, lbboundaries, shapes sys = System() sys.box_l = [64, 64, 64] sys.time_step = 0.1 sys.cell_system.skin = 0.4 lb = lb.LBFluid(agrid=1.0, dens=1.0, visc=1.0, fric=1.0, tau=0.1) sys.actors.add(lb) v = [0, 0, 0.01] #the boundary slip walls = [None] * 4 wall_shape = shapes.Wall(normal=[1,0,0], dist=1) walls[0] = lbboundaries.LBBoundary(shape=wall_shape, velocity=v) wall_shape = shapes.Wall(normal=[-1,0,0], dist=-63) walls[1] = lbboundaries.LBBoundary(shape=wall_shape, velocity=v) wall_shape = shapes.Wall(normal=[0,1,0], dist=1) walls[2] = lbboundaries.LBBoundary(shape=wall_shape, velocity=v) wall_shape = shapes.Wall(normal=[0,-1,0], dist=-63) walls[3] = lbboundaries.LBBoundary(shape=wall_shape, velocity=v) for wall in walls: sys.lbboundaries.add(wall) sphere_shape = shapes.Sphere(radius=5.5, center=[33,33,33], direction=1) sphere = lbboundaries.LBBoundary(shape=sphere_shape) sys.lbboundaries.add(sphere) cycle = 0 while (cycle < 4000): print(str(cycle )) print("fluid velocity near right wall: " + str(lb[62,30,30].velocity)) sys.integrator.run(10) cycle = cycle + 10 print(sphere.get_force())