Nowadays, along with the developments in the industry, many machines and structures are exposed to very high-temperature environments, which has caused various types of thermal load in them. These conditions have led to focused studies on thermal stresses in structures. Heat exchangers are among the structures in which the temperature difference causes thermal stress. In this paper, “finite volume” and “finite element” methods are used to solve flow equations and thermal stress equations in solids, respectively. In addition, the effect of changes in the shape of the annular finned pipe on the thermal stresses in the heat exchanger is investigated. The study results on changing the pipe shape from circular to elliptical show that by changing the pipe shape, the thermal stress in the fin can be significantly reduced; for instance, in the cases reviewed in this paper, the thermal stress has decreased by 9%. Furthermore, the results of thermal stress show that the Maximum Effective Stress point, both before and after changing the shape, is still located at the fin’s base. So, according to the results of this study, examining the effect of pipe shape changing on thermal stress is an imperative measure when designing heat exchangers.