Heatfunction Formulation of Thermal Convection in Rectangular Enclosures Filled with Porous Media