The aim of this research is to investigate mixed convection heat transfer properties in a ventilated square cavity with a heated cylinder. The cylinder is positioned in the cavity’s middle. The cylinder has been observed in both stationary and rotating (counter-clockwise and clockwise rotating directions) conditions. Furthermore, the cavity’s wall is believed to be thermally insulated along with a solid wall on the left side. Flows (Liquid Gallium) enter the cavity through the inlet at the top of the right wall and exit the cavity through the bottom of the right wall. The current research simulates a real-world device, such as liquid-cooled electronic equipment with a heating part or a heated oven. The effects of the cylinder diameter and rotational direction of the cylinder in the cavity are highlighted. The coupled equations of mass, momentum, and energy govern the mathematical model, which is solved using a Galerkin weighted finite element formulation. The current study takes into account a broad range of relevant parameters, including Richardson number, cylinder diameter, and cylinder rotation direction. Divers kinds of results are simulated using these parameters such as streamlines, isotherms as well as heat transfer rate by calculating the average Nusselt number on the hot cylinder wall and bulk fluid temperature of the cavity. For pure mixed convection (Ri = 1), the clockwise spin direction gives 10% more heat transfer rate than the counter-clockwise spin direction. The heat transfer rate is an increasing function of Hartman number and a decreasing function of cylinder diameter. In the case of pure mixed convection (Ri = 1), increasing cylinder diameter from o.1L to 0.3L causes the heat transfer rate to reduce at a rate of 57.7%, and increasing the Hartman number from 0 to 100 causes the heat transfer rate to increase at a rate of 11.1%.