Heat transfer in square cavities with partially active vertical walls