Under the stress of energy saving and environmental conservation, distributed energy system becomes more promising due to its high energy efficiency. Previous research on the network of distributed energy system mainly emphasize shortest pipe length, but ignore the heat and pressure loss during transportation in different topologies. This work proposes two new topologies for the pipe network of distributed energy system, e.g Euclidean Steiner minimum tree and Rectilinear Steiner minimum tree, to reduce the investment and energy loss. The objective of this work is to minimize total annual cost involving capital cost, pressure drop and heat loss. Graphic theory such as GeoSteiner and Kruskal algorithm are used to solve the problem. Linear model is used to describe the calculation model of flow rate in the pipeline. Both graphic theory and linear programming are coupled in the optimization framework. To illustrate the effectiveness of the two topologies, this work compares them with conventional topologies, e.g. star style and Multiple Spanning Tree style. Based on the results, Euclidean Steiner minimum tree has better economic performance, its total annual cost is 12 % and 9.17 % lower than star style and Multiple Spanning Tree.