The energy consumption of building transmission and distribution systems accounts for more than 30% of building energy consumption, and the prevalence of localized components in building transmission and distribution systems leads to severe energy losses and resistance effects during system operation. To solve this problem, our research team has developed a series of resistance reduction components. This paper proposes a low-resistance local component shape optimization method based on biomimicry and machine learning, taking pipe elbows as an example, and the normalized shape optimization parameters of elbows with different pipe diameters are given. Through numerical simulation, full-size experiments, energy dissipation analysis and other methods, the optimized elbow resistance reduction effect and resistance reduction mechanism are verified and analyzed. The results showed that the resistance reduction rate of the elbow was 19%–26% for different pipe diameters and Reynolds numbers, and the optimized elbow significantly reduced energy dissipation during the flow process. Previously, the shape optimization problem of local components focused mainly on rectangular ducts that can be simplified in two dimensions; this study extends the optimization objective to circular pipes, which provides an effective method for guiding the optimal design of low-resistance local components in building transmission and distribution systems.