from __future__ import division
from numpy import pi
from math import sqrt
# given data
d=20 # in mm
d=d*10**-3 #in m
h=5 # in W/m**2K
T_0=100 # in degree C
T_infinite=20 # in degree C
K=15 # in W/m-K
#(i)Temperature distribution equation
rho=pi*d # in m
A=pi*d**2/4 #in square meter
m=sqrt(h*rho/(K*A))#
print "(i) Temperature distribution equation is = theta/theta_0 = (T-T_infinite)/(T_0-T_infinite) = e**- %0.2f*x" %m
#(ii)Heat loss from the rod
t_0=100 # in degree C
t_infinite=20 # in degree C
q=sqrt(K*A*h*rho)*(t_0-t_infinite)#
print "(ii) Heat loss from the road is :",round(q,3),"watt"
from math import log, pi
from __future__ import division
# given data
d=3 # in cm
d=d*10**-2 #in m
h=20 # in W/m**2K
T1=140 # in degree C
T2=100 # in degree C
L=15*10**-2 # in meter
T_infinite=30 # in degree C
T_0=140 # in degree C
# Let at
x=0#T_0=T1#
x=15 #in cm
x=x*10**-2 # in m
T=100 # in degree C
rho=pi*d#
A=pi*d**2/4#
# Formula (T-T_infinite)/(T_0-T_infinite) = %e**-m*x
m=log((T_0-T_infinite)/(T-T_infinite))/x#
# Formula m=sqrt(h*rho/(k*A))
k=h*rho/(m**2*A)#
print "Thermal conductivity of the rod material = %0.3f W/m-k" %k
from math import tanh
# given data
t=1 # in mm
t=t*10**-3 # in meter
L= 10 # in mm
L= L*10**-3 # in meter
k= 380 # W/mK
To= 230 # in °C
T_inf= 30 # in °C
h= 40 # in W/m**2K
B= 1 # in meter
Ac= B*t # in m**2
rho= 2*(B+t)#
m= sqrt(h*rho/(k*Ac))#
# Part(a)
nita= tanh(m*L)/(m*L)*100 # fin efficiency in %
print "Fin efficiency = %0.3f %%" %nita
# Part(b)
N=1000/9+1 # number of fin
Af= N*rho*L # in square meter
A1= 1 # plate area in m**2
A2= N*1*1*10**-3 # Area where fins are attached in square meter
Au= A1-A2 # in square meter
q_T= N*sqrt(h*rho*k*Ac)*(To-T_inf)*tanh(m*L)+Au*h*(To-T_inf) # in W/m**2
print "Total heat transfer per square meter of plane wall surface = %0.3f kW/m**2" %(q_T*10**-3)
# Part(c)
A=1*1 # in m**2
q= h*A*(To-T_inf) # in W/m**2
print "Heat transfer if there were no fins attached = %0.0f kW/m**2" %(q*10**-3)
# Note : Answer of part(b) in the book is wrong
from math import sqrt, tanh
# given data
w=5*10**-2 # in meter
L=1 # in meter
t=2.5*10**-2 # in meter
h=47 # in W/m**2K
k=16.3 # in W/mK (for 18.8 steel)
T_0=100 # in degree C
T_infinite=20 # in degree C
Ac=w*t # in square meter
rho=2*(w+t)#
m=sqrt(h*rho/(k*Ac))#
q_fin=k*Ac*m*(T_0-T_infinite)*((tanh(m*L)+h/(k*m) )/(1+h/(m*k)*tanh(m*L)))
print "The heat lost by the fin of one meter length is :",round(q_fin,3),"W"
from math import floor
# given data
w=1 # in meter
L=2.5*10**-2 # in meter
t=0.8*10**-3 # in meter
l=1 # in meter
T_0=150 # in degree C
T_infinite=40 # in degree C
h=20 # in W/m**2K
k=65 # in W/mK (for 18.8 steel)
Ac=w*t#
d=5*10**-2 # Cylinder dia in meter
rho=2*(w+t)#
rho=floor(rho)#
m=sqrt(h*rho/(k*Ac))#
mL=m*L#
# heat transfer rate from 12 fins
q_fin=12*k*Ac*m*(T_0-T_infinite)*((tanh(m*L)+h/(k*m) )/(1+h/(m*k)*tanh(m*L)))#
print "Heat transfer rate from 12 fins is :",round(q_fin,3),"watt"
Au=pi*d*l-12*w*t#
qu=h*Au*(T_0-T_infinite)#
print "Now heat transfer from unfinned surface area is :",round(qu,3),"watt"
q=q_fin+qu#
print "Total head transfer rate from the cylinder is :",round(q,3),"watt"
from math import sinh
# given data
T_0=100 # in degree C
T_infinite=30 # in degree C
T_L=100 # in degree C
d=6*10**-3 # copper rod dia in meter
L=50*10**-2 # developed length in meter
Ac=pi*d**2/4 # in square meter
rho=pi*d # in meter
h=30 # in W/m**2K
k=330 # in W/mK
m=sqrt(h*rho/(k*Ac))#
#(i) Temperature distribution equation for the fin
# (T-T_infinite)/(T_0-T_infinite)=([(T_L-T_infinite)/(T_0-T_infinite)]*sinh(m*x)+sinh(m*(L-x)))/sinh(m*L)
#Temperature at
x=0.25 # in m
T= (((T_L-T_infinite)/(T_0-T_infinite))*sinh(m*x)+sinh(m*(L-x)))/sinh(m*L)*(T_0-T_infinite)+T_infinite#
print "(i) Temperature at the centre of the rod is :",round(T,1),"degree C"
print "(ii) Heat transfer rate from the fin- This is equivalent to two fins of length 25 cm long with insulated tip"
L=25*10**-2 # in meter
q=2*sqrt(h*rho*k*Ac)*(T_0-T_infinite)*tanh(m*L)#
print "Heat transfer by the rod is :",round(q,2),"watt"
from math import cosh
# given data
T_0=100 # in degree C
T_infinite=25 # in degree C
d=5*10**-2 # in meter
L=15*10**-2 # in meter
h=8 # in W/m**2K
k=20 # in W/mK
rho=pi*d # in meter
Ac=pi*d**2/4 # in square meter
m=sqrt(h*rho/(k*Ac))#
#(ii) Temperature at free end i.e. at
x=L
# Formula (T_L-T_infinite)/(T_0-T_infinite)= 1/(cosh(m*L)+h/(k*m)*sinh(m*L) )
T_L=(1/(cosh(m*L)+h/(k*m)*sinh(m*L) ))*(T_0-T_infinite)+T_infinite#
print "(ii) Temperature at free end is :",round(T_L,3),"degree C"
#(iii) Heat flow out the source means heat transfer from the fin
q_f=sqrt(h*rho*k*Ac)*(T_0-T_infinite)*((h/(k*m)+tanh(m*L))/(1+h*tanh(m*L)/(k*m)))
print "(iii) Heat flow out the source :",round(q_f,3),"watt"
# (iv) Heat flow rate at free end
q_L=h*Ac*(T_L-T_infinite)
print "(iv) Heat flow rate at free end is :",round(q_L,3),"watt"
from numpy import pi
import math
from math import sqrt, tanh
# given data
T_0=150 # in degree C
T_infinite=40 # in degree C
w=1 # in m
t=0.75*10**-3 # in m
d=5*10**-2 # in meter
L=25*10**-3 # in meter
k=75 # in W/mK
h=23.3 # in W/m**2K
N=12 # numbers of fins
Ac=w*t #in square meter
rho=2*(w+t) # in meter
delta=Ac/rho#
L_c=L+delta#
ML_c=L_c*sqrt(h*rho/(k*Ac))
q_fin= N*sqrt(h*rho*k*Ac)*(T_0-T_infinite)*tanh(ML_c)#
q_fin=math.floor(q_fin)#
A_0=pi*d*w-12*Ac
q_unfin= h*A_0*(T_0-T_infinite)#
q_total=q_fin+q_unfin#
print "Rate of heat transfer is :",round(q_total,1),"watt"
from math import sqrt
# given data
L=0.06 # in meter
A=4.64*10**-4 # in m**2
rho=0.12 # in m
h=442 # in W/m**2
T_0=773 # in K
T_infinite=1143 # in K
K=23.2 # in W/mK
m=sqrt(h*rho/(K*A))#
q=sqrt(h*rho*K*A)*(T_0-T_infinite)*tanh(m*L)#
print "Heat transfer rate is :",round(q,3),"watt"
# Note: Answer in the book is wrong
import math
from math import cosh
# given data
L=0.12 # in meter
t=.15*10**-2 # thickness in m
K=55.5 # in W/mK
h=23.5 # in W/mK
T_L=357 # in K
T_0=313 # in K
# Formula m=sqrt(h*rho/(K*A)) and rho=pi*d and A=pi*d*t, putting value of rho and A
m=sqrt(h/(K*t))#
mL=m*L#
mL=math.floor(mL)#
# Formula (T_L-T_infinite)/(T_0-T_infinite)= 1/cosh(m*L)
T_infinite=(T_L-T_0/cosh(mL))/(1-1/cosh(mL))#
T_infinite=math.ceil(T_infinite)#
measurement_error=T_infinite-T_L#
print "Measurement Error is :",round(measurement_error,0),"K"
# Note: In the book, Unit of answer is wrong
from math import sqrt
# given data
k=20 # in W/mK
T_L=150 # in degree C
T_0=70 # in degree C
L=12*10**-2 # in meter
h=80 # in W/m**2K
t=3*10**-3 # in m
# Formula m=sqrt(h*rho/(K*A)) and rho=pi*d and A=pi*d*t, putting value of rho and A
m=sqrt(h/(k*t))#
# Formula (T_L-T_infinite)/(T_0-T_infinite)= 1/cosh(m*L)
T_infinite=(T_L-T_0/cosh(m*L))/(1-1/cosh(m*L))#
PercentageError=(T_infinite-T_L)*100/T_infinite#
print "Percentage Error is :",round(PercentageError,2),"%"
from math import acosh
# given data
k=30 # in W/mK
h=100 # in W/m**2K
T_infinite=300 # in degree C
d=2*10**-2 # in m
t=1*10**-3 # in m
err=1 # in % of applied temperature difference
# Formula m=sqrt(h*rho/(K*A)) and rho=pi*d and A=pi*d*t, putting value of rho and A
m=sqrt(h/(k*t))#
# From (T_L-T_infinite)/(T_0-T_infinite)= 1/100 = 1/cosh(m*L)
L=acosh(100)/m # in meter
L=L*10**3 # in mm
print "Minimum length os pocket is :",round(L,2),"mm"
from numpy import pi
# given data
k=32 # in W/m**2 degree C
h=14.8 # in W/m**2 degree C
t_o=480 # in degree C
t_i=55 # in degree C
t_a=20 # in degree C
d=2.5*10**-2 # in m
rho=pi*d # in m
Ac=pi*d**2/4 # in m**2
m=sqrt(h*rho/(k*Ac))#
# From (t-t_a)/(t_o-t_a) = cosh(m(L-x))/cosh(m*L)
L=acosh((t_o-t_a)/(t_i-t_a))/m# # at x=L,t=t_i
print "Length of shaft specified between the motor and the pump is :",round(L,4),"meter"