Knowing the temperature distribution in gas well is of great importance to gas well design and dynamic analysis; accurate prediction of wellbore temperature distribution can improve the accuracy of wellbore pressure prediction. Based on energy conservation law, a mathematical model for calculating wellbore
temperature distribution in a gas well has been developed. This model assumes steady-state heat transfer inside the wellbore and transient heat transfer in the adjacent formation. Data from the literature are used to testify the validity of the model. Results indicate that the temperature distribution predicted by the model agrees well with the measured data.