Calculation of the temperature dependence of the work function of an adsorption system