In this study, the laminar natural convection of water/SWCNT nanofluid in an RCE is simulated using a computer code with finite volume method in two-dimensional space. Heat transfer in an RCE is affected by hot and cold sources. The temperature of the cold source is supplied by the forced convection of cold water from the top of the enclosure. The temperature of the hot source is provided by the movement of the hot water in the microchannel in the lower part of the closed enclosure. The purpose of defining the geometry under study is to cool the hot surface in the lower part of the closed enclosure or to reduce the temperature of the closed enclosure. Using an RCE with different height ratios filled with nanofluid between the two microchannel layers is a solution to this problem. The results show that any factor that influences the thermal or velocity boundary layers and the flow field can cause changes in the temperature field. Based on the contours of the streamlines, increasing the height of the closed enclosure results in the formation of a large vortex in the closed enclosure, which is amplified by increasing the volume fraction of nanoparticles (φ) and the Grashof number (Gr). As the closed enclosure aspect ratio decreases, the closed enclosure height decreases. Also, as the distance between the hot and cold sources decreases, the temperature gradients decrease and the entropy generation was decreased. Surface factors such as velocity gradients and changes in the direction of the cooling fluid in the closed enclosure can attenuate the velocity, which increases the friction factor and shear stress. φ increases the dynamic viscosity of the cooling fluid, which enlarges the velocity boundary layer and increases the friction factor for the maximum aspect ratio. Since the upper part of the closed enclosure is in contact with the cold source and the lower part is affected by the hot source, the velocity and the degree of channel obstruction by the closed enclosure are more important in high Grashef numbers.