In [1]:

```
#Example Number 3.1
# Calculate the heat loss by the pipe
# Variable declaration
d = 0.15 # [m] diameter of pipe
r = d/2 # [m] radius of pipe
L = 4 # [m] length of pipe
Tp = 75 # [degree celsius] pipe wall temperature
Tes = 5 # [degree celsius] earth surface temperature
k = 0.8 # [W/m per deg C] thermal conductivity of earth
D = 0.20 # [m] depth of pipe inside earth
# We may calculate the shape factor for this situation using equation given in table 3-1
# since D<3*r
#Calculation
import math
S = (2*math.pi*L)/math.acosh(D/r) # [m] shape factor
# the heat flow is calculated from
q = k*S*(Tp-Tes) # [W]
#Result
print"Heat lost by the pipe is",round(q,1),"W"
```

In [2]:

```
#Example Number 3.2
# Calculate heat loss through the walls
# VARIABLE DECLARATION
a = 0.5 # [m] length of side of cubical furnace
Ti = 500 # [degree celsius] inside furnace temperature
To = 50 # [degree celsius] outside temperature
k = 1.04 # [W/m per degree celsius] thermal conductivity of fireclay brick
t = 0.10 # [m] wall thickness
A = a*a # [square meter] area of one face
# we compute the total shape factor by adding the shape factors for the walls, edges and corners
#Calculation
Sw = A/t # [m] shape factor for wall
Se = 0.54*a # [m] shape factor for edges
Sc = 0.15*t # [m] shape factor for corners
# there are six wall sections, twelve edges and eight corners, so the total shape factor S is
S = 6*Sw+12*Se+8*Sc # [m]
# the heat flow is calculated as
q = k*S*(Ti-To) # [W]
#Result
print"Heat lost through the walls is:",round(q/1000,3),"kW"
```

In [4]:

```
#Example Number 3.3
# Calculate the heat loss by the disk
# Variable declaration
import math
d = 0.30 # [m] diameter of disk
r = d/2 # [m] radius of disk
Td = 95 # [degree celsius] disk temperature
Ts = 20 # [degree celsius] isothermal surface temperature
k = 2.1 # [W/m per degree celsius] thermal conductivity of medium
D = 1.0 # [m] depth of disk in a semi-infinite medium
# We have to calculate shape factor using relation given in table (3-1)
# We select the relation for the shape factor is for the case D/(2*r)>1
#Calculation
S = (4*math.pi*r)/((math.pi/2)-math.atan(r/(2*D))) # [m] shape factor
# heat lost by the disk is
q = k*S*(Td-Ts) # [W]
#Result
print"Heat lost by disk is:",round(q,2),"W"
```

In [5]:

```
#Example Number 3.4
#Calculate the heat transfer betwwen the disks
# Variable declaration
d = 0.50 # [m] diameter of both disk
r = d/2 # [m] radius of disk
Td1 = 80 # [degree celsius] first disk temperature
Td2 = 20 # [degree celsius] second disk temperature
k = 2.3 # [W/m per degree celsius] thermal conductivity of medium
D = 1.5 # [m] seperation of disk in a infinite medium
# We have to calculate shape factor using relation given in table (3-1)
# We select the relation for the shape factor is for the case D>5*r
#Calculation
import math
S = (4*math.pi*r)/((math.pi/2)-math.atan(r/D)) # [m] shape factor
q = k*S*(Td1-Td2) # [W]
#Result
print"Heat transfer between the disks is:",round(q,1),"W"
```