A numerical approach for determination of loss factors is presented by using the power injection method. The whole-procedure digital simulation for vibration forecasting is obtained. The U-shape pipeline is studied as an example to obtain the loss factors by using the power injection method by means of the ANSYS code. Then using the obtained loss factors as parameters, the statistical energy analysis of the U-shape pipeline is carried out by means of the AutoSEA software. Comparing the result of vibration response at the middle frequency and high frequency with that obtained by ANSYS code, it is found that the two results are essentially the same in the trend. The values of the two results are in perfect agreement in the high-frequency range. All of these results show that this method is feasible.