print"\t example 10.1 \t"
print"\t approximate values are mentioned in the book \t"
#given
T1=250.; # inlet hot fluid,F
T2=250.; # outlet hot fluid,F
t1=95.; # inlet cold fluid,F
t2=145.; # outlet cold fluid,F
W=16000.; # lb/hr
w=410.; # lb/hr
#solution
from math import log
print"\t 1.for heat balance \t"
print"\t for crude \t"
c=0.485; # Btu/(lb)*(F)
Q=((W)*(c)*(t2-t1)); # Btu/hr
print"\t total heat required for crude is : Btu/hr \t",Q
print"\t for steam \t"
l=945.5; # Btu/(lb)
Q=((w)*(l)); # Btu/hr
print"\t total heat required for steam is : Btu/hr \t",Q
delt1=T2-t1; #F
delt2=T1-t2; # F
print"\t delt1 is : F \t",delt1
print"\t delt2 is : F \t",delt2
LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));
print"\t LMTD is : F \t",LMTD
print"\t On the assumption that the fluids are mixed between passes each pass must be solved independently Since only two passes are present in this exchanger it is simply a matter of assuming the temp at the end of the first pass More than half the heat load must be transferred in the first pass therefore assume ti at the end of the first pass is 125 degres f \n"
ti=125; # F
tc=((t1)+(ti))/2; # caloric temperature of cold fluid,F
print"\t caloric temperature of cold fluid is : F \t",tc
print"\t hot fluid:shell side,steam \t"
ho=(1500); # condensation of steam Btu/(hr)*(ft**2)*(F)
print"\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t",ho
print"\t cold fluid:inner tube side,crude \t"
Nt=86;
n=2; # number of passes
L=12; #ft
at1=0.594; # flow area, in**2,from table 10
at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48
print"\t flow area is : ft**2 \t",at
Gt=(W/(.177)); # mass velocity,lb/(hr)*(ft**2)
print"\t mass velocity is : lb/(hr)*(ft**2) \t",Gt
mu2=2.95*2.42; # at 145F,lb/(ft)*(hr)
D=(0.87/12); # ft
Ret1=((D)*(Gt)/mu2); # reynolds number
print"\t reynolds number is : \t",Ret1
mu3=4.8*2.42; # at 110F,lb/(ft)*(hr)
D=(0.87/12); # ft
Ret2=((D)*(Gt)/mu3); # reynolds number
print"\t reynolds number is : \t",Ret2
c=0.485; # Btu/(lb)*(F),at 120F,from fig.2
k=0.0775; # Btu/(hr)*(ft**2)*(F/ft), from table 4
Pr=((c)*(mu3)/k); # prandelt number
print"\t prandelt number is : \t",Pr
Hi=((1.86)*(k/D)*((Ret2*(D/L)*Pr)**(1/3))); # using eq.6.1,Btu/(hr)*(ft**2)*(F)
print"\t Hi is : Btu/(hr)*(ft**2)*(F) \t",Hi
muw=1.2*2.42; # lb/(ft)*(hr),at 249F from fig.14
phyt=(mu3/muw)**0.14;
print"\t phyt is : \t",phyt # from fig.24
hi=(Hi)*(phyt); # from eq.6.37
print"\t Correct hi to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t",hi
tp=(tc)+(((ho)/(hi+ho))*(T1-tc)); # from eq.5.31
print"\t tp is : F \t",tp
delt=tp-tc; #F
print"\t delt is : F \t",delt
Ai1=0.228 # internal surface per foot of length,ft
Ai=(Nt*L*Ai1/2); # ft**2
print"\t total surface area is : ft**2 \t",round(Ai,1)
delt3=((hi*Ai*delt)/(W*c)); # delt3=ti-t1, F
print"\t delt3 is : F \t",round(delt3,1)
ti=t1+delt3; # F
print"\t ti is : F \t",round(ti,1)
print"The oil now enters the second pass at given 126.9 f"
# end
print"\t example 10.2 \t"
print"\t approximate values are mentioned in the book \t"
#gien
T1=250.; # inlet hot fluid,F
T2=250.; # outlet hot fluid,F
t1=95.; # inlet cold fluid,F
t2=145.; # outlet cold fluid,F
W=16000.; # lb/hr
w=423.; # lb/hr
#solution
from math import log10
print"\t 1.for heat balance \t"
print"\t for kerosene \t"
c=0.5; # Btu/(lb)*(F)
Q=((W)*(c)*(t2-t1)); # Btu/hr
print"\t total heat required for kerosene is : Btu/hr \t",Q
print"\t for steam \t"
l=945.5; # Btu/(lb)
Q=((w)*(l)); # Btu/hr
print"\t total heat required for steam is : Btu/hr \t",Q
delt1=T2-t1; #F
delt2=T1-t2; # F
print"\t delt1 is : F \t",delt1
print"\t delt2 is : F \t",delt2
LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));
print"\t LMTD is : F \t",LMTD
tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F
print"\t caloric temperature of cold fluid is : F \t",tc
print"\t hot fluid:shell side,steam \t"
ho=(1500); # condensation of steam Btu/(hr)*(ft**2)*(F)
print"\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t",ho
print"\t cold fluid:inner tube side,kerosene \t"
Nt=86;
n=2; # number of passes
L=12; #ft
at1=0.594; # flow area, in**2,from table 10
at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48
print"\t flow area is : ft**2 \t",at
Gt=(W/(.177)); # mass velocity,lb/(hr)*(ft**2)
print"\t mass velocity is : lb/(hr)*(ft**2) \t",Gt
mu2=1.36*2.42; # at 145F,lb/(ft)*(hr)
D=(0.87/12); # ft
Ret1=((D)*(Gt)/mu2); # reynolds number
print"\t reynolds number is : \t",Ret1
mu3=1.75*2.42; # at 120F,lb/(ft)*(hr)
D=(0.87/12); # ft
Ret2=((D)*(Gt)/mu3); # reynolds number
print"\t reynolds number is : \t",Ret2
Z1=331; # Z1=(L*n/D)
jH=3.1; # from fig 24
mu4=1.75; # cp and 40 API
Z2=0.24; # Z2=((k)*(c*mu4/k)**(1/3)), from fig 16
Hi=((jH)*(1/D)*(Z2)); # using eq.6.15a,Btu/(hr)*(ft**2)*(F)
print"\t Hi is : Btu/(hr)*(ft**2)*(F) \t",Hi
ID=0.87; # ft
OD=1; #ft
Hio=(Hi*(ID/OD)); #Btu/(hr)*(ft**2)*(F), from eq.6.5
print"\t Hio is : Btu/(hr)*(ft**2)*(F) \t",Hio
tw=(tc)+(((ho)/(Hio+ho))*(T1-tc)); # from eq.5.31
print"\t tw is : F \t",tw
muw=1.45; # lb/(ft)*(hr),at 249F from fig.14
phyt=(mu3/muw)**0.14;
print"\t phyt is : \t",phyt # from fig.24
hio=(Hio)*(phyt); # from eq.6.37
print"\t Correct hio to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t",hio
delt=tw-tc; #F
print"\t delt is : F \t",delt
print"\t Since the kerosene has a viscosity of only 1.75 cp at the caloric temperature and delt=129F, free convection should be investigated. \t"
s=0.8;
row=50; # lb/ft**3, from fig 6
s1=0.810; # at 95F
s2=0.792; # at 145F
bita=((s1**2-s2**2)/(2*(t2-t1)*s1*s2)); # /F
print"\t beta is : /F \t",bita
G=((D**3)*(row**2)*(bita)*(delt)*(4.18*10**8)/(mu3**2));
print"\t G is : \t",G
psy=((2.25)*(1+(0.01*G**(1/3)))/(log10(Ret2)));
print"\t psy is : \t",psy
hio1=(hio*psy);
print"\t corrected hio1 is : Btu/(hr)*(ft**2)*(F) \t",hio1
Uc=2*((hio1)*(ho)/(hio1+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)
print"\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t",round(Uc,1)
A2=0.2618; # actual surface supplied for each tube,ft**2,from table 10
A=(Nt*L*A2); # ft**2
print"\t total surface area is : ft**2 \t",A
UD=((Q)/((A)*(delt)));
print"\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t",round(UD,1)
Rd=-0.407*((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu
print"\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t",round(Rd,4)
# end
print"\t example 10.3 \t"
print"\t approximate values are mentioned in the book \t"
#given
T1=250.; # inlet hot fluid,F
T2=250.; # outlet hot fluid,F
t1=105.; # inlet cold fluid,F
t2=130.; # outlet cold fluid,F
w=50000.; # lb/hr
W=622.; # lb/hr
#solution
from math import log10
print"\t 1.for heat balance \t"
print"\t for gas oil \t"
c=0.47; # Btu/(lb)*(F)
Q=((w)*(c)*(t2-t1)); # Btu/hr
print"\t total heat required for gas oil is : Btu/hr \t",Q
print"\t for steam \t"
l=945.5; # Btu/(lb)
Q=((W)*(l)); # Btu/hr
print"\t total heat required for steam is : Btu/hr \t",Q
delt1=T2-t1; #F
delt2=T1-t2; # F
print"\t delt1 is : F \t",delt1
print"\t delt2 is : F \t",delt2
LMTD=((delt2-delt1)/((2.3)*(log10(delt2/delt1))));
print"\t LMTD is : F \t",LMTD
tc=((t1)+(t2))/2; # caloric temperature of cold fluid,F
print"\t caloric temperature of cold fluid is : %.1f F \t",tc
print"\t hot fluid:shell side,steam \t"
ID=15.25; # in
C=0.25; # clearance
B=15; # baffle spacing,in
PT=1.25;
As=((ID*C*B)/(144*PT)); # flow area,ft**2, eq 7.1
print"\t flow area is : ft**2 \t",As
Gs=(6220/As); # mass velocity,lb/(hr)*(ft**2), calculation mistake
print"\t mass velocity is : lb/(hr)*(ft**2) \t",Gs
mu1=0.0314; # at 250F,lb/(ft)*(hr), from fig.15
De=0.060; # from fig.29,ft
Res=((De)*(Gs)/mu1); # reynolds number, calculation mistake
print"\t reynolds number is : \t",Res
ho=1500; #Btu/(hr)*(ft**2)*(F)
print"\t individual heat transfer coefficient is : Btu/(hr)*(ft**2)*(F) \t",ho
print"\t cold fluid:inner tube side,crude oil \t"
d1=0.5; # in
d2=0.87; # in
at1=((3.14*(d2**2-d1**2))/4);
print"\t at1 is : in**2 \t",at1
Nt=86;
n=2; # number of passes
L=12; #ft
at=((Nt*at1)/(144*n)); # total area,ft**2,from eq.7.48
print"\t flow area is : ft**2 \t",at
Gt=(w/(at)); # mass velocity,lb/(hr)*(ft**2)
print"\t mass velocity is : lb/(hr)*(ft**2) \t",Gt
De=(d2**2-d1**2)/(12*d2);
print"\t De is : ft \t",De
mu2=16.7; # at 117F,lb/(ft)*(hr)
Ret=((De)*(Gt)/mu2); # reynolds number
print"\t reynolds number is : \t",Ret
jH=3.1; # from fig.24
Z=0.35; # Z=(K*(c*mu3/k)**(1/3)),Btu/(hr)(ft**2)(F/ft), at mu3=6.9cp and 28 API
Hi=((jH)*(1/De)*(Z)); #Hi=(hi/phyp),using eq.6.15a,Btu/(hr)*(ft**2)*(F)
print"\t Hi is : Btu/(hr)*(ft**2)*(F) \t",Hi
ID=0.87; # ft
OD=1; #ft
Hio=((Hi)*(ID/OD)); #Hio=(hio/phyp), using eq.6.5
print"\t Correct Hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t",Hio
muw=4.84; # lb/(ft)*(hr), from fig.14
phyt=(mu2/muw)**0.14;
print"\t phyt is : \t",phyt # from fig.24
hio=(Hio)*(phyt); # from eq.6.37
print"\t Correct hi0 to the surface at the OD is : Btu/(hr)*(ft**2)*(F) \t",hio
tw=(tc)+(((ho)/(hio+ho))*(T1-tc)); # from eq.5.31
print"\t tw is : F \t",tw
Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)
print"\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t",Uc
A=270; # ft**2
print"\t total surface area is : ft**2 \t",A
UD=((Q)/((A)*(LMTD)));
print"\t actual design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t",UD
Rd=((Uc-UD)/((UD)*(Uc))); # (hr)*(ft**2)*(F)/Btu
print"\t actual Rd is : (hr)*(ft**2)*(F)/Btu \t",Rd
print"\t pressure drop for annulus \t"
f=0.0016; # friction factor for reynolds number 25300, using fig.29
s=0.00116; # for reynolds number 25300,using fig.6
Ds=15.25/12; # ft
phys=1;
N=(12*L/B); # number of crosses,using eq.7.43
print"\t number of crosses are : \t",N
delPs=((f*(19600**2)*(Ds)*(N))/(5.22*(10**10)*(De)*(s)*(phys)))/(2); # using eq.7.44,psi
print"\t delPs is : psi \t",delPs
print"\t pressure drop for inner pipe \t"
dt=(d2-d1)/(12); # ft
print"\t dt is : ft \t",dt
Ret2=(dt*Gt/mu2);
print"\t Ret2 is : \t",Ret2
f=0.00066; # friction factor for reynolds number 8220, using fig.26
phyt=1.35; # fig 6
print"\t phyt is : \t",phyt
s=0.85;
delPt=((f*(420000**2)*(L)*(n))/(5.22*(10**10)*(0.0309)*(s)*(phyt))); # using eq.7.45,psi
print"\t delPt is : psi \t",round(delPt)
print"\t delPr is negligible \t"
#end
print"\t example 10.4 \t"
print"\t approximate values are mentioned in the book \t"
#given
t1=100; # F
t2=0; # F
T1abs=100+460; # R
T2abs=460; #R
#solution
delt=t1-t2;
from math import ceil
print"\t delt is : F \t",delt
hc=0.3*(delt**0.25); # convection loss, Btu/(hr)*(ft**2)*( degree F)
print"\t convection loss is : Btu/(hr)(ft**2)(F) \t",hc
e=0.8; # emissivity
hr=((0.173*e*((T1abs/100)**4-(T2abs/100)**4))/(T1abs-T2abs)); # radiation rate, from 4.32, Btu/(hr)(ft**2)(F)
print"\t radiation loss is : Btu/(hr)(ft**2)(F) \t",hr
hl=hc+hr; # combined loss, Btu/(hr)(ft**2)(F)
print"\t combined loss is : Btu/(hr)(ft**2)(F) \t",hl
D=5; # ft
L=12; # ft
A1=((2*3.14*D**2)/(4))+(3.14*D*L); # total tank area
print"\t total tank area is : ft**2 \t",A1
Q=(hl*A1*delt); # total heat loss
print"\t total heat loss : Btu/hr \t",Q
print"\t This heat must be supplied by the pipe bundle,Assuming exhaust steam to be at 212 degree F \t"
d0=1.32;
X=(delt/d0);
tf=((t1+212)/2); # F
print"\t X is : \t",X
print"\t tf is : F \t",tf
hio=48; # from fig 10.4, Btu/(hr)(ft**2)(F)
ho=1500; # condensation of steam,Btu/(hr)(ft**2)(F)
Uc=((hio)*(ho)/(hio+ho)); # clean overall coefficient,Btu/(hr)*(ft**2)*(F)
print"\t clean overall coefficient is : Btu/(hr)*(ft**2)*(F) \t",Uc
Rd=0.02; # dirt factor, (hr)(ft**2)(F)/Btu
UD=((Uc)/((1)+(Uc*Rd))); # design overall coefficient,Btu/(hr)*(ft**2)*(F)
print"\t design overall coefficient is : Btu/(hr)*(ft**2)*(F) \t",UD
A2=((Q)/((UD)*(212-100))); # total surface,ft**2
print"\t total surface is : ft**2 \t",A2
A3=2.06; # area/pipe
N=(A2/A3);
print"\t number of pipes are : \t",ceil(N)
#end