Boundary-layer flow and heat transfer in porous beds