Abstract:A composite element algorithm for temperature field of discontinuous rock masses is implemented based on the principle of composite element method(CEM) and the implicit expression of unsteady temperature field. The remarkable feature of the algorithm is that each composite element has the possibility of containing arbitrary discontinuities segments such as faults and joints. And the mesh generation of the rock structures with discontinuities requiring explicit treatment in the calculation will not be restricted by the number,position and orientation of the discontinuities. In the phase of preliminary study,assuming the influence of heat convection and radiation in rock are ignored;the thermal conductivity equations of rock sub-elements and discontinuity are deduced for the composite element model containing one joint. Consequently the fundamental equations set of composite element algorithm for discontinuous rock masses temperature field is derived. And then the algorithm is incorporated into the conventional finite element analysis program. Finite element method and composite element method are applied respectively to simulate the varying process of temperature field when hot water flows along a single fracture in rock masses. The computation results of the two methods agree with each other very well. It shows the validity and robustness of the composite element algorithm for temperature field of discontinuous rock masses. But the corresponding post-process program needs more improvement to describe a fine contour of temperature field. Thereby the algorithm will provide one more way in the research of multi-fields coupling of deep rock masses.