I have a gas (assuming air) at $T$ = 500 K that enters a cylindrical pipe. The outlet target temperature is 330 K.
There will be heat transfer via: Forced convection from the gas to the inside of the pipe, conduction through the pipe thickness, convection to the ambient air environment ($T_\infty=300$ K) and radiation from the pipe surface.
I don't think I can assume a constant surface temperature to get a relatively accurate answer. The way I was thinking of solving this was to assume an inner and outer radius, split the pipe into segments, first segment from 500 K to 470 K, compute all the relative non-dimensional parameters and solve for heat loss per unit length in that particular section. Then I would advance to the next segment, from 470 K to 440 K, solve for the non-dimensional parameters and find $q$ per unit length for that segment.
I am not sure, however, how to determine the total length of the pipe in the end, given the heat loss per unit length in each section, since the heat loss is not really linear.