Numerical algorithm for estimating temperature-dependent thermal conductivity