In [1]:

```
#Example Number 10.3
# influence of fouling factor
#Variable declaration
Rf = 0.0002
# using Rf=(1/hi-1/h_clean)
h_clean = 1961.0 # [W/square meter degree celsius]
# we obtain
#Calculation
hi = 1/(Rf+(1/h_clean)) # [W/square meter degree celsius]
#Result
print "hi is:",round(hi)
print "% reduction because of fouling factor is ",round((h_clean-hi)*100/h_clean)
```

In [2]:

```
#Example Number 10.4
# calculation of heat exchanger size from known temperatures
#Variable declaration
import math
m_dot = 68.0 # [kg/min] water flow rate
U = 320.0 # [W/sq m degree C] overall heat transfer coefficient
T1 = 35.0 # [degree celsius] initial temperature
T2 = 75.0 # [degree celsius] final temperature
Toe = 110.0 # [degree celsius] oil entering temperature
Tol = 75.0 # [degree celsius] oil leaving temperature
Cw = 4180.0 # [J/kg degree celsius] water specific heat capacity
# the total heat transfer is determined from the energy absorbed by the water:
#Claculation
q = m_dot*Cw*(T2-T1) # [J/min]
q = q/60 # [W]
# since all the fluid temperatures are known, the LMTD can be calculated by using the temperature scheme in figure 10-7b
dT_m = ((Toe-Tol)-(T2-T1))/(math.log((Toe-Tol)/(T2-T1))) # [degree celsius]
# then, since q = U*A*dT_m
A = q/(U*dT_m) # [square meter] area of heat-exchanger
#Result
print "Area of heat-exchanger is",round(A,2),"square meter"
```

In [3]:

```
#Example Number 10.5
# shell-and-tube heat exchanger
# Variable declaration
# determine a correction factor from figure 10-8 to be used
# the parameters according to figure 10-8(page no.-532) are
T1 = 35 # [degree celsius]
T2 = 75 # [degree celsius]
t1 = 110 # [degree celsius]
t2 = 75 # [degree celsius]
P = (t2-t1)/(T1-t1)
R = (T1-T2)/(t2-t1)
# so the correction factor is
F = 0.81 # from figure 10-10(page no.-534)
# and the heat transfer is q = U*A*F*dT_m
# so that. from example 10-4 we have
U = 320 # [W/sq m deg C] overall heat transfer coefficient
q = 189493.33 # [W]
#Calculation
dT_m = 37.44 # [degree celsius]
A = q/(U*F*dT_m) # [square meter]
#Result
print "Area required for this exchanger is",round(A,2),"square meter"
```

In [4]:

```
#Example Number 10.6
# design of shell-and-tube heat exchanger
# Variable declaration
import math
m_dot_c = 3.8 # [kg/s] water flow rate
Ti = 38 # [degree celsius] initial temperature of water
Tf = 55 # [degree celsius] final temperature of water
m_dot_h = 1.9 # [kg/s] water flow rate entering the exchanger
Te = 93 # [degree celsius] entering water temperature
U = 1419 # [W/sq m degree C] overall heat transfer coefficient
d = 0.019 # [m] diameter of tube
v_avg = 0.366 # [m/s] average water velocity in exchanger
Cc = 4180 # [] specific heat of water
Ch = Cc # [] specific heat
rho = 1000 # [kg/cubic meter] density of water
# we first assume one tube pass and check to see if it satisfies the conditions of this problem. the exit temperature of the hot water is calculated from
#Calculation
dTh = m_dot_c*Cc*(Tf-Ti)/(m_dot_h*Ch) # [degree celsius]
Th_exit = Te-dTh # [degree celsius]
# the total required heat transfer is obtained for the cold fluid is
q = m_dot_c*Cc*(Tf-Ti) # [W]
# for a counterflow exchanger, with the required temperature
LMTD = ((Te-Tf)-(Th_exit-Ti))/math.log((Te-Tf)/(Th_exit-Ti)) # [degree celsius]
dTm = LMTD # [degree celsius]
A = q/(U*dTm) # [square meter]
#calculate the total area with
A1 = m_dot_c/(rho*v_avg) # [square meter]
# this area is the product of number of tubes and the flow area per tube:
n = A1*4/(math.pi*d**(2)) # no. of tubes
n = round(n)
# rounding of value of n because no. of pipe is an integer value
# the surface area per tube per meter of length is
S = math.pi*d # [square meter/tube meter]
# total surface area required for a one tube pass exchanger was calculated above .
# we may thus compute the length of tube for this type of exchanger from
L = A/(S*n) # [m]
# this length is greater than the allowable 2.438 m, so we must use more than one tube pass.
# we next try two tube passes. from figure 10-8(page no.-532)
F = 0.88
A_total = q/(U*F*dTm) # [square meter]
# the number of tubes per pass is still 37 because of the velocity requirement. for the two pass exchanger the total surface area is now related to the length by
L1 = A_total/(2*S*n) # [m]
# this length is within the 2.438 m requirement, so the final design choice is
#Result
print "Number of tubes per pass",n
print "Number of passes = 2"
print "Length of tube per pass =",round(L1,3),"m"
```

In [5]:

```
#Example Number 10.7
# cross flow exchanger with one fluid mixed
# Variable declaration
import math
m_dot = 5.2 # [kg/s] mass flow rate
T1 = 130.0 # [degree celsius] temperature of entering steam
T2 = 110.0 # [degree celsius] temperature of leaving steam
t1 = 15.0 # [degree celsius] temperature of entering oil
t2 = 85.0 # [degree celsius] temperature of leaving oil
c_oil = 1900.0 # [J/kg degree celsius] heat capacity of oil
c_steam = 1860.0 # [J/kg degree celsius] heat capacity of steam
U = 275 # [W/sq m deg C] overall heat transfer coefficient
#the total heat transfer may be obtained from an energy balance on the steam
#Calculation
q = m_dot*c_steam*(T1-T2) # [W]
# we can solve for the area from equation (10-13). the value of dT_m is calculated as if the exchanger were counterflow double pipe,thus
dT_m = ((T1-t2)-(T2-t1))/math.log((T1-t2)/(T2-t1)) # [degree celsius]
# t1,t2 is representing the unmixed fluid(oil) and T1,T2 is representing the mixed fluid(steam) so that:
# we calculate
R = (T1-T2)/(t2-t1)
P = (t2-t1)/(T1-t1)
# consulting figure 10-11(page no.-534) we find
F = 0.97
# so the area is calculated from
A = q/(U*F*dT_m) # [square meter]
#Result
print "Surface area of heat exchanger is ",round(A,2),"square meter"
```

In [6]:

```
#Example Number 10.8
# effects of off-design flow rates for exchanger in example 10-7
# Variable declaration
# we did not calculate the oil flow in example 10-7 but can do so now from
q = 193 # [kW]
c_oil = 1.9 # [J/kg degree celsius] heat capacity of oil
t1 = 15 # [degree celsius] temperature of entering oil
t2 = 85 # [degree celsius] temperature of leaving oil
m_dot_o = q/(c_oil*(t2-t1)) # [kg/s]
# the new flow rate will be half this value
m_dot_o = m_dot_o/2 # [kg/s]
# we are assuming the inlet temperatures remain the same at 130 degree celsius for the steam and 15 degree celsius for the oil.
# the new relation for the heat transfer is q = m_dot_o*c_oil*(Teo-15) = m_dot_s*cp*(130-Tes) (a)
# but the exit temperatures, Teo and Tes are unknown. furthermore, dT_m is unknown without these temperatures, as are the values of R and P from figure 10-11(page no.-535). this means we must use an iterative procedure to solve for the exit temperatures using equation (a) and q = U*A*F*dT_m (b)
# the general procedure is to assume values of the exit temperatures until the q's agree between equations(a) and (b).
print "the objective of this example is to show that an iterative procedure is required when the inlet and outlet temperatures are not known or easily calculated"
print "there is no need to go through this iteration because it can be avoided by using the techniques described in section 10-6"
```

In [8]:

```
#Example Number 10.9
# off-design calculation using E-NTU method
#Variable declaration
import math
m_dot_o = 0.725 # [kg/s] oil flow rate
m_dot_s = 5.2 # [kg/s] steam flow rate
t1 = 15 # [degree celsius] temperature of entering oil
T1 = 130 # [deg C] temperature of entering steam
c_oil = 1900 # [J/kg degree celsius] heat capacity of oil
c_steam = 1860 # [J/kg degree celsius] heat capacity of steam
# for the steam
Cs = m_dot_s*c_steam # [W/degree celsius]
# for the oil
Co = m_dot_o*c_oil # [W/degree celsius]
# so the oil is minium fluid. we thus have
C_min_by_C_max = Co/Cs
U = 275 # [W/sq m deg C] overall heat transfer coefficient
A = 10.83 # [sq meter] surface area of heat exchanger
NTU = U*A/Co
# we choose to use the table and note that Co(minimum) is unmixed and Cs(maximum) is mixed so that the first relation in the table 10-3 applies.
# we therfore calculate E(effectiveness) as
E = (1/C_min_by_C_max)*(1-math.exp(-C_min_by_C_max*(1-math.exp(-NTU))))
# if we were using figure 10-14(page no.-544) we would have to evaluate
C_mixed_by_C_unmixed = Cs/Co
# and would still determine
E = 0.8 # approximately
# now, using the effectiveness we can determine the temperature difference of the minimum fluid(oil as)
dT_o = E*(T1-t1) # [degree celsius]
# so that heat transfer is
q = m_dot_o*c_oil*(dT_o) # [W]
q_initial = 193440 # [W] heat transfer when oilrate is 100 %
print "A Reduction in the oil flow rate of 50 % causes a reduction in heat transfer of only ",round((q_initial-q)*100/q_initial),"percent"
```

In [10]:

```
#Example Number 10.10
# off-design calculation of exchanger in example 10-4
# Variable declaration
m_dot_c = 68 # [kg/min] water flow rate
T1 = 35 # [degree celsius] initial temperature
T2 = 75 # [degree celsius] final temperature
Toe = 110 # [degree celsius] oil entering temperature
Tol = 75 # [degree celsius] oil leaving temperature
Cc = 4180 # [J/kg degree celsius] water specific heat capacity
Ch = 1900 # [J/kg degree celsius] heat capacity of oil
U = 320 # [W/squ m deg C] overall heat transfer coefficient
A = 15.814568 # [sq m] area of heat exchanger (from example 10-4)
# the flow rate of oil is calculated from the energy balance for the original problem:
#Calculation
m_dot_h = m_dot_c*Cc*(T2-T1)/(Ch*(Toe-Tol)) # [kg/min]
# the capacity rates for the new conditions are calculated as
C_h = m_dot_h*Ch/60 # [W/degree celsius]
C_c = m_dot_c*Cc/60 # [W/degree celsius]
# so that the water (cold fluid) is the minimum fluid, and
C_min_by_C_max = C_c/C_h
NTU_max = U*A/C_c
# from figure 10-13(page no.-542) or table 10-3(page no.-543) the effectiveness is
E = 0.744
# and because the cold fluid is the minimum, we can write
dT_cold = E*(Toe-T1) # [degree celsius]
# and the exit water temperature is
Tw_exit = T1+dT_cold # [degree celsius]
# the total heat transfer under the new flow conditions is calculated as
m_dot_c = 40 # [kg/min]
q = m_dot_c*Cc*dT_cold/60 # [W]
#Result
print "Exit water temperature is",Tw_exit,"degree celcius"
print "The total heat transfer under the new flow conditions is",round(q/1000,1),"kW"
```

In [11]:

```
#Example Number 10.11
# cross-flow exchanger with both fluid unmixed
# Variable declaration
pa = 101325 # [Pa] pressure of air
Ti = 15.55 # [degree celsius] initial temperature of air
Tf = 29.44 # [degree celsius] final temperature of air
Thw = 82.22 # [degree celsius] hot water temperature
U = 227 # [W/sq m deg C] overall heat transfer coefficient
S = 9.29 # [square meter] total surface area of heat exchanger
R = 287 # [] universal gas constant
Cc = 1006 # [J/kg degree celsius] specific heat of air
Ch = 4180 # [J/kg degree celsius] specific heat of water
# the heat transfer is calculated from the energy balance on the air. first, the inlet air density is
rho = pa/(R*(Ti+273.15)) # [kg/cubic meter]
# so the mass flow of air (the cold fluid) is
mdot_c = 2.36*rho # [kg/s]
# the heat transfer is then
q = mdot_c*Cc*(Tf-Ti) # [W]
# from the statement of the problem we do not know whether the air or water is the minimum fluid. a trial and error procedur must be used
# we assume that the air is the minimum fluid and then check out our assumption.then
Cmin = mdot_c*Cc # [W/degree celsius]
NTU_max = U*S/Cmin
# and the effectiveness based on the air as the minimum fluid is
E = (Tf-Ti)/(Thw-Ti)
# we must assume values for the water flow rate until we are able to match the performance as given by figure 10-15 or table 10-3. we first note that
Cmax = mdot_c*Cc # [W/degree celsius] (a)
# NTU_max = U*S/Cmin (b)
# E = dT_h/(Thw-Ti) (c)
# dT_h = q/Cmin (d)
# now we assume different values for Cmin abd calculate different-different values for NTU_max, dT_h, and E
# for
Cmin_by_Cmax1 = 0.5
Cmin1 = Cmin_by_Cmax1*Cmax # [W/degree celsius]
NTU_max1 = U*S/Cmin1
dT_h1 = q/Cmin1 # [degree celsius]
E1_c1 = dT_h1/(Thw-Ti) # calculated
E1_t1 = 0.65 # from table
# for
Cmin_by_Cmax2 = 0.25
Cmin2 = Cmin_by_Cmax2*Cmax # [W/degree celsius]
NTU_max2 = U*S/Cmin2
dT_h2 = q/Cmin2 # [degree celsius]
E1_c2 = dT_h2/(Thw-Ti) # calculated
E1_t2 = 0.89 # from table
# for
Cmin_by_Cmax3 = 0.22
Cmin3 = Cmin_by_Cmax3*Cmax # [W/degree celsius]
NTU_max3 = U*S/Cmin3
dT_h3 = q/Cmin3 # [degree celsius]
E1_c3 = dT_h3/(Thw-Ti) # calculated
E1_t3 = 0.92 # from table
# we estimate the water-flow rate as about
Cmin = 660 # [W/degree celsius]
mdot_h = Cmin/Ch # [kg/s]
# the exit water temperature is accordingly
Tw_exit = Thw-q/Cmin # [degree celsius]
print "The exit water temperature is",round(Tw_exit,1),"degree celsius"
print "the heat transfer is",round(q/1000,2),"kW"
```

In [13]:

```
#Example Number 10.13
# shell and tube exchangeras air heater
# Variable declaration
import math
To = 100.0 # [degree celsius] temperature of hot oil
m_dot_a = 2.0 # [kg/s] flow rate of air
T1 = 20.0 # [degree celsius] initial temperature of air
T2 = 80.0 # [degree celsius] final temperature of air
Cp_o = 2100.0 # [J/kg deg C] specific heat of the oil
Cp_a = 1009.0 # [J/kg deg C] specific heat of the air
m_dot_o = 3 # [kg/s] flow rate of oil
U = 200.0 # [W/sq m] overall heat transfer coefficient
# the basic energy balance is m_dot_o*Cp_o*(To-Toe) = m_dot_a*Cp_a*(T2-T1)
#Calculation
Toe = To-m_dot_a*Cp_a*(T2-T1)/(m_dot_o*Cp_o) # [degree celsius]
# we have
m_dot_h_into_Ch = m_dot_o*Cp_o # [W/degree celsius]
m_dot_c_into_Cc = m_dot_a*Cp_a # [W/degree celsius]
# so the air is minimum fluid
C = m_dot_c_into_Cc/m_dot_h_into_Ch
# the effectiveness is
E = (T2-T1)/(To-T1)
# now we may use figure 10-16 to obtain NTU.
NTU = -(1+C**(2))**(-1.0/2.0)*math.log((2/E-1-C-(1+C**2)**(1.0/2.0))/(2/E-1-C+(1+C**2)**(1.0/2.0)))
# now, we calcuate the area as
A = NTU*m_dot_c_into_Cc/U # [square meter]
#Result
print "Area required for the heat exchanger is",round(A,2),"square meter"
```

In [14]:

```
#Example Number 10.14
# ammonia condenser
#Variable declaration
Ta = 50 # [degree C] temperature of entering ammonia vapour
Tw1 = 20 # [degree celsius] temperature of entering water
q = 200 # [kW] total heat transfer required
U = 1 # [kW/sq m deg C] overall heat transfer coefficient
Tw2 = 40 # [deg C] temperature of exiting water
Cw = 4.18 # [kJ/kg degree celsius] specific heat of water
# the mass flow can be calculated from the heat transfer with
m_dot_w = q/(Cw*(Tw2-Tw1)) # [kg/s]
# because this is the condenser the water is the minimum fluid and
C_min = m_dot_w*Cw # [kW/degree celsius]
# the value of NTU is obtained from the last entry of table 10-4
E = 0.6 # effectiveness
#Calculation
import math
NTU = -math.log(1-E)
# so that area is calculated as
A = C_min*NTU/U # [square meter]
# when the flow rate is reduced in half the new value of NTU is
NTU1 = U*A/(C_min/2)
# and the effectiveness is computed from the last entry of table 10-3
E1 = 1-math.exp(-NTU1)
# the new water temperature difference is computed as
dT_w = E1*(Ta-Tw1) # [degree celsius]
# so that the heat transfer is
q1 = C_min*dT_w/2 # [kW]
#Result
print "Area to achieve a heat exchanger effectiveness of 60% with an exit water temperature of 40 degree celsius is",round(A,2),"square meter"
print "by reducing the flow rate we have lowered the heat transfer by",(q-q1)*100/q," percent"
```

In [15]:

```
#Example Number 10.16
# heat-transfer coefficient in compact exchanger
# Variable declaration
p = 101325.0 # [Pa] pressure of air
T = 300.0 # [K] temperature of entering air
u = 15.0 # [m/s] velocity of air
# we obtain the air properties from table A-5
rho = 1.774 # [kg/cubic meter] density of air
Cp = 1005.7 # [J/kg degree celsius] specific heat of air
mu = 1.983*10**(-5) # [kg/m s] viscosity of air
Pr = 0.708 # prandtl number
# from figure 10-19 we have
Ac_by_A = 0.697
sigma = 0.697
#Calculation
Dh = 3.597*10**(-3) # [m]
# the mass velocity is thus
G = ((rho*u)/sigma) # [kg/square meter s]
# and the reynolds number is
Re = Dh*G/mu
# from figure 10-19(page no.-557) we can read
St_into_Pr_exp_2_by_3 = 0.0036
# and the heat transfer coefficient is
h = St_into_Pr_exp_2_by_3*G*Cp*(Pr)**(-2.0/3.0) # [W/sq m deg C]
#Result
print "Heat-transfer coefficient is",round(h),"W/square meter degree celsius"
```