To investigate the flow characteristics in front chamber and rear chamber in pump mode and pump as turbine mode, a 3D computational model of a centrifugal pump was established, including the front and rear chamber. Based on Realizable k-ε turbulence model, numerical calculations of incompressible flow were carried out for internal viscous flow in two operating modes. Further analysis was conducted on the flow stability and hydraulic losses under two modes using energy gradient theory and entropy production theory. The numerical simulation results are within reasonable error compared to the experimental results in pump operation mode, which ensures the reliability of the numerical calculation method. The results indicate that the volumetric efficiency in both two modes is on an upward trend with increasing flow, but the volumetric efficiency of the pump mode is more significantly affected by changes in flow; the distribution patterns of dimensionless circumferential velocity and dimensionless radial velocity in the front and rear chambers under two operating modes are similar, but the distribution pattern of dimensionless radial velocity in the front chamber in turbine mode is significantly different from other operating conditions; flow instability is most likely to occur at the outlet of impeller, and the energy loss in clearance of wear-rings is greater than that in the pump chamber.