Abstract. In the paper the mathematical and numerical descriptions of the general case of thermal contact between two flat bodies are presented. The numerical model of the problem is based on the Finite Element Method (FEM). Variable width of the contact gap between interacting bodies is considered. The model allows the use of independent spatial discretization of the contacting components, which means that the edges of the finite elements lying on the both sides of the contact gap need not be matched. The algorithm of treatment of the fourth kind boundary condition is described in details.