Study of Natural Convection in a Square Cavity Filled with Nanofluid and Subjected to a Magnetic Field