The use of artificial roughness or turbulence promoters on a surface is an effective technique to enhance the rate of heat transfer of the fluid flowing in a duct. In this study, a computer code has been developed to perform a numerical simulation for optimizing the shape of two-dimensional channel with periodic ribs mounted on the bottom wall to enhance turbulent heat transfer. The Reynolds-Averaged Navier-Stokes analysis is used as a numerical technique and the SST k-(ω) turbulent model with near-wall treatment as a turbulent model. The simulations were performed for two rib shapes, trapezoidal with decreasing height in the flow direction with and without grooves between the ribs. The results are validated by comparing with existing experimental data and semi-empirical correlations. The Reynolds number, pitch-to-rib high ratio and relative groove position are chosen as design variables. The effects of roughness parameters on Nusselt number and friction factor have been discussed and the conditions for the best performance have been determined and presented.