Write kT = f(d) to file