from __future__ import division
from math import log
# given data
t_hi=80 # in degree C
t_ci=30 # in degree C
t_ho=40 # in degree C
Mh=0.278 # in kg/s
Mc=0.278 # in kg/s
Cph=2.09# # in kJ/kg degree C
Cpc=4.18 # in kJ/kg degree C
U=24 # in W/m**2 degree C
# Energy balance Mh*Cph*(t_hi-t_ho) = Mc*Cpc*(t_co-t_ci)
t_co= Mh*Cph*(t_hi-t_ho)/(Mc*Cpc)+t_ci # in degree C
del_t1=t_hi-t_co #in degree C
del_t2=t_ho-t_ci #in degree C
del_tm= (del_t1-del_t2)/log(del_t1/del_t2)#
Cph=Cph*10**3 # in J/kg degree C
q=Mh*Cph*(t_hi-t_ho)#
#Formula q=U*A*del_tm
A=q/(U*del_tm) # in m**2
print "Surface area of heat exchange = %0.1f square meter" %A
from numpy import pi
# given data
t_hi=160 # in degree C
t_ci=25 # in degree C
t_ho=60 # in degree C
Mh=2 # in kg/s
Mc=2 # in kg/s
Cph=2.035# # in kJ/kg degree C
Cpc=4.187 # in kJ/kg degree C
U=250 # in W/m**2 K
d=0.5 # in m
# Energy balance Mh*Cph*(t_hi-t_ho) = Mc*Cpc*(t_co-t_ci)
t_co= Mh*Cph*(t_hi-t_ho)/(Mc*Cpc)+t_ci # in degree C
del_t1=t_hi-t_co #in degree C
del_t2=t_ho-t_ci #in degree C
del_tm= (del_t1-del_t2)/log(del_t1/del_t2)#
Cph=Cph*10**3 # in J/kg degree C
q=Mh*Cph*(t_hi-t_ho)#
#Formula q=U*pi*d*l*del_tm
l=q/(U*pi*d*del_tm)#
print "Length of the heat exchanger = %0.2f meter" %l
from math import log
from __future__ import division
# given data
t_hi=110 # in degree C
t_ci=35 # in degree C
t_co=75 # in degree C
Mh=2.5 # in kg/s
Mc=1 # in kg/s
Cph=1.9# # in kJ/kg K
Cpc=4.18 # in kJ/kg K
U=300 # in W/m**2 K
# Energy balance Mc*Cpc*(t_co-t_ci) = Mh*Cph*(t_hi-t_ho)
t_ho=t_hi- Mc*Cpc*(t_co-t_ci)/(Mh*Cph) # in degree C
del_t1=t_hi-t_co #in degree C
del_t2=t_ho-t_ci #in degree C
del_tm= (del_t1-del_t2)/log(del_t1/del_t2)#
Cph=Cph*10**3 # in J/kg degree C
q=Mh*Cph*(t_hi-t_ho)#
#Formula q=U*A*del_tm
A=q/(U*del_tm)#
print "Area of the heat exchanger = %0.2f square meter" %A
from math import log
# given data
Fi=0.00014 # in m**2 degree C/W
hi=2000 # in W/m**2degree C
Fo=0.00015 # in m**2 degree C/W
ho=1000 # in W/m**2degree C
di=3*10**-2 # in m
do=4*10**-2 #in m
ro=do/2#
ri=di/2#
k=53 # in W/m degree C
Uo=1/(do/di*1/hi+ do/(2*k)*log(ro/ri) + 1/ho + do*Fi/di + Fo)#
print "The overall heat transfer coefficient = %0.3f W/m**2 degree C" %Uo
# Note : Answer in the book is not accurate
import math
# given data
V=0.15 # in m/s
di=2.5*10**-2 # in m
delta=0.364*10**-6 # in m**2/s
k=0.668 # in W/m degree C
Pr=2.22#
Re=V*di/delta#
# Formula Nu= hi*di/k = 0.023*Re**0.8*Pr**0.3
hi=0.023*Re**0.8*Pr**0.3*k/di # in W/m**2 degree C
# Now, Reynold number for flow of air across the tube
delta=18.22*10**-6 # in m**2/s
k=0.0281 # in W/m degree C
Pr=0.703#
d=2.5*10**-2 # in m
u=10 # in m/s
Re=u*d/delta#
Re=math.floor(Re)#
#The Nusselt number for this case
Nu=(0.04*Re**0.5+ 0.006*Re**(2/3))*Pr**0.4
# Formula Nu= ho*do/k
do=di#
ho=Nu*k/do # in W/m**2 degree C
print "Heat transfer coefficient = %0.3f W/m**2 degree C" %ho
U=1/(1/hi+1/ho)#
print "The overall heat transfer coefficient neglecting the wall resistance = %0.3f W/m**2 degree C" %U
l=1 # in m
Ti=90 # in degree C
To=10 # in degree C
q=U*pi*d*l*(Ti-To) #
print "Heat loss per meter length of the tube = %0.3f W/m" %q
# Note: Answer in the book is wrong
# given data
t_hi=83 # in degree C
t_ho=45 # in degree C
t_ci=25 # in degree C
Mh=5 # in kg/min
Mc=9 # in kg/min
Cph=4.18# # in kJ/kg K
Cpc=2.85 # in kJ/kg K
# Energy balance Mh*Cph*(t_hi-t_ho) = Mc*Cpc*(t_co-t_ci)
t_co= Mh*Cph*(t_hi-t_ho)/(Mc*Cpc)+t_ci # in degree C
print "t_co = %0.2f degree C" %t_co
if(t_co>t_ho) :
print "since t_co > t_ho, hence counter flow arrangment will be suitable"
from math import log
# given data
# (a) For parallel flow arrangment
del_t1=60-10 # in degree C
del_t2=40-30 # in degree C
del_tm=(del_t1-del_t2)/log(del_t1/del_t2) # in degree C
q=100*10**3 # in W
U=75 # in W/m**2 degree C
# Formula q=U*A*del_tm#
A=q/(U*del_tm)#
print "Area for paraller flow arrangment = %0.1f square meter" %A
# (b) For counter flow heat exchange
del_t1=60-30 # in degree C
del_t2=40-10 # in degree C
# In this case
del_tm=(del_t1+del_t2)/2 # in degree C
A=q/(U*del_tm)#
print "Area For counter flow heat exchange = %0.2f square meter" %A
from numpy import pi
# given data
Cp=4180 # in J/kg degree C
miu=0.86*10**-3 # in kg/m-s
Pr=60#
k=0.60 # in W/m degree C
h_fg=2372400 # in W
ho=6000 # in W/m**2 degree C
di=2*10**-2 # in m
d_o=3*10**-2 # in m
t_co=35 # in degree C
t_ci=15 # in degree C
M=0.9#
Re=4*M/(pi*di*miu)#
# since Re > 2300, hence flow inside tube is a turbulent flow.
# Hence Nu= hi*di/k = 0.023*Re**0.8*Pr**0.4
hi= 0.023*Re**0.8*Pr**0.4*k/di#
Uo= 1/(1/10213.6*(d_o/di)+1/ho)#
del_t1=50-15 # in degree C
del_t2=50-35 # in degree C
del_tm=(del_t1-del_t2)/log(del_t1/del_t2) # in degree C
# Formula q= Uo*pi*d_i*L*del_tm = M*Cp*(t_co-t_ci)
L= M*Cp*(t_co-t_ci)/(Uo*pi*d_o*del_tm)#
print "Length of tube = %0.3f meter" %L
q=M*Cp*(t_co-t_ci) # in watt
m=q/h_fg#
print "Rate of condensation = %0.3f kg/sec" %m
from math import log
# given data
Cph=3850# # in J/kg degree C
t_hi=100 # in degree C
t_ci=20 # in degree C
t_ho=50 # in degree C
Mh=8 # in kg/s
Mc=10 # in kg/s
Cpc=4.18*10**3 # in J/kg degree C
U=400 # in W/m**2 degree C
# Energy balance Mh*Cph*(t_hi-t_ho) = Mc*Cpc*(t_co-t_ci)
t_co= Mh*Cph*(t_hi-t_ho)/(Mc*Cpc)+t_ci # in degree C
# Heat load
q=Mh*Cph*(t_hi-t_ho) # in W
# (a) Parallel flow
del_t1=90 # in degree C
del_t2=3.16 # in degree C
del_tm= (del_t1-del_t2)/log(del_t1/del_t2)#
A=q/(U*del_tm)#
print "Surface area for parallel flow = %0.3f meter square" %A
# (b) Counter flow heat exchanger
del_t1=53.16 # in degree C
del_t2=40 # in degree C
del_tm_counter= (del_t1-del_t2)/log(del_t1/del_t2)#
A=q/(U*del_tm_counter)#
print "Surface area for counter flow heat exchanger = %0.1f meter square" %A
#(c) One shell pass and two tube pass.
#here
t1=10 # in degree C
t2=46.84 # in degree C
T1=100 # in degree C
T2=50 # in degree C
P=(t2-t1)/(T1-t1)#
R=(T1-T2)/(t2-t1)#
F=0.88#
del_tm=F*del_tm_counter # in degree C
A=q/(U*del_tm)#
print "Surface area for one shell pass and two tube pass = %0.2f meter square" %A
# (d) For cross flow, correction factor
F=0.9#
del_tm=F*del_tm_counter#
A=q/(U*del_tm)#
print "Surface area for cross flow = %0.3f meter square" %A
from math import exp
# given data
Cpc=4.18*10**3 # in J/kg degree C
Mc=1 # in kg/s
Mh=2.4 # in kg/s
Cph=2050# # in J/kg degree C
t_hi=100 # in degree C
t_ci=20 # in degree C
C_c=Mc*Cpc # in W/degree C
C_h=Mh*Cph # in W/degree C
U=300 # in W/m**2 degree C
A=10 # in m**2
C_min=C_c#
C_max=C_h#
N= A*U/C_min#
C=C_min/C_max#
# Effectiveness for counter flow heat exchanger
epsilon= (1-exp(-N*(1-C)))/(1-C*exp(-N*(1-C)))#
# Total heat transfer
q=epsilon*C_min*(t_hi-t_ci) # in watt
print "Total heat transfer = %0.3f kW" %(q*10**-3)
t_co=t_ci+epsilon*C*(t_hi-t_ci) #
print "Exit temperature of water = %0.3f degree C" %t_co
from math import log
# given data
t_hi=135 # in degree C
t_ci=20 # in degree C
t_ho=65 # in degree C
t_co=50 # in degree C
# Energy balance Mh*Cph*(t_hi-t_ho) = Mc*Cpc*(t_co-t_ci)
# C =C_min/C_max = Mh*Cph/( Mc*Cpc)
C= (t_co-t_ci)/(t_hi-t_ho)#
epsilon=(t_hi-t_ho)/(t_hi-t_ci)#
# Also epsilon = epsilon_parallel = (1-exp(-NTU*(1+C)))/(1+C)
NTU= -log(1-epsilon*(1+C))/(1+C)#
# if the existing heat exchanger is to be used as counter flow mode, its NTU will not change, i.e.
epsilon_c= (1-exp(-NTU*(1-C)))/((1-C*exp(-NTU*(1-C))))#
# Exit temperature
# (i) Hot fluid
t_ho=t_hi-epsilon_c*(t_hi-t_ci) # in degree C
print "Exit temperature for hot fluid = %0.3f degree C" %t_ho
#(ii) Cold fluid
t_co= t_ci+epsilon_c*C*(t_hi-t_ci)#
print "Exit temperature for cold fluid = %0.1f degree C" %t_co
# (iii) # If the parallel flow heat exchanger is too long, then body fluid will have common outlet temperature (t)
# From MCp_h*(t_hi-t) = MCp_c*(t-t_ci)
t=(C*t_hi+t_ci)/(1+C)#
print "The minimum temperature to which the oil may be cooled by increasing the tube length with parallel flow operation,"
print "in degree C = %0.1f" %t
from math import log
# given data
t_hi=78 # in degree C
t_ci=23 # in degree C
t_ho=65 # in degree C
t_co=36 # in degree C
# Energy balance Mh*Cph*(t_hi-t_ho) = Mc*Cpc*(t_co-t_ci)
# C =C_min/C_max = Mh*Cph/( Mc*Cpc)
C= (t_co-t_ci)/(t_hi-t_ho)#
epsilon=(t_hi-t_ho)/(t_hi-t_ci)#
# Formula epsilon = (1-exp(-N*(1+C)))/(1+C)
N= -log(1-epsilon*(1+C))/(1+C)#
# When flow rates of both fluids are doubled , the deat capacity ratio will not change, i.e.
# C=1
# MCp_new =2* MCp_old
# N=U*A/C_min=N/2
N=N/2#
epsilon=(1-exp(-N*(1+C)))/(1+C)#
# exit temperature
t_ho=t_hi-epsilon*(t_hi-t_ci) # in degree C
t_co= t_ci+epsilon*(t_hi-t_ci)#
print "Exit temperature in degree C is : ",round(t_ho,2),"and",round(t_co,2)
# Note: Answer in the book is wrong due to put wrong value of t_ci in second last line
from numpy import pi
# given data
t_hi=125 # in degree C
t_ci=22 # in degree C
Mh=21 # in kg/s
Mc=5 # in kg/s
C_ph=2100 # in J/kg K
C_pc=4100 # in J/kg K
Ch=Mh*C_ph # in Js/kg
Cc=Mc*C_pc # in Js/kg
C_min=Cc # in Js/kg
C_max=Ch # in Js/kg
U=325 # in W/m**2 K
d=2.2*10**-2 # in m
l=5 # in m
total_tube=195 # number of total tubes
A=pi*d*l*total_tube
NTU=U*A/C_min#
C=C_min/C_max#
epsilon = (1-exp(-NTU*(1-C)))/(1-C*exp(-NTU*(1-C)))#
t_co= t_ci+epsilon*(t_hi-t_ci)#
t_ho= t_hi-epsilon*Cc/Ch*(t_hi-t_ci)#
print "Exit temperature in degree C :",round(t_co,1),"and",round(t_ho,2)
# Total heat transfer
q=epsilon*C_min*(t_hi-t_ci)#
print "Total heat transfer = %0.3f kW" %(q*10**-3)
from math import exp
# given data
t_hi=94 # in degree C
t_ci=15 # in degree C
Mw=0.36 # in kg/s
Mo=0.153 # in kg/s
C_po=2*10**3 # in J/kg K
C_pw=4.186*10**3 # in J/kg K
U=10.75*10**2 # in W/m**2 K
A=1 # in m**2
Ch=Mo*C_po # in kW/K
Cc=Mw*C_pw # in kW/K
C_min=Ch # in W/K
C_max=Cc # in W/K
C=C_min/C_max#
NTU=U*A/C_min#
# Effectiveness
N=NTU#
epsilon = (1-exp(-N*(1-C)))/(1-C*exp(-N*(1-C)))#
mCp_min=C_min#
q_max= mCp_min*(t_hi-t_ci) # in W
q_actual= epsilon*q_max # in W
print "Total heat transfer = %0.3f watt" %q_actual
# Outlet temp. of water
t_co= q_actual/Cc+t_ci # in degree C
print "Outlet temperature of water = %0.3f degree C" %t_co
# Outlet temp. of oil
t_ho=t_hi-q_actual/Ch #in degree C
print "Outlet temperature of oil = %0.3f degree C" %t_ho
#Note: Evaluation of Cc and Ch in the book is wrong so the Answer in the book is wrong
from math import log
# given data
U=1800 # in W/m**2 degree C
h_fg=2200*10**3 # in J/kg
t_ci=20 # in degree C
t_co=90 # in degree C
del_t1=120-20 # in degree C
del_t2=120-90 # in degree C
del_tm=(del_t1-del_t2)/log(del_t1/del_t2) # in degree C
Mc=1000/3600 # in kg/s
Cc=4180 # in kg/s
# Rate of heat transfer
q=Mc*Cc*(t_co-t_ci) # in watt
# Formula q=U*A*del_tm
A=q/(U*del_tm)#
print "Surface area = %0.3f square meter" %A
#Rate of condensation of steam
ms=q/h_fg # in kg/sec
print "Rate of condensation of steam = %0.4f kg/sec" %ms
from math import log
# given data
Mh=10000/3600 # in kg/sec
Mc=8000/3600 # in kg/sec
Cph=2095 # in J/kg K
Cpc=4180 # in J/kg K
t_hi=80 # in degree C
t_ci=25 # in degree C
t_ho=50 # in degree C
U=300 # in W/m**2 K
# Energy balance Mh*Cph*(t_hi-t_ho) = Mc*Cpc*(t_co-t_ci)
t_co= Mh*Cph*(t_hi-t_ho)/(Mc*Cpc)+t_ci # in degree C
del_t1=t_hi-t_co #in degree C
del_t2=t_ho-t_ci #in degree C
del_tm= (del_t1-del_t2)/log(del_t1/del_t2)#
q=Mh*Cph*(t_hi-t_ho)#
#Formula q=U*A*del_tm
A=q/(U*del_tm) # in m**2
print "Surface area of heat exchange = %0.2f square meter" %A
from math import log
from numpy import pi
# given data
ho=5000 # in W/m**2 degree C
rho=988.1 # in kg/m**3
K=0.6474#
D=555*10**-9 # in m**2/s
Pr=3.54#
n=100#
d_i=2.5*10**-2 # in m
ri=d_i/2#
d_o=2.9*10**-2 # in m
ro=d_o/2#
Cp=4174 # in J/kg degree C
Mc=8.333 # in kg/s
Mw=Mc#
t_c1=30 # in degree C
t_c2=70 # in degree C
t_n1=100 # in degree C
t_n2=t_n1 # in degree C
R_fi=0.0002 # in m**2 degree C/W (In the book, there is miss print in this line,they took here R_fi = .002)
# Heat gain by water
Q=Mc*Cp*(t_c2-t_c1)#
# Also Q= U*A*del_tm
del_t1=t_n1-t_c1 #in degree C
del_t2=t_n2-t_c2 #in degree C
del_tm= (del_t1-del_t2)/log(del_t1/del_t2)#
# Mw= 1/4*pi*d_i**2*V*rho*N, here
N=n#
V=4*Mw/(pi*d_i**2*rho*N)#
# Formula Re=V*d_i/v, here
v=D#
Re=V*d_i/v#
# Formula Nu= hi*d_i/K = 0.023*Re**0.8*Pr**0.33
hi= 0.023*Re**0.8*Pr**0.33*K/d_i#
# Formula 1/Vi= 1/hi + R_fi + ri/ro*1/ho
Vi= 1/(1/hi + R_fi + ri/ro*1/ho) # in W/m**2 degree C
#Formula Q = Vi*(N*pi*d_i*L)*del_tm
L= Q/(Vi*(N*pi*d_i)*del_tm)#
print "Length of the tube bundle = %0.1f m" %L