Calculation of the contact temperature and wear of frictional elements of brakes