In [3]:

```
import math
# Variables
D = 4.5/12; # Outer diameter of pipe in ft
D2 = 6.5/12; # Outer diameter of insulation in ft
k = 0.035; # Thermal conductivity in Btu/hr-ft-degF
T1 = 400.; # Temperature of pipe in degF
T3 = 70.; # Temperature of air in degF
T2 = 120.; # Assumed temperature in degF
# Calculations and Results
h = 2*k*(T1-T2)/(D2*(T2-T3)*math.log(D2/D)); # Sum of coefficient of convection and radiation
delT = T2-T3; # Temperature differnce in degF
T2 = 120.; # Assumed temperature in degF
print "The assumption of T2 = 120 comes out to be satisfactory and hc+hr = %.2f "%(h);
q = h*math.pi*D2*delT; # Heat loss in Btu/hr
print "The heat loss per unit foot of pipe is %d Btu/hr-ft"%(q);
# book answer is wrong.
```

In [5]:

```
# Variables
D = 2.375/12; # Outer diameter of pipe in ft
k = 0.035; # Thermal conductivity in Btu/hr-ft-degF
T1 = 400.; # Temperature of pipe in degF
T2 = 70.; # Temperature of air in degF
# Calculations
delT = T1-T2; # Temperature differnce in degF
T2 = 120; # Assumed temperature in degF
h = 3.67;
# As seen from the table , for delT = 330. the value of hc+hr = 3.67
q = h*delT; # Heat loss in Btu/hr
# Results
print "The heat loss per square foot of pipe is %d Btu/hr-ft"%(round(q,-1));
```