This study performed a finite element stress analysis of pipe system connected by bellows based on APDL(ANSYS Parametric Design Language) customizing. The effects of different shapes of developed pipes for various parameters are studied using the finite element commercial package for this study. The structural behavior of complex pipe structures with bellows was also investigated to study the interactions between bellows and other parts. Based on the ANSYS APDL, the effect of initial axial and lateral displacements, and internal temperature and pressure on the Von Mises stress distribution is also analyzed.