#given
T1=300.; # hot fluid inlet temperature,F
T2=200.; # hot fluid outlet temperature,F
t1=100.; # cold fluid inlet temperature,F
t2=150.; # cold fluid outlet temperature,F
#solution
from math import log
print"\t for counter current flow "
delt1=T1-t2; #F
delt2=T2-t1; # F
print"\t delt1 is : F ",delt1
print"\t delt2 is : F ",delt2
LMTDc=((delt2-delt1)/(log(delt2/delt1)));
print"\t LMTDc is : F ",round(LMTDc,1)
print"\t for parallel flow "
delt1=T1-t1; # F
delt2=T2-t2; # F
print"\t delt1 is : F ",delt1
print"\t delt2 is : F ",delt2
LMTDp=((delt2-delt1)/((log(delt2/delt1))));
print"\t LMTDp is : F ",round(LMTDp,0)
#end
#given
T1=300.; # hot fluid inlet temperature,F
T2=200.; # hot fluid outlet temperature,F
t1=150.; # cold fluid inlet temperature,F
t2=200.; # cold fluid outlet temperature,F
#solution
from math import log
print"\t for counter current flow "
delt1=T1-t2; #F
delt2=T2-t1; # F
print"\t delt1 is : F ",delt1
print"\t delt2 is : F ",delt2
LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))))
print"\t LMTD is : F ",LMTD
print"\t for parallel flow "
delt1=T1-t1; # F
delt2=T2-t2; # F
print"\t delt1 is : F ",delt1
print"\t delt2 is : F ",delt2
if delt2 == 0:
print"\t denominator becomes infinity so LMTD becomes Zero \n"
print"\t LMTD is Zero \n"
else:
LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));
print"\t LMTD is : F ",LMTD
#end
print"\t approximate values are mentioned in the book \n"
#given
T1=300.; # hot fluid inlet temperature,F
T2=200.; # hot fluid outlet temperature,F
t1=100.; # cold fluid inlet temperature,F
t2=275.; # cold fluid outlet temperature,F
#solution
from math import log
print"\t for counter current flow \n"
deltc=T2-t1; #F
delth=T1-t2; # F
print"\t delth is : F ",delth
print"\t deltc is : F ",deltc
LMTD=((delth-deltc)/((1)*(log(delth/deltc))))
print"\t LMTD is : F ",round(LMTD,1)
#end
print"\t example 5.4 \n"
print"\t process is isothermal with hot fluid so temperature of hot fluid remains constant \n"
#given
T1=300.; # hot fluid inlet temperature,F
T2=300.; # hot fluid outlet temperature,F
t1=100.; # cold fluid inlet temperature,F
t2=275.; # cold fluid outlet temperature,F
#solution
from math import log
print"\t for counter current flow \n"
delt1=T1-t2; #F
delt2=T2-t1; # F
print"\t delt1 is : F ",delt1
print"\t delt2 is : F ",delt2
LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))))
print"\t LMTD is : F ",LMTD
print"\t for parallel flow \n"
delt1=T1-t1; # F
delt2=T2-t2; # F
print"\t delt1 is : F ",delt1
print"\t delt2 is : F ",delt2
if delt2 == 0:
print"\t denominator becomes infinity so LMTD becomes Zero \n"
print"\t LMTD is Zero \n"
else:
LMTD=((delt2-delt1)/((1)*(log(delt2/delt1))));
print"\t LMTD is : F ",LMTD
print"\t these are identical \n"
#end
print"\t example 5.5 \t"
print"\t approximate values are mentioned in the book \t"
print"\t for inlet \t"
t1=99.1; # temperature of inlet,F
t2=129.2; # temperature of outlet,F
c=.478; # Btu/(hr)*(ft)*(F/ft)
mu=7.139; # lb/(ft)(hr)
k=0.078; # Btu/(hr)*(ft)*(F/ft)
G=854000; # mass velocity,lb/(ft**2)(hr)
D=0.622/12; # diameter,ft
Re=((D)*((G)/(mu)))**(0.9);
print"\t Re is : \t",round(Re)
Pr=((c)*(mu)/k)**(1./3.); # prandtl number raised to power 1/3
print"\t Pr is : \t",round(Pr,2)
Nu=0.0115*(Re)*(Pr); # formula for nusselt number
print"\t nusselt number is : \t",round(Nu)
hi=((k)*(Nu)/(D)); # heat transfer coefficient
print"\t heat transfer coefficient is :",round(hi) # caculation mistake in book
print"\t for outlet \t"
c=.495; # Btu/(hr)*(ft)*(F/ft)
mu=2.20*2.42; # lb/(ft)(hr)
k=0.078; # Btu/(hr)*(ft)*(F/ft)
G=854000; # mass velocity,lb/(ft**2)(hr)
D=0.622/12; # diameter,ft
Re=((D)*((G)/(mu)))**(.9); # reynolds number raised to poer 0.9, calculation mistake in book
print"\t Re is : \t",round(Re)
Pr=((c)*(mu)/k)**(1./3.); # prandtl number raised to power 1/3
print"\t Pr is : \t",round(Pr,2)
Nu=0.0115*(Re)*(Pr); # formula for nusselt number
print"\t nusselt number is : \t",round(Nu)
hi=((k)*(Nu)/(D)); # heat transfer coefficient
print"\t heat transfer coefficient is :",round(hi) # caculation mistake in book
#end
print"\t example 5.6 "
print"\t approximate values are mentioned in the book "
T1=300; # hot fluid inlet temperature,F
T2=200; # hot fluid outlet temperature,F
t1=80; # cold fluid inlet temperature,F
t2=120; # cold fluid outlet temperature,F
print"\t for counter current flow "
delT=T1-T2; # temperature difference for crude oil,F
print"\t temperature difference for crude oil is : F ",delT
Kc=0.68; # from fig.17
delt=t2-t1; # temperature difference for gasoline,F
print"\t temperature difference for gasoline is : F ",delt
Kc<=0.10; # from fig.17
print"\t The larger value of K. correspQnds to the controlling heat transfer coefficient which is assumed to establish the variation of U with temperature "
deltc=T2-t1; #F
delth=T1-t2; # F
print"\t deltc is : F ",deltc
print"\t delth is : F ",delth
A=120./180.#((deltc)/(delth));
print"\t ratio of two local temperature difference is : ",round(A,2)
Fc=0.425; # from fig.17
Tc=((T2)+((Fc)*(T1-T2))); # caloric temperature of hot fluid,F
print"\t caloric temperature of hot fluid is : F ",Tc
tc=((t1)+((Fc)*(t2-t1))); # caloric temperature of cold fluid,F
print"\t caloric temperature of cold fluid is : F ",tc
# end