The influence of the environment on the friction and wear of graphitic carbons