In this study, we simulate the cooling of a microprocessor by thermal convection in three different shapes: a square, a trapezoidal, and a triangular shape. The latter is improved by a variety of types of roughness, including square roughness, triangular roughness Type 1, triangular roughness Type 2, and triangular roughness Type 3. The microprocessors are kept at a constant temperature, the air flow is constant, and the geometry is fixed. The physical phenomenon is simulated by the ANSYS software. The numerical results reported in this study cover the ranges of the obstacle’s angle of inclination, 0°≤θ≤45°, (square obstacles, θ=0°, trapezoidal obstacles, 0°<θ<45°, triangular obstacles, θ=45°) and Reynolds number, 2500≤Re≤10,000. The findings relate to streamlines, dynamic pressure (max), mean velocity, temperature field, mean Nusselt number (Nu/Nu0) profiles, local coefficient of friction (Cf/f0), mean coefficient of friction (f/f0) profiles, mean velocity field with roughness, and fluid temperature field with roughness. The aim of the study is to show the interaction between the roughness parameter and the obstacle geometry. In the case of a triangular obstacle, the contact between the cold air and the obstacle is significant downstream of the obstacle, which gives us good cooling, and the Nusselt number has an important value because the agitation of the flow increases convective heat transfer, and the coefficient of friction is low because the air flow is uniform.