This work considers the numerical study of unsteady MHD convection of cobalt-kerosene ferro fluid in a linearly heated two-sided cavity and in the presence of constant and alternating magnetic elds. An accurate nite volume method is adapted to solve the governing equations for this problem. The fluid flow and heat transfercharacteristics are studied for a wide range of Richardson numbers (0:01 Ri 10) and Hartmann numbers (0 Ha 100). The volumetric fraction of nanoscale ferromagnetic particles in ferro fluid also varies between 0:0 0:2, while the size of those nanoparticles is fixed at 45 nm. In addition, di fferent alternating magnetic fields with various periods and phase deviations are utilized to study the eff ect of time-periodic magnetic field on the flow characteristics and heat transfer. The entropy generation and Bejan number are also evaluated to study the e ect of key parameters and temporal variation of magnetic field on various fluid irreversibilities. The results show that applying time-periodic magnetic fi eld has remarkably influenced the fluid characteristics, the fluid irreversibilities, and heat transfer within the cavity. Meanwhile, the influence of phase deviation on heat transfer seems to be insigni cant.