PurposeThe purpose of this study is to investigate partial magnetic source (MS) effect on natural convection (NC) flow of a ferrofluid flow in a cavity with sinusoidally heated vertical walls. The combination of ferrohydrodynamics and magnetohydrodynamics due to the variable magnetic field (MF) and magnetite nanoparticles in one part of the cavity, and the classical NC in the other part of the cavity are concerned.Design/methodology/approachThe dimensionless equations in stream function-vorticity form are numerically solved by radial basis functions (RBF) based collocation method.FindingsA remarkable change in fluid flow and heat transfer is noted if the MS location is close to the left sinusoidally heated wall. In particular, the average Nusselt number is the smallest for the middle centered partial MF through the left wall at a large Hartmann number.Research limitations/implicationsRBF collocation approach is limited to small geometries due to the obtained solution globally in the entire domain of the problem.Practical implicationsIf the partial restriction of the effect of MF is done in real life, it would be a control parameter at some required/requested areas of the concerned problem.Social implicationsThis is a physical problem.Originality/valueIf the proposed idea of partial variable MF is able to be applied to a system in real life, it would be a good controller on fluid flow and heat transfer. RBF-based methods are also alternative numerical procedures to solve heat transfer and fluid flow problems.