Microscopic calculation of friction coefficients for use in heavy-ion reaction