A computational model for determining the effective thermal conductivity of a porous medium