The second term in your equation differs from the second term in your program code. Is it supposed to be div(vel * u)*v
or div(vel * grad(u))*v
?
To make vel
a velocity field rather than a constant, you have two options. Either write it as an expression
V = VectorFunctionSpace(your_mesh, 'CG', 1)
# Example for vel(x) = x
vel = Expression(('x[0]', 'x[1]', 'x[2]'), element=V.ufl_element())
or as a function defined by its degrees of freedom:
V = VectorFunctionSpace(your_mesh, 'CG', 1)
vel = Function(V)
# now assign degrees of freedom to vel.vector()
# Example for vel(x) = x:
all_coords = V.dofmap().tabulate_all_coordinates(V.mesh())
(xs, ys, zs) = all_coords.reshape((-1,3)).T
vel_v = vel.vector()
indices = V.sub(0).dofmap().dofs()
vel_v[indices] = xs
indices = V.sub(1).dofmap().dofs()
vel_v[indices] = ys
indices = V.sub(2).dofmap().dofs()
vel_v[indices] = zs