Thermal magneto-hydrodynamics in a ventilated porous enclosure