This study aims to investigate the Graetz problem of Newtonian and viscoelastic fluid obeying Giesekus model using ANSYS Polyflow solver. The non‐isothermal flow in straight ducts of circular and noncircular cross‐sections under the constant heat flux boundary conditions is considered. The effect of the mobility parameter (α), fluid elasticity defined by Weissenberg number (We) and Reynolds number (Re) on the flow field, secondary flows, and the fully developed and developing Nusselt number along the ducts length are investigated for all geometries. The obtained results are of great importance for practical application in the polymer industries such as polymer melt.