A study of vorticity formation in high energy nuclear collisions