The asymptotic solution of flow near the entrance of a heated straight pipe is obtained by perturbing the solution of flow in an unheated straight pipe. Two vortices result from motions of fluid particles induced by displacement of the boundary layer. The axial velocity has a concave profile and grows toward a uniform profile downstream. The downward stream caused by displacement of secondary boundary layer forces the axial velocity profile counterclockwise if the flow is from left to right. A favorable pressure gradient is generated on the bottom wall; an unfavorable pressure gradient is induced on the top wall. The results were applied to the "Colorado tube test" set. It was found that when the flow speed is not fast enough, strong wall heating can cause the boundary-layer flow to separate from the top wall of the pipe, causing transition to turbulence; in this case, the flow cannot be used to simulate an external boundary-layer flow.