Transient thermal analysis of natural convection in porous and partially porous cavities