Velocity profile of granular flows inside silos and hoppers