The resistance of local components in piping and duct systems significantly affects the energy consumption of fans and pumps, accounting for 40–60 % of the total building energy consumption. In this paper, an improved topology optimization method for variable density turbulent flow is proposed to design a low-resistance diverging tee structure in piping and duct systems. The advantages of the improved optimization method over the traditional method are analyzed using finite element numerical simulation, and the applicability of the proposed method is verified in the Reynolds number range of 0.6 × 105–2.6 × 105. In order to ensure the resistance reduction effect of the topology diverging tee under multiple operating conditions, the local resistance coefficients under nine flow ratios were simulated and calculated using the finite volume method. The results show that the topology diverging tee can significantly reduce the resistance. Compared with the traditional tee, the maximum resistance reduction rates in the straight-through direction and branch direction reached 63 % and 59 %, respectively. In addition, the intensity of secondary flow in five downstream sections was analyzed based on the dimensionless parameter Se. Finally, the actual resistance reduction effect of the topology diverging tee was experimentally verified. The optimization method and analysis results proposed in this study can provide a reference for the optimal design of pipelines with low resistance in energy-saving operation of buildings and in engineering fields such as petroleum and chemical industries.