Natural convection in rectangular enclosures partially filled with a porous medium