Numerical computations of critical flow over a weir