The design of transfer lines is a key factor affecting the transmission performance of petroleum transportations in vacuum distillation units of the petrochemical industry. Therefore, this study established a simulation method to describe compressible fluids in transfer lines and validated this method using a planar nozzle model and industrial data. Subsequently, the simulation results of pressure, velocity, and Ma number distribution were analyzed and discussed for seven sets of industrial transfer lines. The results indicate that the structure of the transition section and connection section is the key factor affecting the performance of the transfer line, and the connection forms of horizontal direct insertion (Case 1) and gradual expansion (Case 4 and Case 5) help to reduce the pressure drop in the transition section and connection section. For this reason, based on Case 1, a detailed analysis was conducted on the internal flow field and pressure drop at the connection under different mass flow rates, and a universal optimization method was proposed to connect the transition section and low-speed section in the transfer line. The results show that the optimized structure can eliminate large eddies at the connection section and reduce the pressure drop by 36.8%. The modeling methodology and the results presented will be useful for evolving better designs of transfer lines accompanying compressible fluids.