The accurate computer simulation of pipe flow is of great importance in the design of urban drainage. The Preissmann box scheme is usually used to model a wide range of subcritical and supercritical flows. However, care must be taken over the modelling of transcritical flows since, unless the correct internal boundary conditions are imposed, the scheme becomes unstable. In this paper, using the scheme in conjunction with the reduced momentum equation and applying boundary condition structure inherent to subcritical flow to all regimes, is an approach that enables efficient numerical simulation of transcritical flows in pipe networks. The approach includes three steps. First, a unified mathematical model which is based on the Preissmann slot model is derived. Second, the Preissmann box scheme is used to solve the set of equations, by analyzing and discussing the origin of the invalidity of applying the scheme, and a numerical model suitable for transcritical flow is proposed by the method of changing the convection acceleration term. Third, the numerical model is assessed by comparison with analytical, experimental and numerical results. The proposed models verified that this method can make the Preissmann box scheme applicable to the computation of transcritical flow in pipes.