This work uses an optimization procedure consisting of a simplified conjugate-gradient methodology and a two-dimensional fluid flow and heat transfer model to identify heat transfer capability of the enclosure with heat conducting partitions. The objective function is constructed by maximizing overall heat transfer rate (Nusselt number), upon the fact that overall volume of partitions is maintained constant whereas the height and position of these partitions could be varied. The pressure-based SIMPLE procedure was developed in a unification to solve the direct problem and the auxiliary problem. Direct and inverse natural convection problems are subsequently investigated. Direct simulation shows that partitions could put heavy effects on the natural convection heat transfer in the enclosure. Enclosed fluid flow and heat transfer are analyzed for some representative situations, by the simultaneously use of streamlines, isotherms and heatlines. Inverse problem solutions on the maximization of heat transfer rate are addressed, respectively regarding of thermal Rayleigh number, partitions location, partitions width, partitions total-length and thermal conductivity ratio. A correlation has been proposed to identify the role of governing parameters on maximizing overall Nusselt number. Present procedures and numerical results could benefit future electronic cooling and reduce materials consumed in heat transfer engineering.