def FillBoundaries(): #walls bottom = shapes.Rhomboid(corner=[0, 0, 0], a=[boxX, 0, 0], b=[0, boxY, 0], c=[0, 0, 1], direction=1) oif.output_vtk_rhomboid(rhom_shape=bottom, out_file=vtk_directory + "/bottom.vtk") top = shapes.Rhomboid(corner=[0, 0, boxZ - 1], a=[boxX, 0, 0], b=[0, boxY, 0], c=[0, 0, 1], direction=1) oif.output_vtk_rhomboid(rhom_shape=top, out_file=vtk_directory + "/top.vtk") left = shapes.Rhomboid(corner=[0, boxY - 1, 1], a=[boxX, 0, 0], b=[0, 1, 0], c=[0, 0, boxZ - 2], direction=1) oif.output_vtk_rhomboid(rhom_shape=left, out_file=vtk_directory + "/left.vtk") right = shapes.Rhomboid(corner=[0, 0, 1], a=[boxX, 0, 0], b=[0, 1, 0], c=[0, 0, boxZ - 2], direction=1) oif.output_vtk_rhomboid(rhom_shape=right, out_file=vtk_directory + "/right.vtk") # obstacles = shapes.Rhomboid(corner=[rhom_x0, 0, 0], a=[rhom_x, 0, 0], b=[0, rhom_y, 0], c=[0, 0, rhom_z], direction = 1) # oif.output_vtk_rhomboid(rhom_shape=obstacles, out_file=vtk_directory + "/obstacles.vtk") boundaries.append(bottom) boundaries.append(top) boundaries.append(left) boundaries.append(right) # boundaries.append(obstacles) # obstacles20 = shapes.Rhomboid(corner=[40, 0, 0], a=[20, 0, 0], b=[0, 20, 0], c=[0, 0, 20], direction = 1) # oif.output_vtk_rhomboid(rhom_shape=obstacles20, out_file=vtk_directory + "/obstacles20.vtk") # obstacles10 = shapes.Rhomboid(corner=[40, 0, 0], a=[20, 0, 0], b=[0, 20, 0], c=[0, 0, 10], direction = 1) # oif.output_vtk_rhomboid(rhom_shape=obstacles10, out_file=vtk_directory + "/obstacles10.vtk") #cylinders # for id, pos in enumerate(obst_centers): # boundaries.append(shapes.Cylinder(center=pos, axis=[0.0, 0.0, 1.0], length=boxZ, radius=obst_radius, direction=1)) # output_vtk_cylinder(center=pos, axis=[0.0, 0.0, 1.0], length=boxZ/2, radius=obst_radius, n=50,out_file=vtk_directory + "/cylinder" + str(id) + ".vtk") return 0
for arg in sys.argv: out_file.write(str(arg) + " ") out_file.write("\n") out_file.write("boxX "+str(boxX)+"\n") out_file.write("boxY "+str(boxY)+"\n") out_file.write("boxZ "+str(boxZ)+"\n") out_file.close() # create boundaries boundaries = [] # bottom of the channel tmp_shape = shapes.Rhomboid(corner=[0.0, 0.0, 0.0], a=[boxX, 0.0, 0.0], b=[0.0, boxY, 0.0], c=[0.0, 0.0, 1.0], direction=1) boundaries.append(tmp_shape) oif.output_vtk_rhomboid(rhom_shape=tmp_shape, out_file=directory+"/vtk/wallBottom.vtk") # top of the channel tmp_shape = shapes.Rhomboid(corner=[0.0, 0.0, boxZ-1], a=[boxX, 0.0, 0.0], b=[0.0, boxY, 0.0], c=[0.0, 0.0, 1.0], direction=1) boundaries.append(tmp_shape) oif.output_vtk_rhomboid(rhom_shape=tmp_shape, out_file=directory+"/vtk/wallTop.vtk") # front wall of the channel tmp_shape = shapes.Rhomboid(corner=[0.0, 0.0, 0.0], a=[boxX, 0.0, 0.0], b=[0.0, 1.0, 0.0], c=[0.0, 0.0, boxZ], direction=1) boundaries.append(tmp_shape) oif.output_vtk_rhomboid(rhom_shape=tmp_shape, out_file=directory+"/vtk/wallFront.vtk") # back wall of the channel tmp_shape = shapes.Rhomboid(corner=[0.0, boxY-1.0, 0.0], a=[boxX, 0.0, 0.0], b=[0.0, 1.0, 0.0], c=[0.0, 0.0, boxZ],