Computation of vertically averaged velocities in irregular sections of straight channels