The object of this study is to expand the functions of the code with unstructured hp spectral element method. The developed code can simulate common heat transfer problems. Theses functions are element classification, the ability to deal with heat convectional boundary conditions, and making the code accommodate three dimensional curved geometry. Spectral element method is a high-order numerical method. If curved geometry is not interpolated with high-order method, it cannot reduce spectral accuracy. In this thesis, we get the mapping function of the curved element with boundary modes. And the code was validated by several examples. Finally, we take this code to simulate the heat transfer problem of a LED light bar.