Electroelastic model of dry friction: Macroscopic approach