The problem you describe is simple conceptually but there feels like "death in the details".
A good text book would cover all these topics.
I can offer the following clips from my heat transfer course notes (please excuse the tutorial wording, I left them as-is):
<Exit temp>
The exit temperature of the fluid (assuming constant outside temperature) would be ...
T(m,0) = T(amb) - [T(amb) - T(m,i)] * exp [ - U * A / mdot / Cp ]
where
T(m,0) is the fluid exit temp
T(amb) is the external ambient temp
T(m,i) is the fluid inlet temp
mdot is the mass flow rate (kg / s)
A is the total internal pipe surface area ( 2 * pi * r(inner) * L )
U is the overall heat transfer coefficient from the flowing fluid, through the wall into the constant outside temperature on the other side. (This includes convection and conduction terms.)
The overall heat loss would be....
Q = mdot * Cp * [ T(m,0) - T(m,i) ]
<Overall HTC>
The equation for the overall heat transfer coefficient of the pipe (or cylinder) is slightly different in various textbooks, depending on the way the surface area is referenced. One favorite version for U is
U = 1 / [ ( 1/h1 ) + ( r1/k1 ) *ln ( r2/r1 ) + ( r1/k2 ) *ln ( r3/r2 ) + ( r1/k3 ) *ln ( r4/r3 ) + ( r1/r4 ) * ( 1/h2 ) ]
This example is for a 3-layer pipe. Whatever the number of layers, the last term must always have this form:
( rinner / router ) * ( 1 / houter )
It is important to know that in this setup, the reference area, A, to be used in the heat transfer calculation is the inside surface area of the pipe = 2 * pi * r1 * L.
Also, in practice, most engineers calculate q/L the heat transfer rate per unit of pipe length, and using the above equations, this becomes...
q/L = U * 2 * pi * r1 * (Tinside - Toutside)
<Internal HTC>
The equation used here for the average convection heat transfer coefficient along the inside wall of a pipe with fluid flowing inside:
H = .023 * Re^.8 * Pr^ n * k / D
<External HTC>
I use cylinder in cross-flow average HTC equation .... but I never wrote that up.... and refer people to the textbook (equation is a mess!).
regards,
magicme