A liquid-crystal model for friction