Employing the idea of restrict variation, a new temperature functional to be proved by one order variation of functional which is equal to corresponding differential equations and its boundary conditions for the heat transfer of different materia Is incontact is presented in this paper. The problem of heat transfer for different materials in contact is solved in a more scientific and reasonable way by the finite element method.