Application of contact element method in the numerical simulation of thermal stress