Analysis of diffusion in porous media using a porous graph approach