Natural heat exchange in inhomogeneous porous medium using linear and quadratic porosity distribution