PKfqJeq.1\n",
"print\"(a)The expression for the temprature distribution in the plate T=160+2*10**3*(x-100*x**2)\" \n",
"#For maximum temprature differentiating eq.1 with respect to x and equating it to zero...we get dT/dx=(2*10**3)-(4*10**5*x)=0,which gives x=0.005m=5mm\n",
"print\"(b)The maximum temprature occurs at x=5mm or 0.005m away from the left surface towards the right\"\n",
"x=0.005;\n",
"#The maximum temprature is Tmax\n",
"print\"The maximum temprature(Tmax) in Â°C is\"\n",
"Tmax=160+2*10**3*(x-100*x**2)\n",
"print\"Tmax=\",Tmax\n",
"#The rate of heat transfer(q/A) is given by -k*(dT/dx)\n",
"#Let dT/dx=X and (q/A)=Q\n",
"print\"(c(i))The rate of heat transfer at the left face in MW/m**2 is\"\n",
"#For left face x=0\n",
"x=0;\n",
"X=(2*10**3)-(4*10**5*x);\n",
"Q=-k*X/10**6\n",
"print\"Q=\",Q\n",
"print\"The minus sign indicates that the heat flow in the negative direction\"\n",
"print\"(c(ii))The rate of heat transfer at the right face in MW/m**2 is\"\n",
"#For right face x=0.02\n",
"x=0.02;\n",
"X=(2*10**3)-(4*10**5*x);\n",
"Q=-k*X/10**6\n",
"print\"Q=\",Q\n",
"#(q/A)@x=0 implies rate of heat transfer at the position where x=0. \n",
"print\"The minus sign for (q/A)@x=0 and the plus sign for (q/A)@x=0.02 indicates that heat is lost from both the surfaces to surroundings\"\n",
"print\"(c(iii))The rate of heat transfer at the centre in MW/m**2 is\"\n",
"#For centre x=0.01\n",
"x=0.01;\n",
"X=(2*10**3)-(4*10**5*x);\n",
"Q=-k*X/10**6\n",
"#A check for the above results can be made from an energy balance of the plate as |(q/A)|@x=0+|(q/A)|@x=0.02=qG*0.02\n",
"print\"Q=\",Q"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex2.9:pg- 48"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 2, Example 9\n",
"The critical thickness of insulation in metre is\n",
"X= 0.182340462632\n",
"The heat transfer rate Q per metre of tube length in W/m is \n",
"Q= 26.807459995\n",
"X= 0.559673817307\n",
"The heat transfer rate per metre of tube length Q in W/m is \n",
"Q= 28.1996765363\n",
"X= 1.79194526577\n",
"The heat transfer rate per metre of tube length Q in W/m is \n",
"Q= 21.1086798197\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 2, Example 9\"\n",
"#A thin walled copper tube of outside metal radius r=0.01m carries steam at temprature, T1=400K.It is inside a room where the surrounding air temprature is Tinf=300K.\n",
"T1=400;\n",
"Tinf=300;\n",
"r=0.01;\n",
"#The tube is insulated with magnesia insulation of an approximate thermal conductivity of k=0.07W/(m*K)\n",
"k=0.07;\n",
"#External convective Coefficient h=4W/(m**2*K)\n",
"h=4;\n",
"#Critical thickness(rc) is given by k/h\n",
"print\"The critical thickness of insulation in metre is\"\n",
"rc=k/h\n",
"#We use the rate of heat transfer per metre of tube length as Q=(Ti-Tinf)/((ln(r2/r1)/(2*math.pi*L*k))+(1/(h*2*math.pi*r2*L))) where length,L=1m\n",
"L=1;\n",
"#When 0.002m thick layer of insulation r1=0.01m,r2=0.01+0.002=0.012m\n",
"r1=0.01;#inner radius\n",
"r2=0.012;#outer radius\n",
"#Let ln(r2/r1)=X\n",
"X=math.log(r2/r1)/math.log(2.718);\n",
"print\"X=\",X\n",
"#The heat transfer rate per metre of tube length is Q\n",
"print\"The heat transfer rate Q per metre of tube length in W/m is \"\n",
"Q=(T1-Tinf)/(((X)/(2*math.pi*L*k))+(1/(h*2*math.pi*r2*L)))\n",
"print\"Q=\",Q\n",
"#When critical thickness of insulation r1=0.01m,r2=0.0175m\n",
"r2=0.0175;#outer radius\n",
"r1=0.01;#inner radius\n",
"#Let ln(r2/r1)=X\n",
"X=math.log(r2/r1)/math.log(2.718);\n",
"print\"X=\",X\n",
"#The heat transfer rate per metre of tube length is Q \n",
"print\"The heat transfer rate per metre of tube length Q in W/m is \"\n",
"Q=(T1-Tinf)/(((X)/(2*math.pi*L*k))+(1/(h*2*math.pi*r2*L)))\n",
"print\"Q=\",Q\n",
"#When there is a 0.05 m thick layer of insulation r1=0.01m,r2=.01+0.05=0.06m\n",
"r1=0.01;#inner radius\n",
"r2=0.06;#outer radius\n",
"#Let ln(r2/r1)=X\n",
"X=math.log(r2/r1)/math.log(2.718);\n",
"print\"X=\",X\n",
"#The heat transfer rate per metre of tube length is Q \n",
"print\"The heat transfer rate per metre of tube length Q in W/m is \"\n",
"Q=(T1-Tinf)/(((X)/(2*math.pi*L*k))+(1/(h*2*math.pi*r2*L)))\n",
"#It is important to note that Q increases by 5.2% when the insulation thickness increases from 0.002m to critical thickness. \n",
"#Addition of insulation beyond the critical thickness decreases the value of Q (The heat loss).\n",
"print\"Q=\",Q"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex2.10:pg-49"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 2, Example 10\n",
"the thickness of insulation in metre is\n",
"t= 0.019\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 2, Example 10\"\n",
"#A copper pipe having 35mm outer diameter(Do) and 30mm inner diameter(Di) carries liquid oxygen to the storage site of a space shuttle at temprature,T1=-182Â°C\n",
"#mass flow rate is ,mdot=0.06m**3/min. \n",
"Di=0.03;#in metre\n",
"Do=0.035;# in metre\n",
"T1=-182;\n",
"mdot=0.06;\n",
"#The ambient air is at temprature(Ta)=20Â°C and has a dew point(T3)=10Â°C.\n",
"Ta=20;\n",
"T3=10;\n",
"#The thermal conductivity(k) of insulating material is 0.02W/(m*k)\n",
"k=0.02;\n",
"#The convective heat transfer coefficient on the outside is h=17W/(m**2*K)\n",
"h=17;\n",
"#The thermal conductivity of copper kcu=400W/(m*K)\n",
"kcu=400;\n",
"#We can write Q=((Ta-T1)/(R1+R2+R3))=((Ta-T3)/(R3)),Rearranging we get ((R1+R2+R3)/(R3))=((Ta-T1)/(Ta-T3))--------eq.1\n",
"#The conduction Resistance of copper pipe(R1)=ln(0.035/0.03)/(2*math.pi*L*kcu)=3.85*10**-4/(2*math.pi*L)K/W\n",
"#The conduction resistance of insulating material (R2)=ln(r3/0.035)/(2*math.pi*L*k)=(1/(2*math.pi*L))((50*ln(r3/0.035)))K/W where r3 is the outer radius of insulation in metres.\n",
"#The convective resistance at the outer surface(R3)=1/(2*math.pi*L*h*r3)=(1/2*math.pi*L)*(mdot/r3)K/W\n",
"#Substituting the values in eq.1 we have 1+((50*ln(r3/0.035)+(3.85*10**-4))/(mdot/r3))=20-(-182)/(20-10)\n",
"#A rearrangement of the above equation gives r3*ln(r3)+3.35*r3=0.023\n",
"#The equation is solved by trial and error method which finally gives r3=0.054m\n",
"r3=0.054;#outer radius of insulation\n",
"#Therefore the thickness of insulation is given by t=r3-Do\n",
"print\"the thickness of insulation in metre is\"\n",
"t=r3-Do\n",
"print\"t=\",t"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex2.11:pg-52"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 2, Example 11\n",
"The rate of heat generation of thermal energy in W/m**3 is\n",
"qG= 407436654.315\n",
"The temprature of wire at the centre in K is \n",
"To= 656.631455962\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 2, Example 11\"\n",
"#An electrical resistance wire 2.5mm or 2.5*10**-3m in diameter(D) and L=0.5m long has a measured voltage drop of E=25V for a current flow of I=40A.\n",
"D=2.5*10**-3;\n",
"I=40;\n",
"E=25;\n",
"L=0.5;\n",
"ro=D/2;#ro is radius of wire\n",
"#The thermal conductivity(k) of wire material is 24W/(m*K) \n",
"k=24;\n",
"#The rate of generation of thermal energy per unit volume is given by qG=(E*I)/(L*math.pi*D**2/4)\n",
"print\"The rate of heat generation of thermal energy in W/m**3 is\"\n",
"qG=(E*I)/(L*math.pi*D**2/4)\n",
"print\"qG=\",qG\n",
"#The temprature at the centre is given by To=Tw+((qG*ro**2)/(4*k)) where Tw=650K is surface temprature \n",
"Tw=650;\n",
"print\"The temprature of wire at the centre in K is \"\n",
"To=Tw+((qG*ro**2)/(4*k))\n",
"#Note:The answer in the book is incorrect(value of D has been put instead of ro)\n",
"print\"To=\",To"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex2.12:pg-56"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 2, Example 12\n",
"The inner(A1) and outer surfaces(A2) areas of the tank in m**2 are\n",
"The convective resistance(Ri) at the inner surface in K/W is \n",
"Ri= 0.000159154943092\n",
"The conduction resistance(Rs)of the tank in K/W is\n",
"Rs= 0.0\n",
"The convective resistance(Roc) at the outer surface in K/W is\n",
"Roc= 0.00127323954474\n",
"The radiative heat transfer coefficient hr in W/(m**2*K) is\n",
"hr= 5.26265474661\n",
"Therefore the radiative resistance(Ror) at the outer surface in K/W is\n",
"Ror= 0.00241938642385\n",
"The equivalent resistance in K/W is\n",
"Ro= 0.000834218925785\n",
"The total resistance in K/W is\n",
"Rtotal= 0.000993373868877\n",
"The rate of heat transfer,Q in W is\n",
"Q= 20133.406592\n",
"The outer surface temprature in Â°C is\n",
"T2= 3.2043311804\n",
"which is sufficiently close to the assumption.So there is no need of further iteration\n",
"The total heat transfer(Qt) during a 24-hour period in KJ is\n",
"Qt= 1739526.32955\n",
"Therefore,the amount of ice(mice)in kG which melts during a 24 hour period is\n",
"mice= 5208.16266333\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 2, Example 12\"\n",
"#A spherical tank of internal diameter, Di=5m ,made of t=25mm thick stainless steel(thermal conductivity,k=15W/(m*K)),is used to store water at temprature(Ti)=0Â°C.Do is outer diameter\n",
"Di=5;\n",
"t=25;\n",
"Do=5+2*(t/1000);#in metre\n",
"k=15;\n",
"Ti=0;\n",
"#The tank is located in a room whose temprature is (To)=20Â°C.\n",
"To=20;\n",
"#Emmisivity is 1.\n",
"#The convection heat transfer coefficients at the inner and outer surfaces of the tank are hi=80W/(m**2*K) and ho=10W/(m**2*K)\n",
"hi=80;\n",
"ho=10;\n",
"#The heat of fusion of ice at atmospheric pressure is deltahf=334kJ/kg.The stefan-boltzman constant(sigma) is 5.67*10**-8W/m**2.\n",
"sigma=5.67*10**-8;\n",
"deltahf=334;\n",
"#The inner surface area is (A1) and outer surface area is (A2)of the tank\n",
"print\"The inner(A1) and outer surfaces(A2) areas of the tank in m**2 are\"\n",
"A1=math.pi*Di**2\n",
"A2=math.pi*Do**2\n",
"#The individual thermal resistances can be determined as\n",
"#The convective resistance is (Ri)\n",
"print\"The convective resistance(Ri) at the inner surface in K/W is \"\n",
"Ri=1/(hi*A1)\n",
"print\"Ri=\",Ri\n",
"#The conduction resistance is(Rs)\n",
"print\"The conduction resistance(Rs)of the tank in K/W is\"\n",
"Rs=(Do-Di)/(2*k*math.pi*Di*Do)\n",
"print\"Rs=\",Rs\n",
"#The convective resistance is(Roc)\n",
"print\"The convective resistance(Roc) at the outer surface in K/W is\"\n",
"Roc=1/(ho*A2)\n",
"print\"Roc=\",Roc\n",
"#The radiative resistance(Ror) at the outer surface is Ror=1/(A2*hr) \n",
"#The radiative heat transfer coefficient hr is determined by hr=sigma*(T2**2+293.15**2)*(T2+293.15)\n",
"#But we do not know the outer surface temprature T2 of the tank and hence we cannot determine the value of hr.\n",
"#Therfore we adopt an iterative procedure.We assume T2=4Â°C=277.15K.Putting the value in hr=sigma*(T2**2+293.15**2)*(T2+293.15) we get\n",
"T2=277.15;\n",
"print\"The radiative heat transfer coefficient hr in W/(m**2*K) is\"\n",
"hr=sigma*(T2**2+293.15**2)*(T2+293.15)\n",
"print\"hr=\",hr\n",
"print\"Therefore the radiative resistance(Ror) at the outer surface in K/W is\"\n",
"Ror=1/(A2*hr)\n",
"print\"Ror=\",Ror\n",
"#The two parallel resistances Roc and Ror can be replaced by an equivalent resistance Ro as X=(1/Ro)=(1/Roc)+(1/Ror)\n",
"print\"The equivalent resistance in K/W is\"\n",
"X=(1/Roc)+(1/Ror);\n",
"Ro=1/X\n",
"print\"Ro=\",Ro\n",
"#Now the resistance Ri,Rs and Ro are in series an hence the total resistance becomes Rtotal=Ri+Rs+Ro \n",
"print\"The total resistance in K/W is\"\n",
"Rtotal=Ri+Rs+Ro \n",
"print\"Rtotal=\",Rtotal\n",
"#The rate of heat transfer is given by Q=(To-Ti)/Rtotal\n",
"print\"The rate of heat transfer,Q in W is\"\n",
"Q=(To-Ti)/Rtotal\n",
"print\"Q=\",Q\n",
"#The outer surface(T2) is calculated as T2=To-Q*Ro\n",
"print\"The outer surface temprature in Â°C is\"\n",
"T2=To-Q*Ro\n",
"print\"T2=\",T2\n",
"print\"which is sufficiently close to the assumption.So there is no need of further iteration\"\n",
"#The total heat transfer is (Qt),during a 24-hour period\n",
"print\"The total heat transfer(Qt) during a 24-hour period in KJ is\"\n",
"Qt=Q*24*3600/1000\n",
"print\"Qt=\",Qt\n",
"#the amount of ice in kG which melts during a 24 hour period is (mice)\n",
"print\"Therefore,the amount of ice(mice)in kG which melts during a 24 hour period is\"\n",
"mice=Qt/deltahf\n",
"print\"mice=\",mice"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex2.13:pg-68"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 2, Example 13\n",
"P/A in m**-1 is\n",
"X= 400.0\n",
"m in m**-1 is\n",
"m= 3.28797974611\n",
"M in W/K is\n",
"M= 0.0955478103936\n",
"thetab in Â°C is \n",
"thetab= 100\n",
"Heat loss from rod in Watt, for different value of length(in m) is \n",
"Q= 0.705573384326\n",
"Q= 1.32655528327\n",
"Q= 2.53006298798\n",
"Q= 5.56299390901\n",
"Q= 8.29001416681\n",
"Q= 9.45769063154\n",
"Q= 9.52862252977\n",
"Q= 9.55478103936\n",
"For an infintely long rod heat loss in W is\n",
"We see that since k is large there is significant difference between the finite length and the infinte length cases\n",
"However when the length of the rod approaches 1m,the result become almost same.\n",
"Qinf= 9.55478103936\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 2, Example 13\"\n",
"#A very long,10mm diameter(D) copper rod(thermal conductivity,k=370W/(m*K))is exposed to an enviroment at temprature,Tinf=20Â°C.\n",
"D=0.01;\n",
"k=370;\n",
"Tinf=20;\n",
"#The base temprature of the radius maintained at Tb=120Â°C.\n",
"Tb=120;\n",
"#The heat transfer coefficient between the rod and the surrounding air is h=10W/(m*K**2)\n",
"h=10;\n",
"#The rate of heat transfer for all finite lengths will be given by P/A=(4*pi*D)/(pi*D**2)\n",
"#Let P/A=X\n",
"print\"P/A in m**-1 is\"\n",
"X=(4*math.pi*D)/(math.pi*D**2)\n",
"print\"X=\",X\n",
"#m is defined as ((h*p)/(k*A)]**0.5 \n",
"print\"m in m**-1 is\"\n",
"m=(h*X/k)**0.5\n",
"print\"m=\",m\n",
"#Let Y=h/(m*k)\n",
"Y=h/(m*k)\n",
"#Let M=(h*P*k*A)**0.5\n",
"P=(math.pi*D);#perimeter of the rod\n",
"A=(math.pi*D**2)/4;#Area of the rod\n",
"print\"M in W/K is\"\n",
"M=(h*P*k*A)**0.5\n",
"print\"M=\",M\n",
"#thetab is the parameter that defines the base temprature\n",
"print\"thetab in Â°C is \"\n",
"thetab=Tb-Tinf\n",
"print\"thetab=\",thetab\n",
"#Heat loss from the rod is defined as Q=(h*P*k*A)*thetab*(((h/m*k)+math.tanh(m*L)]/(1+(h/m*k)*math.tanh(m*L)]}\n",
"print\"Heat loss from rod in Watt, for different value of length(in m) is \"\n",
"L=0.02#Length of rod\n",
"Q=M*thetab*(((Y)+math.tanh(m*L))/(1+(Y)*math.tanh(m*L)))\n",
"print\"Q=\",Q\n",
"L=0.04#length of rod\n",
"Q=M*thetab*(((Y)+math.tanh(m*L))/(1+(Y)*math.tanh(m*L)))\n",
"print\"Q=\",Q\n",
"L=0.08#length of rod\n",
"Q=M*thetab*(((Y)+math.tanh(m*L))/(1+(Y)*math.tanh(m*L)))\n",
"print\"Q=\",Q\n",
"L=0.20#length of rod\n",
"Q=M*thetab*(((Y)+math.tanh(m*L))/(1+(Y)*math.tanh(m*L)))\n",
"print\"Q=\",Q\n",
"L=0.40#length of rod\n",
"Q=M*thetab*(((Y)+math.tanh(m*L))/(1+(Y)*math.tanh(m*L)))\n",
"print\"Q=\",Q\n",
"L=0.80#length of rod\n",
"Q=M*thetab*(((Y)+math.tanh(m*L))/(1+(Y)*math.tanh(m*L)))\n",
"print\"Q=\",Q\n",
"L=1.00#length of rod\n",
"Q=M*thetab*(((Y)+math.tanh(m*L))/(1+(Y)*math.tanh(m*L)))\n",
"print\"Q=\",Q\n",
"L=10.00#length of rod\n",
"Q=M*thetab*(((Y)+math.tanh(m*L))/(1+(Y)*math.tanh(m*L)))\n",
"print\"Q=\",Q\n",
"#For an infinitely long rod we use heat loss as ,Qinf=(h*P*k*A)**0.5*thetab\n",
"print\"For an infintely long rod heat loss in W is\"\n",
"Qinf=(h*P*k*A)**0.5*thetab\n",
"print\"We see that since k is large there is significant difference between the finite length and the infinte length cases\"\n",
"print\"However when the length of the rod approaches 1m,the result become almost same.\" \n",
"print\"Qinf=\",Qinf"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex2.14:pg-81"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 2, Example 14\n",
"The thermal conductivity of Rod B kB in W/(m*K) is \n",
"kB= 18.0\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 2, Example 14\"\n",
"#Considering two very long slender rods of the same diameter but of different materials.\n",
"#The base of each rod is maintained at 100Â°C while the surfaces of the rod are exposed to 20Â°C\n",
"#By traversing length of each rod with a thermocouple it was observed that tempratures of rod were equal at the position xA=0.15m and xB=0.075 from base.\n",
"xA=0.15;\n",
"xB=0.075;\n",
"#Thermal conductivity of rod A is known to be kA=72 W/(m*K)\n",
"kA=72;\n",
"#In case of a very long slender rod we use the tip boundary condition thetaL=0 as L--->infinity\n",
"#Therfore we can write for the locations where the tempratures are equal thetab*e**(-mA*xA)=thetab*e**(-mB*xB) or xA/xB=mB/mA,Again mB/mA=(kA/kB)**0.5\n",
"#So kB=kA*(xB/xA)**2\n",
"#The thermal conductivity of Rod B iskB\n",
"print\"The thermal conductivity of Rod B kB in W/(m*K) is \"\n",
"kB=kA*(xB/xA)**2\n",
"print\"kB=\",kB"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex2.15:pg-83"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 2, Example 15\n",
" perimeter of each fin in m is\n",
"P= 0.202\n",
"Cross sectional area of fin in m**2 is\n",
"A= 0.0001\n",
"M= 0.834805366538\n",
"m= 36.2958855016\n",
"Temprature parameter at fin base in K is\n",
"thetab= 100\n",
"Fixed temprature at fin tip in K is\n",
"thetaL= 50\n",
"Heat loss from the plate at 400K in W is\n",
"Qb= 13028.1662009\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 2, Example 15\"\n",
"#A stack that is b=300mm wide and l=100mm deep contains N=60 fins each of length L=12mm.\n",
"L=0.012;#in metre\n",
"b=0.3;#in metre\n",
"l=0.1;#in metre\n",
"N=60;\n",
"#The entire stack is made of aluminum which is everywhere t=1.0 mm thick.\n",
"t=0.001;#in metre\n",
"#The temprature limitations associated with electrical components are Tb=400K and TL=350K.\n",
"#Tb is base temprature and TL is end temprature\n",
"Tb=400;\n",
"TL=350; \n",
"#Given convection heat transfer coefficient(h=150W/(m**2*K)),Surrounding Temprature(Tinf=300K),thermal conductivity of aluminium(kaluminium=230W/(m*K))\n",
"h=150;\n",
"Tinf=300;\n",
"kal=230;\n",
"#Here both the ends of the fins are at fixed tempratures .Therefore we use M=(h*P*k*A)**0.5 and m=((h*P)/(k*A))**0.5,thetab=Tb-Tinf,thetaL=TL-Tinf\n",
"#from the given data perimeter of each fin is given by P= 2*(l+t)in m and area of each fin is A=t*l\n",
"print\" perimeter of each fin in m is\"\n",
"P= 2*(l+t)\n",
"print\"P=\",P\n",
"print\"Cross sectional area of fin in m**2 is\"\n",
"A=t*l\n",
"print\"A=\",A\n",
"#M is defined as (h*P*kal*A)**0.5 and m is defined as ((h*P)/(kal*A))**0.5\n",
"M=(h*P*kal*A)**0.5\n",
"m=((h*P)/(kal*A))**0.5\n",
"print\"M=\",M\n",
"print\"m=\",m\n",
"#thetab and thetaL are the parameters that define the fin tempratures at base and tip respectively.\n",
"print\"Temprature parameter at fin base in K is\"\n",
"thetab=Tb-Tinf\n",
"print\"thetab=\",thetab\n",
"print\"Fixed temprature at fin tip in K is\"\n",
"thetaL=TL-Tinf\n",
"print\"thetaL=\",thetaL\n",
"#Heat loss from the plate is Qb\n",
"print\"Heat loss from the plate at 400K in W is\"\n",
"Qb=(N*(h*P*kal*A)**0.5*thetab*((math.cosh(m*L)-(thetaL/thetab))/(math.sinh(m*L))))+(((l*b)-(N*A))*h*thetab)+(l*b*h*thetab)\n",
"print\"Qb=\",Qb"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKfqJ$8$8,Introduction to Heat Transfer/Chapter3.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"# Chapter 03:Multidimensional steady-state heat conduction"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex3.1:pg-92"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 3, Example 1\n",
"Temperature at the centre in Degree C is\n",
"T= 125.371641666\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 3, Example 1\"\n",
"#Length and breadth is given as 1 unit (Gemoetry is Square)\n",
"L = 1;#length\n",
"#Problem can be divided into two modules\n",
"#Solution to module 1 is given by Eq. 3.21, considering the first three terms\n",
"#n is the looping parameter\n",
"#theta is the non dimensional temperature defined as ((T-100)/100) where T is actual temperature in degree Celcius.\n",
"#Initialising theta as zero\n",
"theta = 0;\n",
"for n in range(1,3):\n",
" theta = theta+((2/math.pi)*((math.sin((n*math.pi)/2)*math.sinh((n*math.pi)/2))*((-1)**(n+1)+1)))/(n*math.sinh(n*math.pi));\n",
" \n",
"#Solution to module 2 is given by Eq. 3.24, considering the first three terms\n",
"for n in range(1,3):\n",
" theta2 = theta+(((3*2)/math.pi)*((math.sin((n*math.pi)/2)*math.sinh((n*math.pi)/2))*((-1)**(n+1)+1)))/(n*math.sinh(n*math.pi));\n",
" \n",
"#Calculating value of temperature from the value of theta\n",
"#Temperature in degree celcius\n",
"print\"Temperature at the centre in Degree C is\"\n",
"T = theta*100+100\n",
"print\"T=\",T"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex3.2:pg-94"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" Introduction to heat transfer by S.K.Som, Chapter 3, Example 2\n",
"Steady state non dimensional temperature is\n",
"theta=2*math.sinh(pi*y/a)*math.sin(pi*x/a)/(math.sinh(pi)) + math.sinh(pi*x/a)*math.sin(pi*y/a)/(math.sinh(pi))\n",
"theta= 0.597805223008\n",
"Temperature in K at centre point\n",
"T= 359.780522301\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 3, Example 2\"\n",
"#Temperature in K at four edges are given\n",
"#Theta is non dimensional temperature defined as ((T-300)/100) where T is actual temperature in K.\n",
"#Given length as well as the breadth of square plate is ''a''\n",
"#Problem can be divided into two modules\n",
"#Solution to module 1 is given by Eq. 3.23\n",
"#Solution of first module is non dimensional temperature theta1\n",
"#theta1=2*math.sinh(pi*y/a)*math.sin(pi*x/a)/(math.sinh(pi))\n",
"#Solution to module 2 is given by Eq. 3.24\n",
"#Solution of second module is non dimensional temperature theta2\n",
"#theta2=math.sinh(pi*x/a)*math.sin(pi*y/a)/(math.sinh(pi))\n",
"#Therefore\n",
"print\"Steady state non dimensional temperature is\"\n",
"print\"theta=2*math.sinh(pi*y/a)*math.sin(pi*x/a)/(math.sinh(pi)) + math.sinh(pi*x/a)*math.sin(pi*y/a)/(math.sinh(pi))\"\n",
"#At the centre, x coordinate and y coordinate in unit are\n",
"#x=a/2, y=a/2\n",
"#Non dimensional temperature at centre point\n",
"theta = (2*math.sinh(math.pi/2))/math.sinh(math.pi)+math.sinh(math.pi/2)/math.sinh(math.pi);\n",
"#Temperature in K at centre point\n",
"print\"theta=\",theta\n",
"print\"Temperature in K at centre point\"\n",
"T = theta*100+300\n",
"print\"T=\",T"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex3.3:pg-96"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 3, Example 3\n",
"Temperatures at nodal points in degree K\n",
"T1 in degree K\n",
"[ 398.67699539 155.83601706 66.53320567 119.43598224 79.06693359\n",
" 40.99573505 14.15266777 9.19140047]\n",
"T2 in degree K\n",
"[ 77.91800853 232.60510053 92.0706763 39.53346679 80.21585865\n",
" 48.72486726 19.11393507 11.30646706]\n",
"T3 in degree K\n",
"[ 33.26660284 92.0706763 237.56636783 20.49786753 48.72486726\n",
" 82.33092523 46.76647228 21.51623292]\n",
"T4 in degree K\n",
"[ 14.15266777 38.22787014 93.53294456 9.19140047 22.61293411\n",
" 43.03246584 124.91948821 27.99199234]\n",
"T5 in degree K\n",
"[-0. -0. -0. -0. -0. -0. -0. -0.]\n",
"T6 in degree K\n",
"[-0. -0. -0. -0. -0. -0. -0. -0.]\n",
"T7 in degree K\n",
"[ 95.65671512 227.3827139 384.21098442 77.62207329 214.83157803\n",
" 554.32152494 100.40908695 109.12176865]\n",
"T8 in degree K\n",
"[ 24.51040125 60.30115763 114.75324223 18.87022369 50.97049352\n",
" 124.71059274 74.64531291 166.55931761]\n"
]
}
],
"source": [
"import math\n",
"import numpy\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 3, Example 3\"\n",
"#internodal distance in x direction in m\n",
"deltax = 1.0/4;\n",
"#internodal distance in y direction in m\n",
"deltay = 1.0/4;\n",
"#Air temperature in degree K\n",
"Tinfinity = 400;\n",
"#Heat transfer coefficient in W/(m**2*K)\n",
"h = 10;\n",
"#T1, T2, T3, T4, T5, T6, T7, T8 are nodal temperatures in degree K.\n",
"#T is the temperature matrix and is transpose of [T1 T2 T3 T4 T5 T6 T7 T8]\n",
"#using Nodal Equations, we have Coefficeint Matrix A as\n",
"A = [[-4,1,0,0,1,0,0,0],[1,-4,1,0,0,1,0,0],[0,1,-4,1,0,0,1,0],[2,0,0,0,-4,1,0,0],[0,2,0,0,1,-4,1,0],[0,0,2,0,0,1,-4,1],[0,0,2,-6,0,0,0,1],[0,0,0,2,0,0,2,-6]]#Coefficient matrix B\n",
"B = [[-1200],[-600],[-600],[-600],[0],[0],[-1400],[-800]]\n",
"\n",
"\n",
"#Therefore the temperature matrix is\n",
"T = numpy.linalg.inv(A)*B;\n",
"#Temperature at nodal points in degree K\n",
"print\"Temperatures at nodal points in degree K\"\n",
"print\"T1 in degree K\"\n",
"T1 = T[0]\n",
"print T1\n",
"print\"T2 in degree K\"\n",
"T2 = T[1]\n",
"print T2\n",
"print\"T3 in degree K\"\n",
"T3 = T[2]\n",
"print T3\n",
"print\"T4 in degree K\"\n",
"T4 = T[3]\n",
"print T4\n",
"print\"T5 in degree K\"\n",
"T5 = T[4]\n",
"print T5\n",
"print\"T6 in degree K\"\n",
"T6 = T[5]\n",
"print T6\n",
"print\"T7 in degree K\"\n",
"T7 = T[6]\n",
"print T7\n",
"print\"T8 in degree K\"\n",
"T8 = T[7]\n",
"print T8"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex3.5:pg-98"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 3, Example 5\n",
"Temperatures at nodal points in degree C\n",
"T2 in degree C\n",
"[ 1.83976243e-36 4.79441040e-01 3.66134997e-01 3.07581515e-01\n",
" 5.38080937e-01]\n",
"T3 in degree C\n",
"[ 1.46972670e-67 1.92742646e+00 1.47191880e+00 1.23652483e+00\n",
" 1.07886949e+00]\n",
"T4 in degree C\n",
"[ 4.52446173e-92 1.47191880e+00 3.54032873e+00 2.97414801e+00\n",
" 1.67320356e+00]\n",
"T5 in degree C\n",
"[ 6.50142301e-108 1.23652483e+000 2.97414801e+000 5.91733919e+000\n",
" 2.36010173e+000]\n",
"T6 in degree C\n",
"[ 2.06473580e-113 1.16395938e+000 2.79961015e+000 5.57008016e+000\n",
" 3.18199172e+000]\n"
]
}
],
"source": [
"import math\n",
"import numpy\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 3, Example 5\"\n",
"#Thermal conductivity of aluminium in W/(m*K)\n",
"k = 200.0\n",
"#Diameter in m\n",
"d = 20*(10**(-3));\n",
"#Length of fin in m\n",
"L = 0.2;\n",
"#Wall temperature in degree C\n",
"Tw = 400.0;\n",
"#Air temperature in degree C\n",
"Tinfinity = 30;\n",
"#Heat transfer coefficient in W/(m**2*K)\n",
"h = 40.0;\n",
"#internodal distance in x direction in m\n",
"deltax = L/5;\n",
"#Node 1 temperature is equal to wall temperature in degree C\n",
"T1 = Tw;\n",
"#using Nodal Equations, we have Coefficeint Matrix A as\n",
"A = [[2.064,-1,0,0,0],[-1,2.064,-1,0,0],[0,-1,2.064,-1,0],[0,0,-1,2.064,-1],[0,0,0,-1,1.032]]\n",
"#Coefficient matrix B\n",
"B = [401.92,1.92,1.92,1.92,0.96]\n",
"#T2, T3, T4, T5, T6 are nodal temperature in degree C\n",
"#T is the temperature matrix and is transpose of [T2 T3 T4 T5 T6]\n",
"#Therefore the temperature matrix is\n",
"T = numpy.linalg.inv(A)**B;\n",
"#Temperature at nodal points in degree C\n",
"print\"Temperatures at nodal points in degree C\"\n",
"print\"T2 in degree C\"\n",
"T2 = T[0]\n",
"print T2\n",
"print\"T3 in degree C\"\n",
"T3 = T[1]\n",
"print T3\n",
"print\"T4 in degree C\"\n",
"T4 = T[2]\n",
"print T4\n",
"print\"T5 in degree C\"\n",
"T5 = T[3]\n",
"print T5\n",
"print\"T6 in degree C\"\n",
"T6 = T[4]\n",
"print T6"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex3.6:pg-104"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 3, Example 6\n",
"Temperatures at nodal points in degree C\n",
"T1 in degree C\n",
"[ -0. -0. -0. 186.04651163 1.86046512\n",
" 2.79069767 1.86046512 0.46511628 74.41860465]\n",
"T2 in degree C\n",
"[ -0. -0. -0. 74.41860465 1.69263965\n",
" 3.56988732 2.51738192 0.62934548 157.39630784]\n",
"T3 in degree C\n",
"[ -0. -0. -0. 83.72093023 3.88875569\n",
" 4.80220571 3.06401343 0.76600336 65.85950611]\n",
"T4 in degree C\n",
"[ -0. -0. -0. 55.81395349 2.45504675\n",
" 5.7444258 4.10453129 1.02613282 77.58331335]\n",
"T5 in degree C\n",
"[ -0. -0. -0. 37.20930233 1.77415488\n",
" 4.6199952 7.34116519 1.8352913 51.37856629]\n",
"T6 in degree C\n",
"[ -0. -0. -0. 37.20930233 8.78446416\n",
" 4.92927356 2.18652601 0.5466315 33.8527931 ]\n",
"T7 in degree C\n",
"[ -0. -0. -0. 27.90697674 2.46463678\n",
" 9.98561496 3.49556461 0.87389115 35.69887317]\n",
"T8 in degree C\n",
"[ -0. -0. -0. 18.60465116 1.09326301\n",
" 3.49556461 10.57779909 2.64444977 25.17381923]\n",
"T9 in degree C\n",
"[ -0. -0. -0. 9.30232558 0.5466315\n",
" 1.74778231 5.28889954 11.32222489 12.58690961]\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 3, Example 6\"\n",
"#Thermal conductivity of concrete in W/mK\n",
"k = 2;\n",
"#Length in m\n",
"L = 0.2;\n",
"#Breadth in m\n",
"b = 0.2;\n",
"#Depth in m\n",
"d = 0.2;\n",
"#Temperature of hot gas in chimney in degree C\n",
"Tg = 400;\n",
"#Air temperature in degree C\n",
"Tinfinity = 20;\n",
"#internodal distance in x direction in m\n",
"deltax = 0.1;\n",
"#internodal distance in y direction in m\n",
"deltay = 0.1;\n",
"#Heat transfer coefficient in W/(m**2*K)\n",
"h = 20;\n",
"#T1, T2, T3, T4, T5, T6, T7, T8, T9 are nodal temperatures in degree K.\n",
"#T is the temperature matrix and is transpose of [T1 T2 T3 T4 T5 T6 T7 T8 T9]\n",
"#using Nodal Equations, we have Coefficeint Matrix A as\n",
"A = numpy.array([[1,0,-4,2,0,1,0,0,0],[0,1,1,-4,1,0,1,0,0],[0,0,0,2,-4,0,0,2,0],[-3,1,1,0,0,0,0,0,0],[0,0,1,0,0,-3,1,0,0],[0,0,0,2,0,1,-6,1,0],[0,0,0,0,2,0,1,-6,1],[0,0,0,0,0,0,0,1,-2],[1,-4,0,2,0,0,0,0,0]]);\n",
"#Coefficient matrix B\n",
"B = numpy.array([0,0,0,-400,-20,-40,-40,-20,-400]);\n",
"#Therefore the temperature matrix is\n",
"T = numpy.linalg.inv(A)*B;\n",
"#Temperature at nodal points in degree C\n",
"print\"Temperatures at nodal points in degree C\"\n",
"print\"T1 in degree C\"\n",
"T1 = T[0]\n",
"print T1\n",
"print\"T2 in degree C\"\n",
"T2 = T[1]\n",
"print T2\n",
"print\"T3 in degree C\"\n",
"T3 = T[2]\n",
"print T3\n",
"print\"T4 in degree C\"\n",
"T4 = T[3]\n",
"print T4\n",
"print\"T5 in degree C\"\n",
"T5 = T[4]\n",
"print T5\n",
"print\"T6 in degree C\"\n",
"T6 = T[5]\n",
"print T6\n",
"print\"T7 in degree C\"\n",
"T7 = T[6]\n",
"print T7\n",
"print\"T8 in degree C\"\n",
"T8 = T[7]\n",
"print T8\n",
"print\"T9 in degree C\"\n",
"T9 = T[8]\n",
"print T9"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKfqJ\cc,Introduction to Heat Transfer/Chapter4.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"# Chapter 04:Unsteady conduction"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.1:pg-137"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 1\n",
"Biot number is\n",
"Bi= 0.277777777778\n",
"Problem is not suitable for lumped parameter analysis\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 1\"\n",
"#Diameter of apple in m\n",
"d = 100*(10**(-3));\n",
"#radius in m\n",
"r = d/2;\n",
"#Thermal conductivity of apple in W/(m*K)\n",
"k = 0.6;\n",
"#Heat transfer coefficient in W/(m**2*Â°C)\n",
"h = 10;\n",
"#Caculating characteristic dimension in m\n",
"Lc = (((((4*math.pi)*r)*r)*r)/3)/(((4*math.pi)*r)*r);\n",
"#Biot number\n",
"print\"Biot number is\"\n",
"Bi = (h*Lc)/k\n",
"print\"Bi=\",Bi\n",
"if Bi<0.1:\n",
" print\"Problem is suitable for lumped parameter analysis\"\n",
"else:\n",
" print\"Problem is not suitable for lumped parameter analysis\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.2:pg-138 "
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 2\n",
"Time constant in seconds is\n",
"tc= 8.0\n",
"Time required in seconds\n",
"t= 36.8413614879\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 2\"\n",
"#Diameter of sphere in m\n",
"d = 1.5*(10**(-3));\n",
"#radius in m\n",
"r = d/2;\n",
"#Thermal conductivity of sphere in W/(m*Â°C)\n",
"k = 40.0;\n",
"#Density in kg/m**3\n",
"rho = 8000.0;\n",
"#Specific heat in J/(Kg*K)\n",
"c = 300.0;\n",
"#Heat transfer coefficient in W/(m**2*Â°C)\n",
"h = 75.0;\n",
"#Time constant in sec\n",
"tc = ((rho*c)*(((((4*math.pi)*r)*r)*r)/3))/((((h*4)*math.pi)*r)*r);\n",
"print\"Time constant in seconds is\"\n",
"print\"tc=\",tc\n",
"#Using eq. 4.4\n",
"#Given fraction is 0.01 (1 percent)\n",
"#Required time in sec\n",
"t = (-8)*math.log(0.01);\n",
"print\"Time required in seconds\"\n",
"print\"t=\",t"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.3:pg-138"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 3\n",
"Maximum dimension in metre for lumped parameter analysis\n",
"a= 5.0\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 3\"\n",
"#Heat transfer coefficient in W/(m**2*K)\n",
"h = 30;\n",
"#Thermal conductivity of sphere in W/(m*K)\n",
"k = 250;\n",
"#Biot number for lumped parameter analysis is 0.1\n",
"Bi = 0.1;\n",
"#Characteristic dimension of a cube is (a/6) where a is the side of cube in metre\n",
"#Maximum dimension in metre\n",
"a = ((6*k)*Bi)/h;\n",
"print\"Maximum dimension in metre for lumped parameter analysis\"\n",
"print\"a=\",a"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.4:pg-146"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 4\n",
"Time required to cool milk in minutes\n",
"Energy required for cooling in KJ\n",
"E= -319.013666564\n"
]
}
],
"source": [
"from scipy.integrate import quad\n",
"import math\n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 4\"\n",
"#Diameter of glass in m\n",
"d = 50*(10**(-3));\n",
"#radius in m\n",
"r = d/2;\n",
"#Height of milk in glass in m\n",
"H = 0.1;\n",
"#Initial temperature of milk in Â°C\n",
"T = 80.0;\n",
"#Cold water temperature in Â°C\n",
"Tf = 25.0;\n",
"#Heat transfer coefficient in W/(m**2*Â°C)\n",
"h = 100.0;\n",
"#Thermal conductivity of milk in W/(m*K)\n",
"k = 0.6;\n",
"#Density of milk in kg/m**3\n",
"rho = 900.0;\n",
"#Specific heat in J/(Kg*K)\n",
"c = 4.2*(10**3);\n",
"#Since the milk temperature is always maintained as constant.\n",
"#Therefore it can be assumed as lumped paramteter analysis.\n",
"#Time constant n seconds\n",
"tcs = (((((rho*c)*math.pi)*r)*r)*H)/(((h*math.pi)*d)*H);\n",
"#Time constant in minutes\n",
"tc = tcs/60;\n",
"#Calculating from eq. 4.3 time taken to cool milk from 80Â°C to 30Â°C\n",
"t = -tc*math.log((30.0-Tf)/(T-Tf));\n",
"print\"Time required to cool milk in minutes\"\n",
"t\n",
"#Energy transferred during cooling\n",
"E = (((h*math.pi)*d)*H)*quad(lambda t:(80.0-25.0)*math.e*(-t/472.5),0,60.0*t)[0];\n",
"print\"Energy required for cooling in KJ\"\n",
"E = E/1000.0\n",
"print \"E=\",E"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.5:pg-159"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 5\n",
"Time required in hours\n",
"t= 7.5\n",
"Heat transfer rate in MJ\n",
"Q= 186.3\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 5\"\n",
"#Thermal conductivity of wall in W/(m*K)\n",
"k = 0.6;\n",
"#Thermal diffusivity in m**2/s\n",
"alpha = 5*(10**(-7));\n",
"#Thickness in m\n",
"L = 0.15;\n",
"#Initial temperature in Â°C\n",
"Ti = 30;\n",
"#Temperature of hot gas in Â°C\n",
"Tinfinity = 780;\n",
"#Heat transfer coefficient in W/(m**2*K)\n",
"h = 20;\n",
"#Surface temperaute to be achieved in Â°C\n",
"To = 480;\n",
"#Dimensionless temperature ratio\n",
"z = (To-Tinfinity)/(Ti-Tinfinity);\n",
"#Biot number\n",
"Bi = (h*L)/k;\n",
"#For this value of (1/Bi) and dimensionless temp. ratio\n",
"#From Fig. 4.11 Fourier number is\n",
"Fo = 0.6;\n",
"#Time required in seconds\n",
"t = ((Fo*L)*L)/alpha;\n",
"print\"Time required in hours\"\n",
"t = t/3600\n",
"print\"t=\",t\n",
"#From fig. 4.13, for this Bi and Fo*Bi*Bi, we have ratio of heats as\n",
"#Q/Qi=0.69\n",
"#Heat transfer in J\n",
"Q = ((((0.69*k)*2)*L)*(Tinfinity-Ti))/alpha;\n",
"print\"Heat transfer rate in MJ\"\n",
"Q = Q/(10**6)\n",
"print\"Q=\",Q"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.6:pg-166"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 6\n",
"Temperature at this distance in Â°C\n",
"T= 355.5\n",
"Heat transfer rate in MJ\n",
"Q= 100.0\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 6\"\n",
"#Thickness of plate in m\n",
"L = 0.2;\n",
"#Initial temperature in Â°C\n",
"Ti = 530;\n",
"#Heat transfer coefficient in W/(m**2*K)\n",
"h = 500;\n",
"#Given distance in m\n",
"x = L-20*(10**(-3));\n",
"#Temperature of surrounding in Â°C\n",
"Tinfinity = 30;\n",
"#Given time in seconds\n",
"t = 225;\n",
"#Thermal conductivity of aluminium in W/(m*K)\n",
"k = 200;\n",
"#Thermal diffusivity in m**2/s\n",
"alpha = 8*(10**(-5));\n",
"#Biot number\n",
"Bi = (h*L)/k;\n",
"#Fourier number\n",
"Fo = (alpha*t)/(L*L);\n",
"#From fig. 4.11, at this Fo and (1/Bi), we have dimensionless temperature\n",
"#ratio to be 0.7\n",
"#From fig. 4.12 for this (1/Bi) and (x/L), we have another dimensionless\n",
"#temperature to be 0.93\n",
"#Temperature in Â°C\n",
"T = Tinfinity+(0.93*0.7)*(Ti-Tinfinity);\n",
"print\"Temperature at this distance in Â°C\"\n",
"print\"T=\",T\n",
"#From fig. 4.13, for this Bi and Fo*Bi*Bi, we have ratio of heats as\n",
"#Q/Qi=0.4\n",
"#Heat transfer in J\n",
"Q = (((0.4*k)*L)*(Ti-Tinfinity))/alpha;\n",
"print\"Heat transfer rate in MJ\"\n",
"Q = Q/(10**6)\n",
"print\"Q=\",Q"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.7:pg-171"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 7\n",
"Temperature at this radius in Â°C\n",
"T= 300.0\n",
"Heat transfer rate per unit length in MJ/m\n",
"Q= 33.2639222145\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 7\"\n",
"#Radius in m\n",
"ro = 0.15;\n",
"#Initial temperature in Â°C\n",
"Ti = 530;\n",
"#Temperature of surrounding in Â°C\n",
"Tinfinity = 30;\n",
"#Heat transfer coefficient in W/(m**2*K)\n",
"h = 380;\n",
"#Thermal conductivity of aluminium in W/(m*K)\n",
"k = 200;\n",
"#Thermal diffusivity in m**2/s\n",
"alpha = 8.5*(10**(-5));\n",
"#Given radius at which temperature has to be find out in m\n",
"r = 0.12;\n",
"#Given time in seconds\n",
"t = 265;\n",
"#Fourier number\n",
"Fo = (alpha*t)/(ro**2);\n",
"#Biot number\n",
"Bi = (h*ro)/k;\n",
"#From fig. 4.15, at this fourier number,Fo and (1/Bi), we have dimensionless temperature\n",
"#ratio to be 0.6\n",
"#From fig. 4.16 for this (1/Bi) and (r/ro), we have another dimensionless\n",
"#temperature to be 0.9\n",
"#Temperature in Â°C\n",
"T = Tinfinity+(0.9*0.6)*(Ti-Tinfinity);\n",
"print\"Temperature at this radius in Â°C\"\n",
"print\"T=\",T\n",
"#From fig. 4.17, for this Bi and Fo*Bi*Bi, we have ratio of heats as\n",
"#Q/Qi=0.4\n",
"#Heat transfer per metre in J/m\n",
"Q = (((((0.4*k)*math.pi)*ro)*ro)*(Ti-Tinfinity))/alpha;\n",
"print\"Heat transfer rate per unit length in MJ/m\"\n",
"Q = Q/(10**6)\n",
"print\"Q=\",Q"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.8:pg-174"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 8\n",
"Time required in minutes\n",
"t= 4.16666666667\n"
]
}
],
"source": [
"import math\n",
"\n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 8\"\n",
"#Radius in m\n",
"ro = 0.05;\n",
"#Initial temperature in Â°C\n",
"Ti = 530;\n",
"#Temperature of surrounding in Â°C\n",
"Tinfinity = 30;\n",
"#Heat transfer coefficient in W/(m**2*K)\n",
"h = 500;\n",
"#Thermal conductivity of aluminium in W/(m*K)\n",
"k = 50;\n",
"#Thermal diffusivity in m**2/s\n",
"alpha = 1.5*(10**(-5));\n",
"#Required centre temperature to achieve in Â°C\n",
"To = 105;\n",
"#Dimensionless temperature\n",
"z = (To-Tinfinity)/(Ti-Tinfinity);\n",
"#Biot number\n",
"Bi = (h*ro)/k;\n",
"#For this value of (1/Bi) and dimensionless temp. ratio\n",
"#From Fig. 4.19 Fourier number is\n",
"Fo = 1.5;\n",
"#Time required in seconds\n",
"t = ((Fo*ro)*ro)/alpha;\n",
"print\"Time required in minutes\"\n",
"t = t/60\n",
"print\"t=\",t"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.9:pg-177"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 9\n",
"Tempearture of bar in Â°C\n",
"T= 260.3\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 9\"\n",
"#Thermal conductivity of aluminium in W/(m*K)\n",
"k = 198;\n",
"#Length in m\n",
"L = 0.18;\n",
"#Breadth in m\n",
"b = 0.104;\n",
"#Initial temperature in Â°C\n",
"Ti = 730;\n",
"#Temperature of surrounding in Â°C\n",
"Tinfinity = 30;\n",
"#Heat transfer coefficient in W/(m**2*K)\n",
"h = 1100;\n",
"#Thermal diffusivity in m**2/s\n",
"alpha = 8.1*(10**(-5));\n",
"#Given time in seconds\n",
"t = 100;\n",
"#Bar can be considered to be an intersection of two infinite plates of\n",
"#thickness L1 and L2 in m\n",
"L1 = L/2;\n",
"L2 = b/2;\n",
"#For plate 1\n",
"#Fourier number\n",
"Fo1 = (alpha*t)/(L1**2);\n",
"#Biot number\n",
"Bi1 = (h*L1)/k;\n",
"#From fig. 4.11, at this Fo and (1/Bi), we have dimensionless temperature\n",
"#ratio to be 0.7\n",
"#For plate 2\n",
"#Fourier number\n",
"Fo2 = (alpha*t)/(L2**2);\n",
"#Biot number\n",
"Bi2 = (h*L2)/k;\n",
"#From fig. 4.11, at this Fo and (1/Bi), we have dimensionless temperature\n",
"#ratio to be 0.47\n",
"#Therefore combined dimensionless temperature ratio is multiply of two\n",
"z = 0.47*0.7;\n",
"#Temperature in Â°C\n",
"T = Tinfinity+z*(Ti-Tinfinity);\n",
"print\"Tempearture of bar in Â°C\"\n",
"print\"T=\",T"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.10:pg-180"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 10\n",
"The factor((To-Tinf)/(Ti-Tinf)) is \n",
"For plate 1\n",
"A= 0.85\n",
"For plate 2\n",
"B= 0.8\n",
"For plate 1\n",
"A= 0.83\n",
"For plate 2\n",
"B= 0.72\n",
"The calculated value is very close to the required value of 0.6.Hence the time required for the centre of the beam to reach 310Â°C is nearly 1200s or 20 minutes.\n",
"T= 0.5976\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 10\"\n",
"#An iron beam of rectangular cross section of size length,L=300mm by breadth,B=200 mm is used in the construction of a building\n",
"#Initially the beam is at a uniform temprature(Ti) of 30Â°C.\n",
"#Due to an accidental fire,the beam is suddenly exposed to hot gases at temprature,Tinf=730Â°C,with a convective heat transfer coefficient(h) of 100 W/(m**2*K)\n",
"#To determine the time required for the centre plane of the beam to reach a temprature(To) of 310Â°C.\n",
"To=310;\n",
"Tinf=730;\n",
"Ti=30;\n",
"#Take thermal conductivity k=73W/(m*K) and thermal diffusivity of the beam alpha=2.034*10**-5m**2/s \n",
"alpha=2.034*10**-5; \n",
"k=73; \n",
"h=100; \n",
"#The rectangular iron beam can be considered as an intersection of an infinite plate 1 having thickness 2*L1=300mm and a second infinite plate 2 of thickness 2*L2=200mm \n",
"L1=0.15;#in metre\n",
"L2=0.10;#in metre\n",
"#Here the faactor X=((To-Tinf)/(Ti-Tinf))\n",
"print\"The factor((To-Tinf)/(Ti-Tinf)) is \"\n",
"X=((To-Tinf)/(Ti-Tinf))\n",
"#Therefore we can write 0.6=((To-Tinf)/(Ti-Tinf))plate 1 *((To-Tinf)/(Ti-Tinf))plate2\n",
"#A straight forward solution is not possible.We have to adopt an iterative method of solution \n",
"#At first ,a value of time(t) is assumed to determine the centre-line temprature of the beam.The value of t at which((To-Tinf)/(Ti-Tinf))beam =0.6 is satisfied\n",
"#Let us first assume time, t=900s\n",
"t=900;\n",
"print\"For plate 1\"\n",
"#For plate1 Biot number Bi1=h*L1/k \n",
"Bi1=h*L1/k \n",
"Y=1/Bi1\n",
"#Fourier number(Fo1) is\n",
"Fo1=alpha*t/L1**2\n",
"#At Fo=0.814 and (1/Bi)=4.87...We read from graphs A=((To-Tinf)/(Ti-Tinf))plate1= 0.85\n",
"A=0.85;\n",
"print\"A=\",A\n",
"print\"For plate 2\"\n",
"#For plate1 Biot number Bi2=h*L2/k \n",
"Bi2=h*L2/k \n",
"Y=1/Bi2\n",
"#Fourier number(Fo2) is\n",
"Fo2=alpha*t/L2**2\n",
"#At Fo=1.83 and (1/Bi)=7.3...We read from graphs B=((To-Tinf)/(Ti-Tinf))plate2= 0.8\n",
"B=0.8;\n",
"print\"B=\",B\n",
"#Therefore ((To-Tinf)/(Ti-Tinf))plate1*((To-Tinf)/(Ti-Tinf))plate2=A*B\n",
"T=A*B\n",
"#Since the calculated value of 0.68 is greater than the required value of 0.60 and Tinf>To>Ti,The assume dvalue of t is less.\n",
"#So let us take time,t=1200s for the second iteration\n",
"t=1200;\n",
"print\"For plate 1\"\n",
"#For plate1 Biot number Bi1=h*L1/k \n",
"Bi1=h*L1/k \n",
"Y=1/Bi1\n",
"#Fourier number (Fo1)\n",
"Fo1=alpha*t/L1**2\n",
"#At Fo=1.08 and (1/Bi)=4.87...We read from graphs A=((To-Tinf)/(Ti-Tinf))plate1= 0.83\n",
"A=0.83;\n",
"print\"A=\",A\n",
"print\"For plate 2\"\n",
"#For plate1 Biot number Bi2=h*L2/k \n",
"Bi2=h*L2/k \n",
"Y=1/Bi2\n",
"#Fourier number (Fo2)\n",
"Fo2=alpha*t/L2**2\n",
"#At Fo=2.44 and (1/Bi)=7.3...We read from graphs B=((To-Tinf)/(Ti-Tinf))plate2= 0.72\n",
"B=0.72;\n",
"print\"B=\",B\n",
"#Therefore ((To-Tinf)/(Ti-Tinf))plate1*((To-Tinf)/(Ti-Tinf))plate2=A*B\n",
"T=A*B\n",
"print\"The calculated value is very close to the required value of 0.6.Hence the time required for the centre of the beam to reach 310Â°C is nearly 1200s or 20 minutes.\" \n",
"print\"T=\",T"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.11:pg-182"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 11\n",
"The time required for the temprature to reach 255Â°C at a depth of 80mm, in minutes is\n",
"T= 255\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 11\"\n",
"#A large slab wrought-iron is at a uniform temprature of Ti=550Â°C.\n",
"#The temprature of one surface is suddenly changed to Tinf=50Â°C\n",
"Tinf=50;\n",
"Ti=550; \n",
"#For slab conductivity(k=60W/(m*K)),Thermal diffusivity(alpha=1.6*10**-5m**2/s)\n",
"#To calculate the time(t) required for the temprature to reach T=255Â°C at a depth of 80mm\n",
"k=60;\n",
"T=255;\n",
"alpha=1.6**10-5;\n",
"#Similarity parameter,eta=x/(2*(alpha*t)**0.5)=(10/t**0.5)\n",
"#((T-Tinf)/(Ti-Tinf))=erf(10/t**0.5)...where erf is the error function.\n",
"#Let ((T-Tinf)/(Ti-Tinf))=X\n",
"X=((T-Tinf)/(Ti-Tinf));\n",
"#This implies erf(10/t**0.5)=0.41\n",
"#We read from the table the value of eta(=10/t**0.5)=0.38....corresponding to erf(eta)=0.41\n",
"#Therefore 10/t**0.5=0.38...this implies t=(10/0.38)**2\n",
"print\"The time required for the temprature to reach 255Â°C at a depth of 80mm, in minutes is\"\n",
"t=(10/0.38)**2/60\n",
"print\"T=\",T"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.12:pg-186"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 12\n",
"gaussian error function is \n",
"E= 0.998109069322\n",
"The temprature at a depth(x) of 100mm after a time(t) of 100 seconds,in Â°C is\n",
"T= -29851.5095103\n"
]
}
],
"source": [
"import math\n",
"import scipy \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 12\"\n",
"#A large block of nickel steel conductivity(k=20W/(m*K)),thermal diffusivity(alpha=0.518*10-5 m**2/s) is at uniform temprature(Ti) of 30Â°C.\n",
"Ti=30.0;\n",
"k=20.0;\n",
"alpha=0.518*10.0**-5.0;\n",
"#One surface of the block is suddenly exposed to a constant surface heat flux(qo) of 6MW/m**2.\n",
"qo=6*10**6;#in W/m**2\n",
"#To determine the temprature at a depth(x) of 100mm after a time(t) of 100 seconds.\n",
"t=100.0;\n",
"x=0.1;#in metre\n",
"#Similarity parameter,eta=x/(4*alpha*t)\n",
"eta=x/((4.0*alpha*t)**0.5)\n",
"#E is gaussian error function\n",
"print\"gaussian error function is \"\n",
"E=scipy.special.erf(eta)\n",
"print\"E=\",E\n",
"#The equation to determine temprature is T-Ti=((2*qo(alpha*t/math.pi)**0.5)/(k))*e**((-x**2)/(4*alpha*t))-((qo*x)/(k))*erf(x/(2.0*(alpha*t)**0.5))\n",
"#Above equation can also be written as T=Ti+((2*qo(alpha*t/math.pi)**0.5)/(k))*e**((-x**2)/(4*alpha*t))-((qo*x)/(k))*erf(x/(2.0*(alpha*t)**0.5))\n",
"print\"The temprature at a depth(x) of 100mm after a time(t) of 100 seconds,in Â°C is\"\n",
"T=Ti+((2*qo*(alpha*t/math.pi)**0.5)/(k))*math.e**((-x**2.0)/(4*alpha*t))-((qo*x)/(k))*scipy.special.erf(x/(2*(alpha*t)**0.5))\n",
"print\"T=\",T\n",
"#NOTE:The answer in the book is incorrect(Calculation mistake)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex4.14:pg-187 "
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 4, Example 14\n",
"Temperature distribution after 25 mins in Â°C\n",
"T= [[ 2.29192547e+02 2.91925466e+00 1.11801242e+00 4.34782609e-01\n",
" 1.86335404e-01 6.21118012e-02]\n",
" [ 8.75776398e+01 8.75776398e+00 3.35403727e+00 1.30434783e+00\n",
" 5.59006211e-01 1.86335404e-01]\n",
" [ 3.35403727e+01 3.35403727e+00 8.94409938e+00 3.47826087e+00\n",
" 1.49068323e+00 4.96894410e-01]\n",
" [ 1.30434783e+01 1.30434783e+00 3.47826087e+00 9.13043478e+00\n",
" 3.91304348e+00 1.30434783e+00]\n",
" [ 5.59006211e+00 5.59006211e-01 1.49068323e+00 3.91304348e+00\n",
" 1.02484472e+01 3.41614907e+00]\n",
" [ 3.72670807e+00 3.72670807e-01 9.93788820e-01 2.60869565e+00\n",
" 6.83229814e+00 8.94409938e+00]]\n"
]
}
],
"source": [
"import math\n",
"import numpy\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 4, Example 14\"\n",
"#Nodal distance Deltax in m\n",
"deltax = 0.1;\n",
"#Time in seconds\n",
"t = 25*60;\n",
"#timestep deltaT in seconds\n",
"deltaT = 500;\n",
"#Number of increment\n",
"n = t/deltaT;\n",
"#Temperature raised in Â°C\n",
"To = 580.0;\n",
"#Using Eq. 4.114 for interior grid points, table 4.8 for exterior node\n",
"#Using Eq. 4.125a to 4.125f are written in matrix form\n",
"#Coefficient matrix A is\n",
"A = [[-3,1,0,0,0,0],[1,-3,1,0,0,0],[0,1,-3,1,0,0],[0,0,1,-3,1,0],[0,0,0,1,-3,1],[0,0,0,0,2,-3]]\n",
"#Coefficient matrix B is\n",
"B = [-600,-20,-20,-20,-20,-20];\n",
"#Temperature matrix is transpose of [T2 T3 T4 T5 T6 T7] where\n",
"#T2 to T7 are temperature in Â°C\n",
"#From Eq. 4.126\n",
"#Temperature distribution after one time step\n",
"T = numpy.linalg.inv(A)*B;\n",
"print\"Temperature distribution after 25 mins in Â°C\"\n",
"print\"T=\",T"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKfqJgי..,Introduction to Heat Transfer/Chapter5.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"# Chapter 5:Convection"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex5.3:pg-206"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 5, Example 3\n",
"Reynolds number is\n",
"ReL= 55263.1578947\n",
"The average heat transfer coefficient over a length(L)= 1m ,in W/m**2 is\n",
"hbarL= 4.16\n",
"The rate of heat transfer in W/m of width is\n",
"Q= 332.8\n"
]
}
],
"source": [
"import math \n",
"from scipy.integrate import quad\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 5, Example 3\"\n",
"#Air at temprature (T1=20Â°C) and 1 atmospheric pressure flows over a flat plate with a free stream velocity(Uinf) of 1m/s.\n",
"Uinf=1;\n",
"T1=20;\n",
"#The length of plate is 1m and is heated over its entire length to a constant temprature of T2=100Â°C.\n",
"T2=100;\n",
"#For air at 20Â°C(The mean temprature of 100Â°C and 20Â°C),viscosity(mu=1.9*10**-5kg/(m*s)),density(rho=1.05kg/m**3),conductivity(k=0.03W/(m*K)),specific heat(cp=1.007kJ/(kg*K))\n",
"#Prandtl number is Pr=0.7\n",
"mu=1.9*10**-5;\n",
"rho=1.05;\n",
"k=0.03;\n",
"cp=1.007;\n",
"Pr=0.7;\n",
"#For laminar flow over a plate Nusselt number is Nux=0.332*Rex**0.5*Pr**(1/3)\n",
"#The boundary layer flow over a flat plate will be laminar if Reynolds number is Rex=(rho*Uinf*x)/mu<5*10**5\n",
"#First of all we have to check whether the flow is laminar or not.\n",
"#Let us check at x=1m\n",
"x=1.0;\n",
"print\"Reynolds number is\"\n",
"ReL=(rho*Uinf*x)/mu\n",
"print\"ReL=\",ReL\n",
"#There fore the flow is laminar and we can use the relationships of Nux,\n",
"#Thus Rex=(1.05*1*x)/(1.9*10**-5)=0.5526*10**5*x\n",
"#Therefore we can write Nux=(hx*x/k)=0.332*(0.5526*10**5*x)**0.5*Pr**(1/3)....or hx=2.08*x**(-1/2) W/(m**2*Â°C)\n",
"#hbarL is the average heat transfer coefficient over a length(L)\n",
"print\"The average heat transfer coefficient over a length(L)= 1m ,in W/m**2 is\"\n",
"L=1;\n",
"hbarL=(1.0/L)*quad(lambda x:2.08*x**(-1/2.0),0,L)[0]\n",
"print\"hbarL=\",hbarL\n",
"#Q is the rate of heat transfer\n",
"print\"The rate of heat transfer in W/m of width is\"\n",
"Q=hbarL*L*(T2-T1)\n",
"print\"Q=\",Q"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex5.4:pg-207"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 5, Example 4\n",
"The local heat transfer coefficient hx is hx=27.063*U**0.85\n",
"The minimum flow velocity in m/s is\n",
"U= 15.4806813943\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 5, Example 4\"\n",
"#Air at atmospheric pressure is required to flow over a circuit board to cool the electronics element mounted on it.\n",
"#Chip has length (L)=3mm and width(B)=3mm located x=0.1m from the leading edge\n",
"L=0.003;#in metre\n",
"B=0.003;#in metre\n",
"x=0.1;\n",
"#The Nusselt no. is given by Nux=0.06*Rex**0.85*Pr**0.33\n",
"#The chip has to dissipate E=50mW of energy while its surface temprature has to be kept below temprature,Ts=45Â°C and free strem Temptrature of air is Tinf=25Â°C\n",
"Ts=45;\n",
"Tinf=25;\n",
"E=50*10**-3;#in watt\n",
"#For air ,density(rho=1.2kg/m**3),viscosity(mu=1.8*10**5kg/(m*s)),conductivity(k=0.03W/(m*K)) and specific heat(cp=1000J/(kg*K))\n",
"rho=1.2;\n",
"mu=1.8*10**5;\n",
"k=0.03;\n",
"cp=1000;\n",
"#Let the minimum flow velocity be U.\n",
"#The local heat transfer coefficient hx where the chip is mounted is determined as hx=(k/x)*0.06*(rho*U*x/mu)**0.85*(mu*cp/k)**0.33\n",
"print\"The local heat transfer coefficient hx is hx=27.063*U**0.85\"\n",
"#from an enrgy balance we can write as E=27.063*U**0.85*L*B*(Ts-Tinf)\n",
"print\"The minimum flow velocity in m/s is\"\n",
"U=(E/(27.063*L*B*(Ts-Tinf)))**(1/0.85)\n",
"print\"U=\",U"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex5.6:pg-208"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 5, Example 6\n",
"mdot= 0.0235619449019\n",
"(dTb/dx)in Â°C/m is\n",
"Y= 26.6666666667\n",
"Therefore Exit bulk mean temprature Tb2 in Â°C is\n",
"Tb2= 83.3333333333\n",
"Heat flux(hx) in W/(m**2*Â°C) is \n",
"hx= 100\n",
"Overall Nusselt number is \n",
"NuL= 87.7192982456\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 5, Example 6\"\n",
"#Air at 1atm pressure and temprature(Tin)=30Â°C enters a tube of 25mm diameter(D) with a velocity(U) of 10m/s\n",
"D=0.025;#in metre\n",
"U=10;\n",
"Tin=30;\n",
"#Tube is heated so that a constant heat flux(q) of 2kW/m**2 is maintained at the wall whose temprature is deltaT=20Â°C above the bulk mean air temprature through the length of tube \n",
"#Let Tw-Tb=T\n",
"q=2000;\n",
"deltaT=20;\n",
"#The length(L)= 2m\n",
"L=2;\n",
"#For air density(rho=1.2kg/m**3),specific heat(cp=1000J/(kg*K))\n",
"rho=1.2;\n",
"cp=1000;\n",
"#From an energy balance of a control volume of air we get mdot*cp*(Tb+(dTb/dx)*deltax-Tb)=q*pi*D*deltax or (dTb/dx)=(q*pi*D)/(mdot*cp)\n",
"#mass flow rate=mdot\n",
"mdot=rho*math.pi*D**2*U;\n",
"print\"mdot=\",mdot\n",
"#let (dTb/dx)=Y\n",
"print\"(dTb/dx)in Â°C/m is\"\n",
"Y=(4*q*math.pi*D)/(mdot*cp)\n",
"print\"Y=\",Y\n",
"#Tb2 is Exit bulk mean temprature\n",
"print\"Therefore Exit bulk mean temprature Tb2 in Â°C is\"\n",
"Tb2=Tin+Y*2\n",
"print\"Tb2=\",Tb2\n",
"#Again we can write at any section of the tube hx*(Tw-Tb)=q or hx=q/(Tw-Tb)\n",
"#hx is heat flux\n",
"print\"Heat flux(hx) in W/(m**2*Â°C) is \"\n",
"hx=q/(deltaT)\n",
"print\"hx=\",hx\n",
"#Since Tw-Tb remains the same,The heat transfer coefficient at all sections are the same\n",
"#Now Overall Nusselt number,NuL=hx*D/k\n",
"#The thermal conductivity of air at mean temprature of (30+83.4)/2=56.7Â°C is k=0.0285 W/(m*K)\n",
"k=0.0285;\n",
"print\"Overall Nusselt number is \"\n",
"NuL=hx*D/k\n",
"print\"NuL=\",NuL"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex5.7:pg-210"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 5, Example 7\n",
"Beta(The volumetric coefficient of expansion in K**-1 is\n",
"Beta= 0\n",
"Grashoff number is\n",
"Gr= 0.0\n",
"The average nusselt number is\n",
"NuHbar= 0.13\n",
"Heat flux hbar in W/(m**2*Â°C)\n",
"hbar= 0.00169\n",
"The heat loss from the plate in W is\n",
"Q= 0.4394\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 5, Example 7\"\n",
"#A wall is exposed to nitrogen at one atmospheric pressure and temprature,Tinf=4Â°C.\n",
"Tinf=4;\n",
"#The wall is H=2.0m high and B=2.5m wide and is maintained at temprature,Ts=56Â°C\n",
"Ts=56;\n",
"H=2;\n",
"B=2.5;\n",
"A=H*B;#area is(A)\n",
"#The average nusselt number NuHbar over the height of the plate is given by NuHbar=0.13*(Gr*Pr)**(1/3)\n",
"#The properties of nitrogen at mean film temprature(Tf) is (56+4)/2=30Â°C are given as density(rho=1.142kg/m**3) ,conductivity(k=0.026W/(m*K)),\n",
"#kinematic viscosity(nu=15.630*10**-6 m**2/s) ,Prandtl number(Pr=0.713)\n",
"rho=1.142;\n",
"k=0.026;\n",
"nu=15.630*10**-6;\n",
"Pr=0.713;\n",
"Tf=30;\n",
"#We first have to detrmine the value of Grashoff number,Gr.In consideration of nitrogen as an ideal gas,we can write\n",
"#Beta(The volumetric coefficient of expansion)=1/T\n",
"print\"Beta(The volumetric coefficient of expansion in K**-1 is\"\n",
"Beta=1/(273+Tf)\n",
"print\"Beta=\",Beta\n",
"#Now Gr=(g*Beta*(Ts-Tinf)*H**3)/nu**2\n",
"g=9.81;#acceleration due to gravity\n",
"print\"Grashoff number is\"\n",
"Gr=(g*Beta*(Ts-Tinf)*H**3)/nu**2\n",
"print\"Gr=\",Gr\n",
"print\"The average nusselt number is\"\n",
"NuHbar=0.13*(Gr*Pr)**(1/3)\n",
"print\"NuHbar=\",NuHbar\n",
"#hbar is the heat flux\n",
"print\"Heat flux hbar in W/(m**2*Â°C)\"\n",
"hbar=NuHbar*k/H\n",
"print\"hbar=\",hbar\n",
"#Q is the heat loss from the plate\n",
"print\"The heat loss from the plate in W is\"\n",
"Q=hbar*A*(Ts-Tinf)\n",
"print\"Q=\",Q"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex5.8:pg-211"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 5, Example 8\n",
"The heat flux in W/(m**2*K) is\n",
"hbar 120.0\n",
"The heat loss from the wire is Q=hbar*pi*D*L*(Twire-Tair) in Watt\n",
"Q= 1.88495559215\n",
"The current in Ampere is\n",
"I= 17.7245385091\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 5, Example 8\"\n",
"#Eletric current passes through a L=0.5m long horizontal wire of D=0.1mm diameter.\n",
"L=0.5;\n",
"D=0.1*10**-3;\n",
"#The wire is to be maintained at temprature,Twire=400K and the air is at temprature,Tair=300K.\n",
"Twire=400;\n",
"Tair=300;\n",
"#The resistance of the wire(R) is 0.012ohm per meter.Nusselt number(NuL) over the length of wire to be 0.4.\n",
"NuL=0.4;\n",
"R=0.012;\n",
"#At mean temprature of Tf=350K, The thermal conductivity of air is k=0.03W/(m*K)\n",
"k=0.03;\n",
"#Nusselt number is NuL=hbar*D/k\n",
"#hbar is the heat flux\n",
"print\"The heat flux in W/(m**2*K) is\"\n",
"hbar=NuL*k/D\n",
"print\"hbar\",hbar\n",
"#Q is the heat loss from the wire\n",
"print\"The heat loss from the wire is Q=hbar*pi*D*L*(Twire-Tair) in Watt\"\n",
"Q=hbar*math.pi*D*L*(Twire-Tair)\n",
"print\"Q=\",Q\n",
"#At steady state the ohmic loss in the wire equals the heat loss from its surface Therfore I**2*R=Q\n",
"#I is the current flow.\n",
"print\"The current in Ampere is\"\n",
"I=(Q/(R*L))**0.5\n",
"print\"I=\",I"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKfqJ$a#a#,Introduction to Heat Transfer/Chapter6.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"# Chapter 06:Incompressible viscous flow: A brief review"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex6.1:pg-226"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 6, Example 1\n",
"Umax in m/s is\n",
"Umax= 1.6\n",
"The shear stress T in N/m**2\n",
"T= 64.0\n",
"(dp/dx) in N/m**3 is\n",
"X= -19200.0\n",
"The Shear stress at a distance of 0.002m from the lower plate in N/m**2\n",
"t= -57.6\n",
"The shear stress at a distance of 0.002m from the upper plate in N/m**2\n",
"t= 57.6\n",
"The opposite signs in t represents the opposite directions.The plus sign is in the direction of flow and the minus sign is in the direction opposite to the flow \n",
"The pressure drop over a distance of 2m in N/m**2 is\n",
"deltaP= 38400.0\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 6, Example 1\"\n",
" #Oil of specific gravity 0.90 and dynamic viscosity (mu=0.1Pa*s) flows between two fixed plates kept 2*b=10mm apart,So b=5mm.\n",
"#The average velocity is Uav=1.60m/s\n",
"Uav=1.60;\n",
"mu=0.1;\n",
"b=0.005; #in metre\n",
" #Umax is maximum velocity\n",
" Umax=(3/2)*Uav\n",
"print\"Umax in m/s is\"\n",
"Umax=(3/2)*Uav\n",
"print\"Umax=\",Umax\n",
" #The shear stress at the plate is given by T=2*Âµ*(Umax/b)\n",
"print\"The shear stress T in N/m**2\"\n",
"T=2*mu*(Umax/b) \n",
" #The shear sress at a distance from plate is given by t=y*(dp/dx)\n",
"#(dp/dx)=X=-3*mu*(Uav/b**2)\n",
"print\"T=\",T\n",
"print\"(dp/dx) in N/m**3 is\"\n",
"X=-3*mu*(Uav/b**2)\n",
" #Taking modulus of X by multipying it with negative sign.\n",
"print\"X=\",X\n",
"print\"The Shear stress at a distance of 0.002m from the lower plate in N/m**2\"\n",
"y=b-0.002;\n",
"t=y*(X) #NOTE:Answer given in the book is incorrect (Calculation mistake)\n",
"print\"t=\",t\n",
"print\"The shear stress at a distance of 0.002m from the upper plate in N/m**2\"\n",
"t=-y*(X) #NOTE:Answer given in the book is incorrect (Calculation mistake)\n",
"print\"t=\",t\n",
"print\"The opposite signs in t represents the opposite directions.The plus sign is in the direction of flow and the minus sign is in the direction opposite to the flow \"\n",
" #deltaP is the pressure drop\n",
"print\"The pressure drop over a distance of 2m in N/m**2 is\"\n",
" #Since pressure drop is considered at a distance of 2m so L=2m\n",
"L=2;\n",
"deltaP=(-X)*L\n",
"print\"deltaP=\",deltaP"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex6.3:pg-229"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 6, Example 3\n",
"The rate of change of pressure with respect to length in N/m**3\n",
"X= 2000\n",
"Flow rate(Q) in m**3/s is)\n",
"Q= 0.00333333333333\n",
"The viscosity of oil(mu)in kg/(m*s)\n",
"mu= 0.0920388472731\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 6, Example 3\"\n",
" #Oil of specific gravity (sg)=0.90 is discharged at a rate(mdot)=3kg/s under a pressure difference dp=10KN/m**2 over a length dz=5m of a pipe having a diameter(D) of 50mm.\n",
"dp=10*10**3; #in N/m**2\n",
"dz=5;\n",
"D=0.05; #in metre\n",
"mdot=3;\n",
"sg=0.90;\n",
" #X=dp/dz is the rate of change of pressure\n",
"print\"The rate of change of pressure with respect to length in N/m**3\"\n",
"X=dp/dz\n",
"print\"X=\",X\n",
" #Flow rate is Q\n",
"print\"Flow rate(Q) in m**3/s is)\"\n",
"Q=mdot/(sg*10**3)\n",
"print\"Q=\",Q\n",
" #The viscosity of oil is mu=(pi*D**4*X)/(128*Q*dz)\n",
"print\"The viscosity of oil(mu)in kg/(m*s)\"\n",
"mu=(math.pi*D**4*X)/(128*Q)\n",
"print\"mu=\",mu"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex6.7:pg-250 "
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" Introduction to heat transfer by S.K.Som, Chapter 6, Example 7\n",
"The maximum length of plate in m is \n",
"L= 2.5\n",
"The average skin friction coefficient is\n",
"cfL= 1.328\n",
"Drag force on one side of plate in N is\n",
"Fd= 21.5136\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 6, Example 7\"\n",
" #A flat plate B=1.2m wide and of length L is kept parallel to a uniform stream of air of velocity Uinf=3m/s in a wind tunnel.\n",
"Uinf=3;\n",
"B=1.2;\n",
" #If it is desired to have a laminar boundary layer only on the plate \n",
"#Assume that the laminar flow exists up to a reynold number(ReL)=5*10**5.Take density of air as rhoair=1.2kg/m**3 and viscosity of air as nuair=1.5*10**-5 m**2/s.\n",
"nuair=1.5*10**-5;\n",
"rhoair=1.2;\n",
"ReL=5*10**5;\n",
" #For maximum length of the plate reynolds number is ReL=Uinf*L/nuair\n",
"#so L=ReL*nuair/Uinf\n",
"print\"The maximum length of plate in m is \"\n",
"L=ReL*nuair/Uinf\n",
"print\"L=\",L\n",
" #The average skin friction coefficient is cfL=1.328/(ReL)**(1/2)\n",
"print\"The average skin friction coefficient is\"\n",
"cfL=1.328/(ReL)**(1/2)\n",
"print\"cfL=\",cfL\n",
" #Fd is drag force\n",
"print\"Drag force on one side of plate in N is\"\n",
"Fd=cfL*(rhoair*Uinf**2/2)*B*L\n",
"print\"Fd=\",Fd"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex6.10:pg-268 "
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 6, Example 10\n",
"Wind velocity(Uinf)in m/s is\n",
"Uinf= 10\n",
"Reynolds number is\n",
"ReL= 4000000.0\n",
"Friction coefficient is\n",
"CbarfL= 0.0735645\n",
"Drag force on one side of the plate per unit metre width in Newton is \n",
"FD= 26.48322\n",
"The turbulent boundary layer thickness at the trailing edge in metre is \n",
"delta= 2.274\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 6, Example 10\"\n",
" #Wind at a speed of U=36km/hr blows over a flat plate of length,L=6m .If the density and kinematic viscosity of air are rho=1.2kg/m**3 and mu=1.5*10**-5m**2/s respectively.\n",
"U=36;\n",
"L=6;\n",
"rho=1.2;\n",
"mu=1.5*10**-5;\n",
" #Wind velocity in m/s is Uinf\n",
"print\"Wind velocity(Uinf)in m/s is\"\n",
"Uinf=U*1000/3600\n",
"print\"Uinf=\",Uinf\n",
" #Reynolds number is given by ReL=L*Uinf/mu\n",
"print\"Reynolds number is\"\n",
"ReL=L*Uinf/mu\n",
"print\"ReL=\",ReL\n",
" #We consider that transition of boundary layer takes place from laminar to turbulent takes place at ReL=5*10**5.\n",
"#Therfore the corresponding friction coefficient is given by CbarfL=(0.074-ReL**(1/5))-(1742/ReL)\n",
"print\"Friction coefficient is\"\n",
"CbarfL=(0.074/ReL**(1/5))-(1742/ReL)\n",
"print\"CbarfL=\",CbarfL\n",
" #Drag force on one side of the plate per unit metre width is given by FD=CbarfL*rho*Uinf**2*L/2\n",
"print\"Drag force on one side of the plate per unit metre width in Newton is \"\n",
"FD=CbarfL*rho*Uinf**2*L/2\n",
"print\"FD=\",FD\n",
" #The turbulent boundary layer thickness at the trailing edge is given by delta=L*(0.379/ReL**(1/5))\n",
"print\"The turbulent boundary layer thickness at the trailing edge in metre is \"\n",
"delta=L*(0.379/ReL**(1/5))\n",
"print\"delta=\",delta"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKfqJtt,Introduction to Heat Transfer/Chapter7.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"# Chapter 07:Principles of forced convection"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex7.1:pg-296"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 7, Example 1\n",
"First we check from reynolds no. that the flow is laminar or tubulent\n",
"Reynold number is\n",
"Re= 20000.0\n",
"which is less than critical reynolds number,So the flow is laminar.\n",
"The average nusselt number over the entire length under the situation is given by NuL=0.664*Re**0.5*Pr**(1/3)\n",
"NuL= 93.9037805416\n",
"Heat flux in W/(m**2*K) is\n",
"h= 2.72320963571\n",
"The rate of heat transfer per unit width in W is\n",
"Q= 408.481445356\n"
]
}
],
"source": [
"import math \n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 7, Example 1\"\n",
"#Engine oil at temprature,Tinf=60Â°C with a velocity of Uinf=1m/s flows over plate of length(L)=5m whose temprature(Tw)=30Â°C\n",
"Tw=30;\n",
"L=5;\n",
"Uinf=1;\n",
"Tinf=60;\n",
"#The properties at a film temprature of 45Â°C are as follows density(rho=870kg/m**3),Prandtl number(Pr=2850),conductivity(k=0.145W/(m*Â°C)),kinematic viscosity(nu=250*10**-6m**2/s).\n",
"rho=870;\n",
"Pr=2850;\n",
"k=0.145;\n",
"nu=250*10**-6;\n",
"print\"First we check from reynolds no. that the flow is laminar or tubulent\"\n",
"#Reynolds number is given by Re=(Uinf*L)/nu\n",
"print\"Reynold number is\"\n",
"Re=(Uinf*L)/nu\n",
"print\"Re=\",Re\n",
"print\"which is less than critical reynolds number,So the flow is laminar.\"\n",
"#NuL is the average nusselt number\n",
"print\"The average nusselt number over the entire length under the situation is given by NuL=0.664*Re**0.5*Pr**(1/3)\"\n",
"NuL=0.664*Re**0.5*Pr**(1/3)\n",
"print\"NuL=\",NuL\n",
"#Heat flux is given by h=(k/L)*NuL\n",
"print\"Heat flux in W/(m**2*K) is\"\n",
"h=(k/L)*NuL\n",
"print\"h=\",h\n",
"#The rate of heat transfer per unit width is Q=h*A*(Tinf-Tw)\n",
"#Since unit width is considerd so B=1\n",
"#Area(A)=L*B\n",
"B=1;\n",
"A=L*B;\n",
"print\"The rate of heat transfer per unit width in W is\"\n",
"Q=h*A*(Tinf-Tw)\n",
"print\"Q=\",Q"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex7.2:pg-298"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 7, Example 2\n",
"The location x in m where the transition occurs\n",
"x= 0.275\n",
"The average Nusselt number for the laminar zone is\n",
"Nux= 469.518902708\n",
"Heat flux in W/(m**2*K) is\n",
"h= 44.3908780742\n",
"The reynolds number at L=2m is\n",
"ReL= 3636363.63636\n",
"The average heat transfer coefficient over L=2m in W/(m**2*K)\n",
"hbarL= -11.322519\n",
"The rate of heat transfer per unit width in W is\n",
"Q= -2264.5038\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 7, Example 2\"\n",
"#Atmospheric air at temprature,Tinf=300K and with a free stream Velocity Uinf=30m/s flows over a flat plate parallel to a side of length(L)=2m.\n",
"Tinf=300;\n",
"Uinf=30;\n",
"L=2;\n",
"#It is maintained at a uniform temprature of Tw=400K.\n",
"Tw=400;\n",
"#The properties of air at the film temprature of 350K are Prandtl number(Pr=0.705),conductivity(k=0.026W/(m*Â°C)),kinematic viscosity(nu=16.5*10**-6m**2/s)\n",
"Pr=0.705; \n",
"k=0.026;\n",
"nu=16.5*10**-6;\n",
"#We first find the location x(for reynolds number,Re=5*10**5) where the transition occurs\n",
"#Rex is reynolds number\n",
"print\"The location x in m where the transition occurs\"\n",
"Rex=5*10**5;\n",
"x=(nu*Rex)/Uinf\n",
"print\"x=\",x\n",
"#The average Nusselt number for the laminar zone is given by Nux=0.664*Re**0.5*Pr**(1/3)\n",
"print\"The average Nusselt number for the laminar zone is\"\n",
"Nux=0.664*Rex**0.5*Pr**(1/3)\n",
"print\"Nux=\",Nux\n",
"#Heat flux is given by h=(k/x)*Nux\n",
"print\"Heat flux in W/(m**2*K) is\"\n",
"h=(k/x)*Nux\n",
"print\"h=\",h\n",
"#Reynolds number is given by ReL=(Uinf*L)/nu\n",
"print\"The reynolds number at L=2m is\"\n",
"ReL=(Uinf*L)/nu\n",
"print\"ReL=\",ReL\n",
"#The average heat transfer coefficient over L=2m is determined from hbarL=(k/L)*(0.037*(ReL)**(4/5)-871)*Pr**(1/3)\n",
"print\"The average heat transfer coefficient over L=2m in W/(m**2*K)\"\n",
"hbarL=(k/L)*(0.037*(ReL)**(4/5)-871)*Pr**(1/3)\n",
"print\"hbarL=\",hbarL\n",
"#The rate of heat transfer per unit width is Q=h*A*(Tinf-Tw)\n",
"#Since unit width is considerd so B=1\n",
"#Area(A)=L*B\n",
"B=1;\n",
"A=L*B;\n",
"print\"The rate of heat transfer per unit width in W is\"\n",
"Q=hbarL*A*(Tw-Tinf)\n",
"print\"Q=\",Q"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex7.3:pg-314"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 7, Example 3\n",
"(a)When the air flows parallel to the long side we have L=5 and the Reynolds no. becomes\n",
"ReL= 1250000.0\n",
"which is greater than critical Reynolds number.\n",
"The average heat transfer coefficient over L=5m in W/(m**2*K)\n",
"hbarL= -5.225778\n",
"The rate of heat transfer per unit width in W is\n",
"Q= -3135.4668\n",
"(b)When the air flow is parallel to the 1m side we have L=1 an the Reynolds no. becomes \n",
"which is less than critical Reynolds number.\n",
"ReL= 250000.0\n",
"Heat flux in W/(m**2*K) is\n",
"h= 9.96\n",
"The rate of heat transfer per unit width in W is\n",
"Q= 5976.0\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 7, Example 3\"\n",
"#Air at a pressure of 101kPa and temprature,Tinf=20Â°C flows with a velocity(Uinf) of 5m/s over a flat plate whose temprature is kept constant at Tw=140Â°C.\n",
"Tw=140;\n",
"Tinf=20;\n",
"Uinf=5;\n",
"#The properties at the film temprature of 80Â°C are Prandtl number(Pr=0.706),Conductivity(k=0.03W/(m*Â°C)),kinematic viscosity(nu=2*10**-5m**2/s)\n",
"Pr=0.706;\n",
"k=0.03;\n",
"nu=2*10**-5;\n",
"#ReL is reynolds number and L is length of flat plate\n",
"print\"(a)When the air flows parallel to the long side we have L=5 and the Reynolds no. becomes\"\n",
"L=5;\n",
"ReL=(Uinf*L)/nu\n",
"print\"ReL=\",ReL\n",
"print\"which is greater than critical Reynolds number.\"\n",
"#Thus we have combined laminar and tubulent flow.\n",
"# So The average heat transfer coefficient over L=5m is determined from hbarL=(k/L)*(0.037*(ReL)**(4/5)-871)*Pr**(1/3)\n",
"print\"The average heat transfer coefficient over L=5m in W/(m**2*K)\"\n",
"hbarL=(k/L)*(0.037*(ReL)**(4/5)-871)*Pr**(1/3)\n",
"print\"hbarL=\",hbarL\n",
"#The rate of heat transfer per unit width is Q=h*A*(Tinf-Tw)\n",
"#Since width is 1m so B=1\n",
"#Area(A)=L*B\n",
"B=1;\n",
"A=L*B;\n",
"#Q is the rate of heat transfer\n",
"print\"The rate of heat transfer per unit width in W is\"\n",
"Q=hbarL*A*(Tw-Tinf)\n",
"print\"Q=\",Q\n",
"#When the air flow is parallel to the 1m side we have L=1\n",
"print\"(b)When the air flow is parallel to the 1m side we have L=1 an the Reynolds no. becomes \"\n",
"L=1;\n",
"ReL=(Uinf*L)/nu\n",
"print\"which is less than critical Reynolds number.\"\n",
"print\"ReL=\",ReL\n",
"#Thus we have laminar flow\n",
"#Heat flux is given by h=(k/L)*0.664*ReL**0.5*Pr**(1/3)\n",
"print\"Heat flux in W/(m**2*K) is\"\n",
"h=(k/L)*0.664*ReL**0.5*Pr**(1/3)\n",
"print\"h=\",h\n",
"#The rate of heat transfer per unit width is Q=h*A*(Tinf-Tw)\n",
"#Now width is 5m so B=5\n",
"#Area(A)=L*B\n",
"B=5;\n",
"A=L*B;\n",
"#Q is the rate of heat transfer\n",
"print\"The rate of heat transfer per unit width in W is\"\n",
"Q=h*A*(Tw-Tinf)\n",
"print\"Q=\",Q"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex7.4:pg-322"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 7, Example 4\n",
"(a)Reynolds number is\n",
"ReL= 6000.0\n",
"The boundary layer thickness in m is\n",
"delta= 0.387298334621\n",
"Prandtl no. is\n",
"Pr= 831.024930748\n",
"The thermal boundary layer thickness in m is\n",
"deltaT= 0.387298334621\n",
"(b)Since the prandtl number is high So Nusselt no. is\n",
"NuL= 26.2588270873\n",
"Heat flux in W/(m**2*K) is\n",
"hL= 0.919058948055\n",
"hbarL in W/(m**2*K) is\n",
"hbarL= 1.83811789611\n",
"(c)The rate of heat transfer in W is\n",
"Q= 661.7224426\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 7, Example 4\"\n",
"#Castor oil at temprature,Tinf=36Â°C flows over a heated plate of length,L=6m and breadth,B=1m at velocity,Uinf=0.06m/s\n",
"Tinf=36;\n",
"L=6;\n",
"B=1;\n",
"Uinf=0.06;\n",
"#For a surface temprature at Tw=96Â°C\n",
"Tw=96;\n",
"#The properties at film temprature 66Â°C conductivity(k=0.21W/(m*K)),kinematic viscosity(nu=6*10**-5m**2/s),Thermal diffusivity(alpha=7.22*10**-8 m**2/s)\n",
"nu=6*10**-5;\n",
"k=0.21;\n",
"alpha=7.22*10**-8;\n",
"#ReL is reynolds number\n",
"print\"(a)Reynolds number is\"\n",
"ReL=(Uinf*L)/nu\n",
"print\"ReL=\",ReL\n",
"#Therefore the boundary layer is laminar over the entire plate.\n",
"#delta is the boundary layer thickness\n",
"print\"The boundary layer thickness in m is\"\n",
"delta=(5*L)/(ReL)**0.5\n",
"print\"delta=\",delta\n",
"#Pr is prandtl number.\n",
"print\"Prandtl no. is\"\n",
"Pr=nu/alpha\n",
"print\"Pr=\",Pr\n",
"#deltaT is thermal boundary layer thickness\n",
"print\"The thermal boundary layer thickness in m is\"\n",
"deltaT=delta/(Pr**(1/3))#NOTE:Answer in the book is incorrect(calculation mistake)\n",
"print\"deltaT=\",deltaT\n",
"#NuL is the nusselt number\n",
"print\"(b)Since the prandtl number is high So Nusselt no. is\"\n",
"NuL=0.339*(ReL)**0.5*Pr**(1/3)\n",
"print\"NuL=\",NuL\n",
"#Heat flux is given by hL=(k/L)*NuL\n",
"print\"Heat flux in W/(m**2*K) is\"\n",
"hL=(k/L)*NuL\n",
"print\"hL=\",hL\n",
"#hbarL is the average heat flux over length L\n",
"print\"hbarL in W/(m**2*K) is\"\n",
"hbarL=2*hL\n",
"print\"hbarL=\",hbarL\n",
"#The rate of heat transfer is Q=h*A*(Tinf-Tw)\n",
"#Area(A)=L*B\n",
"A=L*B;\n",
"print\"(c)The rate of heat transfer in W is\"\n",
"Q=hbarL*A*(Tw-Tinf)\n",
"print\"Q=\",Q"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex7.5:pg-322"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 7, Example 5\n",
"Reynolds number is\n",
"ReL= 11181.8181818\n",
"Therefore the flow is turbulent over the module \n",
"The local heat transfer coefficient at L in W/(m**2*K)is\n",
"hL= 8.32911955901e+30\n",
"The required power generation in W/m**3 is\n",
"qm= 1.6658239118e+31\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 7, Example 5\"\n",
"#A flat plate of width B=1m is maintained at a uniform surface temprtaure(Tw)=225Â°C\n",
"Tw=225;\n",
"B=1;\n",
"#Heating is done by rectangular modules of thickness t=10mm and length l=40mm.\n",
"t=10;\n",
"l=40;\n",
"#atmospheric air at temprature,Tinf=25Â°C flows over the plate at velocity(Uinf)=30m/s.\n",
"Tinf=25;\n",
"Uinf=30;\n",
"#The thermophysical properties of module are conductivity(km=5.2W/(m*K)),specific heat(cp=320J/(kg/K)),density(rho=2300kg/m**3).\n",
"km=5.2;\n",
"cp=320;\n",
"rho=2300;\n",
"#Assume the air properties at the film temprature of 125Â°C conductivity(ka=0.031W/(m*K)),kinematic viscosity(nu=22*10**-6m**2/s),Prandtl number(Pr=0.7)\n",
"ka=0.031;\n",
"nu=22*10**-6;\n",
"Pr=0.7;\n",
"#Module is placed at a distance of 800mm from the leading edge\n",
"#The distance from leading edge to the centre-line of the module,L=800+20=820mm.\n",
"L=0.0082;#in metre\n",
"#ReL is the reynolds number \n",
"print\"Reynolds number is\"\n",
"ReL=(Uinf*L)/nu\n",
"print\"ReL=\",ReL\n",
"print\"Therefore the flow is turbulent over the module \"\n",
"#The local heat transfer coefficient at L is calculated using hL=(k/L)*0.0296*(ReL)**(4/5)*(Pr)**(1/3)\n",
"print\"The local heat transfer coefficient at L in W/(m**2*K)is\"\n",
"hL=(ka/L)*0.0296*(ReL)**(4/0.5)*(Pr)**(1/0.3)\n",
"print\"hL=\",hL\n",
"#We consider that the local heat transfer coefficient at L=0.82m remains the same over the module which extends from L=0.80m to 0.84m \n",
"#If qm be the power generation in W/m**2 within the module ,we can write from energy balance qm*(t/0.1000)*(l/0.1000)*(B)=hbarL*(t/0.1000)*(B)*(Tw-Tinf)\n",
"print\"The required power generation in W/m**3 is\"\n",
"qm=(hL*(l/0.1000)*(B)*(Tw-Tinf))/((t/0.1000)*(l/0.1000)*(B))\n",
"print\"qm=\",qm"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex7.6:pg-327"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 7, Example 6\n",
"Reynolds number is\n",
"ReL= 15000000.0\n",
"Since ReL>Rec(=5*10**5) the flow is approximated as turbulent over the entire surface of the wing \n",
"Nux= 0.0308\n",
"Nusselt number is \n",
"NubarL= 0.0308\n",
"Average heat transfer coefficient in W/(m**2*K) is\n",
"hbarL= 0.0003696\n",
"Surface temprature of wing in kelvin is\n",
"Tw= 1217800.46753\n"
]
}
],
"source": [
"import math\n",
"\n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 7, Example 6\"\n",
"#An aircraft is moving at a velocity of Uinf=150m/s in air at an altitude where the pressure is 0.7bar and the temprature is Tinf=-5Â°C.\n",
"Tinf=-5;\n",
"Uinf=150;\n",
"#The top surface of the wing absorbs solar radiation at a rate of Qr=900W/m**2.\n",
"Qr=900;\n",
"#Considering the wing as a flat plate of length(L)=2m and to be of solid construction with a single uniform surface temprature .\n",
"L=2;\n",
"#The properties of air at 268K and 0.7 bar are conductivity(k=0.024W/(m*K)),kinematic viscosity(nu=2*10**-5m**2/s),Prandtl number(Pr=0.72)\n",
"k=0.024;\n",
"nu=2*10**-5;\n",
"Pr=0.72;\n",
"#ReL is reynolds number\n",
"print\"Reynolds number is\"\n",
"ReL=Uinf*L/nu\n",
"print\"ReL=\",ReL\n",
"#Rec is critical reynolds number\n",
"print\"Since ReL>Rec(=5*10**5) the flow is approximated as turbulent over the entire surface of the wing \"\n",
"#Nusselt number is given by Nux=0.0308*ReL**(4/5)*Pr**(1/3)\n",
"Nux=0.0308*ReL**(4/5)*Pr**(1/3);\n",
"print\"Nux=\",Nux\n",
"#NubarL is average nusselt number over length L\n",
"print\"Nusselt number is \"\n",
"NubarL=(5/4)*Nux\n",
"print\"NubarL=\",NubarL\n",
"#Average heat transfer coefficient is given by hbarL=(k/L)*NubarL\n",
"print\"Average heat transfer coefficient in W/(m**2*K) is\"\n",
"hbarL=(k/L)*NubarL\n",
"print\"hbarL=\",hbarL\n",
"#From an energy balance the airfoil at steady state,Qr*As=2*hbarL*As*(Tw-Tinf) where Qr=radiation flux,As=upper or lower surface area.\n",
"#Therefore we can write Surface temprature of wing, Tw=Tinf+(Qr/(2*hbarL))\n",
"print\"Surface temprature of wing in kelvin is\"\n",
"Tw=(273+Tinf)+(Qr/(2*hbarL))\n",
"print\"Tw=\",Tw"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex7.7:pg-331"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 7, Example 7\n",
"Reynolds number is\n",
"Re= 141.176470588\n",
"Nusselt number is\n",
"NuD= 6.85819682626\n",
"The average Heat transfer coefficient in W/(m**2*K) is\n",
"hbar= 4629.28285773\n",
"Heat transfer per unit length in W/m is\n",
"qL= 14.5433210172\n",
"If we use eq NuD=0.3+((0.62*Re**0.5*Pr**(1/3))/(1+(0.4/Pr**(2/3))**(1/4))*(1+(Re/282000)**(5/8))**(4/5)\n",
"NuD= 7.66669771975\n",
"The average Heat transfer coefficient in W/(m**2*K) is\n",
"hbar= 5175.02096083\n",
"Heat transfer per unit length in W/m is\n",
"qL= 16.2578078327\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 7, Example 7\"\n",
"#A fine wire having a diameter(D)=0.04mm is placed in an air stream at temprature,Tinf=25Â°C having a flow velocity of Uinf=60m/s perpendicular to wire.\n",
"D=0.04;\n",
"Tinf=25;\n",
"Uinf=60;\n",
"#An electric current is passed through the wire ,raising its surface temprature to Tw=50Â°C\n",
"Tw=50;\n",
"#For air at the film temprature of 37.5Â°C,conductivity(k=0.027 W/(m*K)),kinematic viscosity(nu=17*10**-6m**2/s) and Prandtl number(Pr=0.71)\n",
"k=0.027;\n",
"nu=17*10**-6;\n",
"Pr=0.71;\n",
"#Re is reynolds number\n",
"print\"Reynolds number is\"\n",
"Re=Uinf*(D*10**-3)/nu\n",
"print\"Re=\",Re\n",
"#C and n are constants\n",
"#The values of C and n are found for Re=141 are C=0.683 and n=0.466\n",
"#NuD is nusselt number\n",
"print\"Nusselt number is\"\n",
"NuD=(0.683)*Re**0.466*Pr**(1/3)\n",
"print\"NuD=\",NuD\n",
"#hbar is the average Heat transfer coefficient\n",
"print\"The average Heat transfer coefficient in W/(m**2*K) is\"\n",
"hbar=(k/(D*10**-3))*NuD\n",
"print\"hbar=\",hbar\n",
"#Heat transfer per unit length(qL) is given by pi*D*hbar*(Tw-Tinf)\n",
"print\"Heat transfer per unit length in W/m is\"\n",
"qL=math.pi*(D*10**-3)*hbar*(Tw-Tinf)\n",
"print\"qL=\",qL\n",
"#NuD is nusselt number\n",
"print\"If we use eq NuD=0.3+((0.62*Re**0.5*Pr**(1/3))/(1+(0.4/Pr**(2/3))**(1/4))*(1+(Re/282000)**(5/8))**(4/5)\"\n",
"NuD=0.3+((0.62*Re**0.5*Pr**(1/3))/(1+(0.4/Pr)**(2/3))**(1/4))*(1+(Re/282000)**(5/8))**(4/5)\n",
"print\"NuD=\",NuD\n",
"#hbar is the average Heat transfer coefficient\n",
"print\"The average Heat transfer coefficient in W/(m**2*K) is\"\n",
"hbar=(k/(D*10**-3))*NuD\n",
"print\"hbar=\",hbar\n",
"#Heat transfer per unit length(qL) is given by pi*D*hbar*(Tw-Tinf)\n",
"print\"Heat transfer per unit length in W/m is\"\n",
"qL=math.pi*(D*10**-3)*hbar*(Tw-Tinf)\n",
"print\"qL=\",qL"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex7.8:pg-334"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 7, Example 8\n",
"Reynolds number for mercury is\n",
"ReHg= 1000.0\n",
"Reynolds number for oil is\n",
"Reoil= 15.3846153846\n",
"The hydrodynamic entry length for mercury in m is\n",
"LeHg= 1.25\n",
"The hydrodynamic entry length for oil in m is\n",
"Leoil= 0.0192307692308\n",
"The thermal entry length for mercury in m is \n",
"LtHg= 0.02375\n",
"The thermal entry length for oil in m is\n",
"Ltoil= 1.63461538462\n"
]
}
],
"source": [
"import math\n",
"\n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 7, Example 8\"\n",
"#Mercury and a light oil flowing at Uinf=4mm/s in a smooth tube having diameter(D)=25mm at a bulk temprature of 80Â°C.\n",
"Uinf=4*10**-3;#in metre\n",
"D=25*10**-3;#in metre\n",
"#The pertinent properties of the fluid at that temprature are kinematic viscosity of mercury(nuHg=1*10**-7m**2/s),kinematic viscosity of oil(nuoil=6.5*10**-6m**2/s)\n",
"#Prandtl number of mercury(PrHg=0.019),Prandtl number of oil(Proil=85).\n",
"nuHg=1*10**-7;\n",
"nuoil=6.5*10**-6;\n",
"PrHg=0.019;\n",
"Proil=85;\n",
"#ReHg is Reynolds number for mercury\n",
"print\"Reynolds number for mercury is\"\n",
"ReHg=Uinf*D/nuHg\n",
"print\"ReHg=\",ReHg\n",
"#Reoil is Reynolds number for oil\n",
"print\"Reynolds number for oil is\"\n",
"Reoil=Uinf*D/nuoil\n",
"print\"Reoil=\",Reoil\n",
"#The hydrodynamic length are given by L=0.05*Re*D\n",
"#LeHg is the hydrodynamic entry length for mercury\n",
"print\"The hydrodynamic entry length for mercury in m is\"\n",
"LeHg=0.05*ReHg*D\n",
"print\"LeHg=\",LeHg\n",
"#Leoil the hydrodynamic entry length for oil\n",
"print\"The hydrodynamic entry length for oil in m is\"\n",
"Leoil=0.05*Reoil*D\n",
"print\"Leoil=\",Leoil\n",
"#The thermal entry length are given by L=0.05*Re*Pr*D\n",
"#LtHg is the thermal entry length for mercury\n",
"print\"The thermal entry length for mercury in m is \"\n",
"LtHg=0.05*ReHg*PrHg*D\n",
"print\"LtHg=\",LtHg\n",
"#Ltoil is the thermal entry length for oil\n",
"print\"The thermal entry length for oil in m is\"\n",
"Ltoil=0.05*Reoil*Proil*D\n",
"print\"Ltoil=\",Ltoil"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex7.9:pg-336"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 7, Example 9\n",
"Reynold number is\n",
"Re= 348.623853211\n",
"Therefore the flow is laminar.The hydrodynamic entrance length in m is\n",
"Leh= 0.0697247706422\n",
"The thermal entrance length in m is\n",
"Let= 0.0488073394495\n",
"The heat transfer coefficient in W/(m**2*K) is \n",
"h= 32.7\n",
"The mass flow rate of air in kg/s is\n",
"mdot= 2.38761041673e-05\n",
"Therefore the constant surface heat flux qw in W/m**2 is\n",
"qw= 95.95\n",
"The tube surface temprature at the exit plane in Â°C is \n",
"Twe= 127.934250765\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 7, Example 9\"\n",
"#Air at one atmospheric pressure and temprature(Tbi=75Â°C) enters a tube of internal diameter(D)=4.0mm with average velocity(U)=2m/s\n",
"Tbi=75;\n",
"D=4*10**-3;#in metre\n",
"U=2;\n",
"#The tube length is L=1.0m and a constant heat flux is imposed by the tube surface on the air over the entire length.\n",
"L=1;\n",
"#An exit bulk mean temprature(Tbo)=125Â°C is required.\n",
"Tbo=125;\n",
"#The properties of air 100Â°C are density(rho=0.95kg/m**3),Prandtl number(Pr=0.70),conductivity(k=0.03W/(m*K)),viscosity(mu=2.18*10**-5kg/(m*s)),specific heat(cp=1.01kJ/(kg/K))\n",
"rho=0.95;\n",
"Pr=0.70;\n",
"k=0.03;\n",
"mu=2.18*10**-5;\n",
"cp=1.01*10**3;\n",
"#Re is reynolds number\n",
"print\"Reynold number is\"\n",
"Re=rho*U*D/mu\n",
"print\"Re=\",Re\n",
"#Leh is the hydrodynamic entrance length\n",
"print\"Therefore the flow is laminar.The hydrodynamic entrance length in m is\"\n",
"Leh=0.05*Re*D\n",
"print\"Leh=\",Leh\n",
"#Let is the thermal entrance length\n",
"print\"The thermal entrance length in m is\"\n",
"Let=0.05*Re*Pr*D\n",
"print\"Let=\",Let\n",
"#The length of tube is given as 1m.A reasonable approach is to consider the flow to be fully developed for both velocity and tempratures over the entire profile lengths.\n",
"#For a fully developed flow with constant surface heat flux,Nusselt number is Nu=4.36\n",
"Nu=4.36;\n",
"#h is the heat transfer coefficient\n",
"print\"The heat transfer coefficient in W/(m**2*K) is \"\n",
"h=Nu*(k/D)\n",
"print\"h=\",h\n",
"#Here h=hL Since the heat transfer coefficient is constant over the entire length of tube.\n",
"#hL is the local heat transfer coefficient\n",
"hL=h;\n",
"#from an energy balance qw*pi*D*L=mdot*cp*(Tbo-Tbi)\n",
"#mdot is mass flow rate\n",
"print\"The mass flow rate of air in kg/s is\"\n",
"mdot=rho*(math.pi/4)*D**2*U\n",
"print\"mdot=\",mdot\n",
"#qw is the constant surface heat flux\n",
"print\"Therefore the constant surface heat flux qw in W/m**2 is\"\n",
"qw=(mdot*cp*(Tbo-Tbi))/(math.pi*D*L)\n",
"print\"qw=\",qw\n",
"#Let Twe be the surface temprature at the exit plane.Then we can write hL*(Twe-Tbo)=qw\n",
"print\"The tube surface temprature at the exit plane in Â°C is \"\n",
"Twe=Tbo+(qw/hL)\n",
"print\"Twe=\",Twe"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex7.10:pg-338"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 7, Example 10\n",
"Reynold number is\n",
"Re= 348.623853211\n",
"Therefore the flow is laminar.The hydrodynamic entrance length in m is\n",
"Leh= 0.0697247706422\n",
"The thermal entrance length in m is\n",
"Let= 0.0488073394495\n",
"The thermal entrance length is greater than the tube length Therefore the flow is hydrodynamically developed but not thermally developed\n",
"The inverse of graetz number Gr_1 is\n",
"Gr_1= 0.040977443609\n",
"Therefore the local heat transfer coefficient in W/(m**2*K) is\n",
"hL= 35.25\n",
"The mass flow rate of air in kg/s is\n",
"mdot= 2.38761041673e-05\n",
"Therefore surafce heat flux qw in W/m**2 is\n",
"qw= 2398.75\n",
"The tube surface temprature at the exit plane in Â°C is \n",
"Twe= 193.04964539\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 7, Example 10\"\n",
"#Air at one atmospheric pressure and temprature(Tbi=75Â°C) enters a tube of internal diameter(D)=4.0mm with average velocity(U)=2m/s\n",
"Tbi=75;\n",
"D=4*10**-3;\n",
"U=2;\n",
"#The heated tube length is L=0.04m and a constant heat flux is imposed by the tube surface on the air over the entire length.\n",
"L=0.04;\n",
"#An exit bulk mean temprature(Tbo)=125Â°C is required.\n",
"Tbo=125;\n",
"#The properties of air 100Â°C are density(rho=0.95kg/m**3),Prandtl number(Pr=0.70),conductivity(k=0.03W/(m*K)),viscosity(mu=2.18*10**-5kg/(m*s)),specific heat(cp=1.01kJ/(kg/K))\n",
"rho=0.95;\n",
"Pr=0.70;\n",
"k=0.03;\n",
"mu=2.18*10**-5;\n",
"cp=1.01*10**3;\n",
"#Re is the reynolds number \n",
"print\"Reynold number is\"\n",
"Re=rho*U*D/mu\n",
"print\"Re=\",Re\n",
"#Leh is the hydrodynamic entrance length\n",
"print\"Therefore the flow is laminar.The hydrodynamic entrance length in m is\"\n",
"Leh=0.05*Re*D\n",
"print\"Leh=\",Leh\n",
"#Let is thermal entrance length\n",
"print\"The thermal entrance length in m is\"\n",
"Let=0.05*Re*Pr*D\n",
"print\"Let=\",Let\n",
"print\"The thermal entrance length is greater than the tube length Therefore the flow is hydrodynamically developed but not thermally developed\" \n",
"#We calculate the inverse graetz number at x=L=0.04m\n",
"x=0.04;\n",
"#Gr_1 is inverse of graetz number\n",
"print\"The inverse of graetz number Gr_1 is\"\n",
"Gr_1=(x/D)*(1/(Re*Pr))\n",
"print\"Gr_1=\",Gr_1\n",
"#For constant surface heat flux nusselt number is Nu=4.7 and Graetz number is Gr=4.1*10**-2\n",
"Nu=4.7;\n",
"Gr=4.1*10**-2;\n",
"#hL is the local heat transfer coefficient\n",
"print\"Therefore the local heat transfer coefficient in W/(m**2*K) is\"\n",
"hL=Nu*(k/D)\n",
"print\"hL=\",hL\n",
"#from an energy balance qw*pi*D*L=mdot*cp*(Tbo-Tbi)\n",
"#mdot is the mass flow rate\n",
"print\"The mass flow rate of air in kg/s is\"\n",
"mdot=rho*(math.pi/4)*D**2*U\n",
"print\"mdot=\",mdot\n",
"#qw is the surface heat flux\n",
"print\"Therefore surafce heat flux qw in W/m**2 is\"\n",
"qw=(mdot*cp*(Tbo-Tbi))/(math.pi*D*L)\n",
"print\"qw=\",qw\n",
"#Let Twe be the surface temprature at the exit plane.Then we can write hL*(Twe-Tbo)=qw\n",
"print\"The tube surface temprature at the exit plane in Â°C is \"\n",
"Twe=Tbo+(qw/hL)\n",
"print\"Twe=\",Twe"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex7.11:pg-339"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" Introduction to heat transfer by S.K.Som, Chapter 7, Example 11\n",
"Reynold number is\n",
"Re1= 13541.3214942\n",
"Nusselt number is\n",
"Nubar1= 56.808608087\n",
"The heat transfer transfer coefficient in W/(m**2*Â°C) \n",
"hbar1= 522.6391944\n",
"Outlet fluid temprature in first iteration is Tbo2 in Â°C is\n",
"Tb2 in Â°C is\n",
"Tb2= -30.4912413164\n",
"Reynold number is\n",
"Re2= 13938.8493187\n",
"Nusselt number is\n",
"The heat transfer transfer coefficient in W/(m**2*Â°C) \n",
"hbar2= 784.03829067\n",
"Outlet fluid temprature in second iteration is Tbo3 in Â°C is\n",
"Tbo3= -16.646852652\n",
"Tb3 in Â°C is\n",
"The Exit fluid temprature after second iteration is obtained as Tbo=-16.67Â°C\n",
"Tb3= -28.323426326\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 7, Example 11\"\n",
"#Liquid sulphur di oxide in a saturated state flows inside a L=5m long tube and D=25mm internal diameter with a mass flow rate(mdot) of 0.15 kg/s.\n",
"#The tube is heated at a constant surface temprature(Tw) of -10Â°C and the inlet fluid temprature is Tbi=-40Â°C\n",
"Tw=-10;\n",
"Tbi=-40;\n",
"mdot=0.15;\n",
"D=0.025;#in metre\n",
"L=5;\n",
"#The properties to be used shoud be estimated at a temprature which is arithmetic mean of Tbi and Tbo.\n",
"#Since (outlet fluid temprature Tbo) is not known a priori,the solution has to be based on an iterative method starting with a guess value of Tb1=(Tbi+Tbo)/2\n",
"#Here we denote bulk mean temprature as Tb.The superscript refers to the no. of trials\n",
"#For first trial,guess Tbo1=-20Â°C;so Tb1=-30Â°C\n",
"#We have the property values as follows at a temprature of -30Â°C.\n",
"rhob1=1520.64;#density in kg/m**3\n",
"nub1=0.371*10**-6;#kinematic viscosity in m**2/s\n",
"kb1=0.23;#conductivity in W/(m*Â°C)\n",
"Prb1=3.31;#Prandtl number\n",
"mub1=nub1*rhob1;#viscosity in kg/(m*s)\n",
"cpb1=1361.6;#specific heat in J/(kg*K)\n",
"#muw=nuw*rhow at Tw=10Â°C\n",
"nuw=0.288*10**-6;#kinematic viscosity at Tw in m**2/s\n",
"rhow=1463.61;#density at Tw in kg/m**3\n",
"muw=nuw*rhow;#viscosity at Tw in kg/(m*s)\n",
"#The reynolds number is found as Re1=(4*mdot)/(math.pi*D*mub1)\n",
"print\"Reynold number is\"\n",
"Re1=(4*mdot)/(math.pi*D*mub1)\n",
"print\"Re1=\",Re1\n",
"#Hence the flow is turbulent\n",
"#Now using equation, nusselt number is,Nubar1=0.027*(Re1)**0.8*Prb1**(1/3)*(mub1/muw)**0.14\n",
"print\"Nusselt number is\"\n",
"Nubar1=0.027*(Re1)**0.8*Prb1**(1/3)*(mub1/muw)**0.14\n",
"print\"Nubar1=\",Nubar1\n",
"#The heat transfer transfer coefficient hbar1=(kb1/D)*Nubar1\n",
"print\"The heat transfer transfer coefficient in W/(m**2*Â°C) \"\n",
"hbar1=(kb1/D)*Nubar1\n",
"print\"hbar1=\",hbar1\n",
"#The outlet fluid temprature can be found by making use of eqn Tbo2=Tw-(Tw-Tbi)*math.e((-math.pi*D*L*hbar1)/(mdot*cpb1))\n",
"print\"Outlet fluid temprature in first iteration is Tbo2 in Â°C is\"\n",
"Tbo2=Tw-(Tw-Tbi)*math.e**((-math.pi*D*L*hbar1)/(mdot*cpb1))\n",
"#Tb2 is the bulk mean temprature.\n",
"print\"Tb2 in Â°C is\"\n",
"Tb2=(Tbi+Tbo2)/2\n",
"print\"Tb2=\",Tb2\n",
"#Since the value differs from the assumed value of Tb1=-30Â°C,WE require furtheriteration,Therfore we start second trial with Tb2=-28.36Â°C\n",
"#We have the property value at a temprature of -28.36Â°C as follows\n",
"rhob2=1514;#density in kg/m**3\n",
"nub2=0.362*10**-6;#kinematic viscosity in m**2/s\n",
"kb2=0.229;#conductivity in W/(m*Â°C)\n",
"Prb2=3.23;#Prandtl number\n",
"mub2=nub2*rhob2;#viscosity in kg/(m*s)\n",
"cpb2=1362;#specific heat in J/(kg*K)\n",
"#muw=nuw*rhow at Tw=10Â°C\n",
"nuw=0.288*10**-6;#viscosity at Tw in m**2/s\n",
"rhow=1463.61;#density at Tw in kg/m**3\n",
"muw=nuw*rhow;#kinematic viscosity at Tw in kg/(m*s)\n",
"#The reynolds number is found as Re2=(4*mdot)/(math.pi*D*mub2)\n",
"print\"Reynold number is\"\n",
"Re2=(4*mdot)/(math.pi*D*mub2)\n",
"print\"Re2=\",Re2\n",
"#Now using equation, nusselt number is,Nubar2=0.027*(Re2)**0.8*Prb2**(1/3.0)*(mub2/muw)**0.14\n",
"print\"Nusselt number is\"\n",
"Nubar2=0.027*(Re2)**0.8*Prb2**(1/3.0)*(mub2/muw)**0.14\n",
"#The heat transfer transfer coefficient hbar2=(kb2/D)*Nubar2\n",
"print\"The heat transfer transfer coefficient in W/(m**2*Â°C) \"\n",
"hbar2=(kb2/D)*Nubar2\n",
"print\"hbar2=\",hbar2\n",
"#The outlet fluid temprature can be found by making use of eqn Tbo3=Tw-(Tw-Tbi)*math.e((-math.pi*D*L*hbar2)/(mdot*cpb2))\n",
"print\"Outlet fluid temprature in second iteration is Tbo3 in Â°C is\"\n",
"Tbo3=Tw-(Tw-Tbi)*math.e**((-math.pi*D*L*hbar2)/(mdot*cpb2))\n",
"print\"Tbo3=\",Tbo3\n",
"#Tb3 is the bulk mean temprature.\n",
"print\"Tb3 in Â°C is\"\n",
"Tb3=(Tbi+Tbo3)/2\n",
"#We see that difference between Tbo2 and Tbo3 and that between Tb2 and Tb3 is marginal.Therfore we can stop iteration and present the result as Tbo=-16.67Â°C\n",
"print\"The Exit fluid temprature after second iteration is obtained as Tbo=-16.67Â°C\"\n",
"print\"Tb3=\",Tb3"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKfqJtx}h}h,Introduction to Heat Transfer/Chapter8.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"# Chapter 08:Principles of free convection"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex8.1:pg-355"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 8, Example 1\n",
"Grashoff number is\n",
"GrL= 2175146201.53\n",
"Rayleigh number is\n",
"RaL= 9440134514.65\n",
"Therefore the flow is turbulent\n",
"Now we use [(hbarL*L)/k]=0.10*(GrL*Pr)**(1/3)\n",
"The average heat transfer coefficient in W/(m**2*K) is\n",
"hbarL= 0.314\n",
"The rate of heat transfer in W is\n",
"q= 0.5024\n"
]
}
],
"source": [
"import math \n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 8, Example 1\"\n",
"#Water is heated by a vertical flat plate length(L=200mm or .2m )by breadth(B=200mm) which is maintained at temprature,Tw=60Â°C\n",
"Tw=60;\n",
"L=.2;\n",
"B=.2;# in metre\n",
"#Area(A) is L*B \n",
"A=L*B;\n",
"#Water is at temprature,Tinf=20Â°C\n",
"Tinf=20;\n",
"#At mean film temprature 40Â°C The physical properties parameters can be taken as \n",
"#conductivity(k=0.0628W/(m*K)),Prandtl number(Pr=4.34),density(rho=994.59kg/m**3),kinematic viscosity(nu=0.658*10**-6m**2/s),volume expnasion coefficient(Beta=3*10**-4K**-1))\n",
"k=0.628;\n",
"Pr=4.34;\n",
"rho=994.59;\n",
"nu=0.658*10**-6;\n",
"Beta=3*10**-4;\n",
"#g is acceleration due to gravity =9.81m/s**2\n",
"g=9.81;\n",
"#Grashoff number is given by GrL=(g*beta*(Tw-Tinf)*L**3)/(nu)**2\n",
"print\"Grashoff number is\"\n",
"GrL=(g*Beta*(Tw-Tinf)*L**3)/(nu)**2\n",
"print\"GrL=\",GrL\n",
"#Rayleigh number is defined as RaL=GrL*Pr\n",
"print\"Rayleigh number is\"\n",
"RaL=GrL*Pr\n",
"print\"RaL=\",RaL\n",
"print\"Therefore the flow is turbulent\"\n",
"print\"Now we use [(hbarL*L)/k]=0.10*(GrL*Pr)**(1/3)\"\n",
"#hbarL is the average heat transfer coefficient\n",
"print\"The average heat transfer coefficient in W/(m**2*K) is\"\n",
"hbarL=(0.10*(GrL*Pr)**(1/3)*k)/L\n",
"print\"hbarL=\",hbarL\n",
"#The rate of heat transfer is given by q=hbarL*A*(Tw-Tinf)\n",
"print\"The rate of heat transfer in W is\"\n",
"q=hbarL*A*(Tw-Tinf)\n",
"print\"q=\",q"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex8.2:pg-357"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 8, Example 2\n",
"The minimum spacing between the plates will be twice the thickness of the boundary layer at the trailing edge where x=0.09\n",
"Grashoff number is\n",
"GrL= 198210197.615\n",
"Rayleigh number is\n",
"RaL= 860232257.647\n",
"Since Ra<10**9,Therefore the flow is laminar\n",
"The thickness of the boundary layer in metre is\n",
"delta= 4.11168026839e-10\n",
"The minimum spacing in metre is\n",
"spac= 8.22336053678e-10\n"
]
}
],
"source": [
"import math \n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 8, Example 2\"\n",
"#The thin plates are kept at temprature(Tw)=60Â°C while the temprature of water bath(Tinf)=20Â°C\n",
"Tw=60;\n",
"Tinf=20;\n",
"#The plates have length(L)=90mm or .09m\n",
"L=.09;\n",
"#The minimum spacing between the plates will be twice the thickness of the boundary layer at the trailing edge where x=0.09.\n",
"print\"The minimum spacing between the plates will be twice the thickness of the boundary layer at the trailing edge where x=0.09\"\n",
"x=.09;\n",
"#At mean film temprature 40Â°C The physical properties parameters can be taken as\n",
"# conducivity(k=0.0628W/(m*K)),Prandtl number(Pr=4.34),Density(rho=994.59kg/m**3),kinematic viscosity(nu=0.658*10**-6m**2/s),Volume expansion coefficient(Beta=3*10**-4K**-1)\n",
"k=0.628;\n",
"Pr=4.34;\n",
"rho=994.59;\n",
"nu=0.658*10**-6;\n",
"Beta=3*10**-4;\n",
"#g is acceleration due to gravity =9.81m/s**2\n",
"g=9.81;\n",
"#Grashoff number is given by GrL=(g*beta*(Tw-Tinf)*L**3)/(nu)**2\n",
"print\"Grashoff number is\"\n",
"GrL=(g*Beta*(Tw-Tinf)*L**3)/(nu)**2\n",
"print\"GrL=\",GrL\n",
"#Rayleigh number is defined as RaL=GrL*Pr\n",
"print\"Rayleigh number is\"\n",
"RaL=GrL*Pr\n",
"print\"RaL=\",RaL\n",
"print\"Since Ra<10**9,Therefore the flow is laminar\"\n",
"#delta is the thickness of the boundary layer\n",
"print\"The thickness of the boundary layer in metre is\"\n",
"delta=x*3.93*Pr**(-1/2)*(0.952+Pr)**(1/4)*GrL**(-1/4)\n",
"print\"delta=\",delta\n",
"#spac is the minimum spacing \n",
"print\"The minimum spacing in metre is\"\n",
"spac=2*delta\n",
"print\"spac=\",spac"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex8.3:pg-366"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 8, Example 3\n",
"Grashoff number is\n",
"Grx= 517025.52213\n",
"The boundary layer thickness in metre is\n",
"delta= 60304.3038858\n",
"The velocity at point x is ux in m/s is\n",
"ux= 3247798354.51\n",
"For maximum value of velocity,u\n",
"Maximum velocity in m/s is\n",
"Umax= 3.57089835848\n",
"Mass flow rate at x=0.8m,in kG is\n",
"mdot= 2.36830073295e+16\n"
]
}
],
"source": [
"from scipy.integrate import quad\n",
"print \"Introduction to heat transfer by S.K.Som, Chapter 8, Example 3\"\n",
"#Considering question 5.7\n",
"#A wall is exposed to nitrogen at one atmospheric pressure and temprature,Tinf=4Â°C.\n",
"Tinf=4.0;\n",
"#The wall is H=2.0m high and 2.5m wide and is maintained at temprature,Tw=56Â°C\n",
"Tw=56.0;\n",
"H=2.0;\n",
"B=2.5;\n",
"A=H*B;#Area of wall in m**2\n",
"#The properties of nitrogen at mean film temprature (56+4)/2=30Â°C are given as \n",
"#density(rho=1.142kg/m*3) ,conductivity(k=0.026W/(m*K)),kinematic viscosity(nu=15.630*10-6 m*2/s) ,prandtl number(Pr=0.713)\n",
"rho=1.142;\n",
"k=0.026;\n",
"nu=15.630*10**-6;\n",
"Pr=0.713;\n",
"Tf=30.0;#mean film temprature\n",
"Beta=1/(273.0+Tf);#volume expansion coefficient:unit K**-1\n",
"#Now Grashoff number is Grx=(g*Beta*(Tw-Tinf)*x*3)/nu*2\n",
"g=9.81;#acceleration due to gravity\n",
"print \"Grashoff number is\"\n",
"x=0.8;#distance from the bottom of wall\n",
"Grx=(g*Beta*(Tw-Tinf)*x*3)/nu*2\n",
"print\"Grx=\",Grx\n",
"#Using equation delta=x*Pr*(-0.5)(0.952+Pr)*(0.25)*Grx*(-0.25)\n",
"#delta is the boundary layer thickness\n",
"print \"The boundary layer thickness in metre is\"\n",
"delta=x*3.93*Pr*(-0.5)*(0.952+Pr)*(0.25)*Grx*(-0.25)\n",
"print\"delta=\",delta\n",
"#Now using equation ux=(g*Beta*delta*2(Tw-Tinf))/(4*nu)\n",
"#ux is the velocity at point x\n",
"print \"The velocity at point x is ux in m/s is\"\n",
"ux=(g*Beta*delta*2*(Tw-Tinf))/(4*nu)\n",
"print\"ux=\",ux\n",
"# (u/ux)=(y/delta)*(1-y/delta)**2\n",
"#Putting value of ux we get velovity function,u=465.9*(y-116*y*2+3341*y*3)\n",
"#For maximum value of u,du/dy=465.9*(1-232*y+10023*y**2)=0...this is a quadratic equation in which coefficients a=10023,b=232,c=1\n",
"a=10023;\n",
"b=232;\n",
"c=1;\n",
"#Solution for quadratic equation is given by y=(-b+-(b*2-4ac)*0.5)/2*a\n",
"print \"For maximum value of velocity,u\"\n",
"y=(b+(b*2-4*a*c)*0.5)/(2*a)#root of the quadratic equation\n",
"y=(b-(b*2-4*a*c)*0.5)/(2*a)#root of the quadratic equation\n",
"#The value of 0.0173 is at the edge of boundary layer,where u=0\n",
"#Therefore the maximum value occurs at y=0.00573m i.e Umax=465.9*y*(1-57.8*y)**2\n",
"y=0.00573;\n",
"#Umax is maximum velocity\n",
"print \"Maximum velocity in m/s is\"\n",
"Umax=465.9*y*(1-57.8*y)*2#NOTE:The answer given in the book is incorrect,in this expresssion they considered square on y only,however it is on whole expression (1-57.8*y)*2\n",
"#mdot is mass flow rate\n",
"print\"Umax=\",Umax\n",
"print \"Mass flow rate at x=0.8m,in kG is\"\n",
"I=quad(lambda y:465.9*(y-116*y*2+3341*y*3),0,delta)\n",
"mdot=rho*B*I[0]\n",
"print\"mdot=\",mdot"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex8.4:pg-369"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 8, Example 4\n",
"Grashoff number is\n",
"Rayleigh number is\n",
"Hence,the flow is laminar\n",
"The thickness of the boundary layer in metre is\n",
"The average heat transfer coeficient in W/(m**2*K) is\n",
"0.101781170483\n"
]
}
],
"source": [
"import math \n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 8, Example 4\"\n",
"#A square plate length,L=0.2m by breadth,B=0.2m is suspended vertically in a quiescent atmospheric air at a temprature(Tinf)=300K\n",
"L=0.2;\n",
"B=0.2;\n",
"Tinf=300;\n",
"#The Temprature of plate(Tw) is maintained at 400K\n",
"Tw=400;\n",
"#The required property value of air at a film temprature(Tf)=350K,kinematic viscosity (nu=20.75*10**-6),Prandtl number(Pr=0.69),conductivity(k=0.03W/(m*K))\n",
"Tf=350;\n",
"nu=20.75*10**-6;\n",
"Pr=0.69;\n",
"k=0.03;\n",
"#volume expansion coefficient is Beta\n",
"Beta=(1/Tf);\n",
"#g is acceleration due to gravity =9.81m/s**2\n",
"g=9.81;\n",
"#Grashoff number is given by GrL=(g*beta*(Tw-Tinf)*L**3)/(nu)**2\n",
"print\"Grashoff number is\"\n",
"GrL=(g*Beta*(Tw-Tinf)*L**3)/(nu)**2 \n",
"print\"GrL=\",GrL\n",
"#Rayleigh number is defined as RaL=GrL*Pr\n",
"print\"Rayleigh number is\"\n",
"RaL=GrL*Pr\n",
"print\"Hence,the flow is laminar\"\n",
"print\"RaL=\",RaL\n",
"#delta is the thickness of the boundary layer\n",
"print\"The thickness of the boundary layer in metre is\"\n",
"x=0.2;#location of trailing edge of plate\n",
"delta=(x*3.93*(0.952+Pr)**(1/4))/(Pr**(1/2)*(GrL)**(1/4))#NOTE:The answer in the book is incorrect(calculation mistake)\n",
"print\"delta=\",delta\n",
"#hL and hbarL are local and average heat transfer coefficient respectively\n",
"print\"The average heat transfer coeficient in W/(m**2*K) is\"\n",
"hL=(2*k)/delta;\n",
"hbarL=(4.0/3)*(hL)#NOTE:The answer in the book is incorrect(calculation mistake)\n",
"print\"hL=\",hL\n",
"print\"hbarL=\",hbarL"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex8.5:pg-373"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 8, Example 5\n",
"Grashoff number is\n",
"503958851.066\n",
"Rayleigh number is\n",
"357810784.257\n",
"Therefore the flow is laminar\n",
"Nusselt number is\n",
"75.3134665126\n",
"Average heat transfer coefficient(hbarL)in W/(m**2*Â°C)\n",
"The rate of heat transfer in W is \n",
"Now if we use NuL2=0.59*RaL**(1/4) with the value of C=0.59,n=(1/4)\n",
"Nusselt number is\n",
"Average heat transfer coefficient(hbarL)in W/(m**2*Â°C)\n",
"The rate of heat transfer in W is \n",
"49.9857347505\n",
"(b)For the horizontal plate facing up\n",
"Now RaL2=Gr*Pr*(Lc/L)**3\n",
"Rayleigh number is\n",
"Nusselt number is given by NuL3=C*(GrL*Pr)**n\n",
"Average heat transfer coefficient(hbarL)in W/(m**2*Â°C)\n",
"The rate of heat transfer in W is \n",
"64.6997833306\n",
"(c)When the hot surface faces is down\n",
"Nusselt number is given by NuL4=0.27*RaL2**(1/4)\n",
"13.1290144745\n",
"Average heat transfer coefficient(hbarL) in W/(m**2)\n",
"2.9408992423\n",
"The rate of heat transfer in W is \n",
"32.3498916653\n"
]
}
],
"source": [
"import math \n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 8, Example 5\"\n",
"#A square plate of length(L)=0.5m by breadth,B=0.5m in a room at temprature,Tinf=30Â°C\n",
"#One side of plate is kept a uniform temprature(Tw)=74Â°C\n",
"Tw=74;\n",
"L=0.5;\n",
"B=0.5;\n",
"Tinf=30.0;\n",
"#The required properties at the film temprature(Tf)=52Â°C are kinematic viscosity(nu=1.815*10**-5),Prandtl number(Pr=0.71),conductivity(k=0.028W/(m*Â°C))\n",
"Tf=52.0;\n",
"Pr=0.71;\n",
"nu=1.815*10**-5;\n",
"k=0.028;\n",
"#Area(A)=L*B m**2\n",
"A=L*B;\n",
"#Volume expansion coefficient is Beta\n",
"Beta=1/(273+Tf);\n",
"#g is acceleration due to gravity =9.81m/s**2\n",
"g=9.81;\n",
"#Grashoff number is given by GrL=(g*beta*(Tw-Tinf)*L**3)/(nu)**2\n",
"print\"Grashoff number is\"\n",
"GrL=(g*Beta*(Tw-Tinf)*L**3)/(nu)**2 \n",
"print GrL\n",
"#Rayleigh number is defined as RaL1=GrL*Pr\n",
"print\"Rayleigh number is\"\n",
"RaL1=GrL*Pr\n",
"print RaL1\n",
"print\"Therefore the flow is laminar\"\n",
"#We make use of following equation to find Nusselt number,NuL1=(4/3)*(0.508*Pr**(-1/2)*(0.952+Pr)**(-1/4)*Gr**(1/4))\n",
"print\"Nusselt number is\"\n",
"NuL1=(4.0/3)*(0.508*Pr**(1.0/2)*(0.952+Pr)**(-1.0/4)*GrL**(1.0/4))\n",
"#Average heat transfer coefficient(hbarL) is given by (NuL*k)/L\n",
"print NuL1\n",
"print\"Average heat transfer coefficient(hbarL)in W/(m**2*Â°C)\"\n",
"hbarL=(NuL1*k)/L\n",
"#The rate of heat transfer(Q) from the plate by free convection is given by Q=hbarL*A*(Tw-Tinf)\n",
"print\"The rate of heat transfer in W is \"\n",
"Q=hbarL*A*(Tw-Tinf)\n",
"print\"Now if we use NuL2=0.59*RaL**(1/4) with the value of C=0.59,n=(1/4)\"\n",
"print\"Nusselt number is\"\n",
"NuL2=0.59*RaL1**(1.0/4)\n",
"#Average heat transfer coefficient(hbarL) is given by (NuL*k)/L\n",
"print\"Average heat transfer coefficient(hbarL)in W/(m**2*Â°C)\"\n",
"hbarL=(NuL2*k)/L\n",
"#The rate of heat transfer(Q) from the plate by free convection is given by Q=hbarL*A*(Tw-Tinf)\n",
"print\"The rate of heat transfer in W is \"\n",
"Q=hbarL*A*(Tw-Tinf)\n",
"print Q\n",
"print\"(b)For the horizontal plate facing up\"\n",
"#Perimeter(P) for a square plate is P=4*L\n",
"P=4*L;\n",
"#Characterstic length(Lc)=A/P\n",
"Lc=A/P\n",
"print\"Now RaL2=Gr*Pr*(Lc/L)**3\"\n",
"print\"Rayleigh number is\"\n",
"RaL2=GrL*Pr*(Lc/L)**3\n",
"#The values of constants,C=0.54 and n=(1/4)\n",
"C=0.54;\n",
"n=(1.0/4);\n",
"print\"Nusselt number is given by NuL3=C*(GrL*Pr)**n\"\n",
"NuL3=C*(RaL2)**n\n",
"print\"Average heat transfer coefficient(hbarL)in W/(m**2*Â°C)\"\n",
"hbarL=(NuL3*k)/Lc\n",
"print\"The rate of heat transfer in W is \"\n",
"Q=hbarL*A*(Tw-Tinf)\n",
"print Q\n",
"print\"(c)When the hot surface faces is down\"\n",
"print\"Nusselt number is given by NuL4=0.27*RaL2**(1/4)\"\n",
"NuL4=0.27*RaL2**(1.0/4)\n",
"print NuL4\n",
"print\"Average heat transfer coefficient(hbarL) in W/(m**2)\"\n",
"hbarL=(NuL4*k)/Lc\n",
"print hbarL\n",
"print\"The rate of heat transfer in W is \"\n",
"Q=hbarL*A*(Tw-Tinf)\n",
"print Q"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex8.6:pg-375"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 8, Example 6\n",
"Grashoff number is\n",
"GrL= 813719594.384\n",
"Rayleigh number is\n",
"RaL= 569603716.069\n",
"Therefore the flow is laminar\n",
"Now we use NuL=0.59*RaL**(1/4.0) with the value of constants C=0.59,n=(1/4.0)\n",
"Nusselt number is\n",
"NuL= 91.1475952489\n",
"Average heat transfer coefficient in W/(m**2*K)\n",
"hbarL1= 5.46885571493\n",
"Grashoff number GrD=GrL*(D/L)**3\n",
"GrD= 0.00650975675508\n",
"The correction factor is\n",
"F= 39.485281111\n",
"The correct value of Average heat transfer coefficient(hbarL2)=hbarL1*F in W/(m**2*K) is\n",
"hbarL2= 215.939305259\n",
"The ohmic loss in W is \n",
"q= 3.39196667512\n",
"The current flowing in the wire in Ampere is\n",
"I= 7.51882822777\n"
]
}
],
"source": [
"import math \n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 8, Example 6\"\n",
"#A vertical wire of length(L)=0.5m and Dimeter(D)=0.1mm is maintained at temprature, Tw=400K\n",
"#The temprature of quicsent air is Tinf=300K\n",
"#Resistance(R) per meter length is 0.12ohm\n",
"R=0.12;\n",
"Tw=400.0;\n",
"L=0.5;\n",
"D=0.1*10**-3;#in metre\n",
"Tinf=300;\n",
"#The required properties at the film temprature(Tf)=350K are kinematic viscosity(nu=20.75*10**-6m**2/s),Prandtl number(Pr=0.70),conductivity(k=0.03W/(m*Â°C))\n",
"Tf=350.0;\n",
"Pr=0.70;\n",
"nu=20.75*10**-6;\n",
"k=0.03;\n",
"#Area(A)=L*B m**2\n",
"A=math.pi*D*L;\n",
"#Volume expansion Coefficient is Beta\n",
"Beta=1/(Tf);\n",
"#g is acceleration due to gravity =9.81m/s**2\n",
"g=9.81;\n",
"#Grashoff number is given by GrL=(g*beta*(Tw-Tinf)*L**3)/(nu)**2\n",
"print\"Grashoff number is\"\n",
"GrL=(g*Beta*(Tw-Tinf)*L**3)/(nu)**2 \n",
"print\"GrL=\",GrL\n",
"#Rayleigh number is defined as RaL=GrL*Pr\n",
"print\"Rayleigh number is\"\n",
"RaL=GrL*Pr\n",
"print\"RaL=\",RaL\n",
"print\"Therefore the flow is laminar\"\n",
"#NuL is nusselt number\n",
"#C and n are constants\n",
"print\"Now we use NuL=0.59*RaL**(1/4.0) with the value of constants C=0.59,n=(1/4.0)\"\n",
"print\"Nusselt number is\"\n",
"NuL=0.59*RaL**(1/4.0)\n",
"print\"NuL=\",NuL\n",
"#hbarL1 is the Average heat transfer coefficient\n",
"print\"Average heat transfer coefficient in W/(m**2*K)\"\n",
"hbarL1=(NuL*k)/L\n",
"print\"hbarL1=\",hbarL1\n",
"#Grashoff number GrD=GrL*(D/L)**3\n",
"print\"Grashoff number GrD=GrL*(D/L)**3\"\n",
"GrD=GrL*(D/L)**3\n",
"print\"GrD=\",GrD\n",
"#The correction factor is given By F=1.3*((L/D)/GrD)**(1/4.0)+1.0\n",
"print\"The correction factor is\"\n",
"F=1.3*((L/D)/GrD)**(1/4.0)+1.0\n",
"print\"F=\",F\n",
"print\"The correct value of Average heat transfer coefficient(hbarL2)=hbarL1*F in W/(m**2*K) is\"\n",
"hbarL2=hbarL1*F\n",
"print\"hbarL2=\",hbarL2\n",
"#The ohmic power loss is given by energy balance I**2*R=q=hbar2*A*(Tw-Tinf)\n",
"#q is the ohmic power loss\n",
"print\"The ohmic loss in W is \"\n",
"q=hbarL2*A*(Tw-Tinf)\n",
"print\"q=\",q\n",
"#The current flowing in the wire I=(q/(R*L)**(1/2.0)\n",
"print\"The current flowing in the wire in Ampere is\"\n",
"I=(q/(R*L))**(1/2.0)\n",
"print\"I=\",I"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex8.7:pg-378"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 8, Example 7\n",
"Grashoff number is\n",
"GrD= 53311595.6796\n",
"Rayleigh number is\n",
"RaD= 37318116.9757\n",
"The flow is laminar over the entire cylinder\n",
"we use following equation to find Nusselt number NuD=(0.60+((0.387*RaD**(1/6))/(1+(0.559/Pr**(9/16)))**(8/27)))**2\n",
"NuD= 0.974169\n",
"Average heat transfer coefficient in W/(m**2*K)\n",
"hbar= 0.14612535\n",
"The heat loss per meter length in W is\n",
"q= 9.64039284733\n"
]
}
],
"source": [
"import math \n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 8, Example 7\"\n",
"#A long horizontal pressurized hot water of diameter(D)=200mm passes through a room where the air temprature is Tinf=25Â°C\n",
"D=.2;\n",
"Tinf=25;\n",
"#Length(L)=1m ,since the unit length is considered\n",
"L=1;\n",
"#Area(A)=pi*L*D\n",
"A=math.pi*L*D;\n",
"#The pipe surface temprature is Tw=130Â°C\n",
"Tw=130;\n",
"#The properties of air at the film temprature Tf=77.5Â°C are kinematic viscosity(nu=21*10**-6m**2/s),Prandtl number(Pr=0.70),Conductivity(k=0.03W/(m*K))\n",
"Tf=77.5;\n",
"nu=21*10**-6;\n",
"k=0.03;\n",
"Beta=(1/(273+Tf));#Volume expansion coefficient in k**-1)\n",
"Pr=0.70;\n",
"#g is acceleration due to gravity =9.81m/s**2\n",
"g=9.81;\n",
"#Grashoff number is given by GrD=(g*beta*(Tw-Tinf)*L**3)/(nu)**2\n",
"print\"Grashoff number is\"\n",
"GrD=(g*Beta*(Tw-Tinf)*D**3)/(nu)**2 \n",
"print\"GrD=\",GrD\n",
"#Rayleigh number is defined as RaD=GrD*Pr\n",
"print\"Rayleigh number is\"\n",
"RaD=GrD*Pr\n",
"print\"RaD=\",RaD\n",
"print\"The flow is laminar over the entire cylinder\"\n",
"#NuD is the nusselt number\n",
"print\"we use following equation to find Nusselt number NuD=(0.60+((0.387*RaD**(1/6))/(1+(0.559/Pr**(9/16)))**(8/27)))**2\"\n",
"NuD=(0.60+((0.387*RaD**(1/6))/(1+(0.559/Pr**(9/16)))**(8/27)))**2\n",
"print\"NuD=\",NuD\n",
"#hbar is the avearge heat transfer coefficient\n",
"print\"Average heat transfer coefficient in W/(m**2*K)\"\n",
"hbar=(NuD*k)/D\n",
"print\"hbar=\",hbar\n",
"#The heat loss per meter length is given by q=hbar*A*(Tw-Tinf)\n",
"print\"The heat loss per meter length in W is\"\n",
"q=hbar*A*(Tw-Tinf)\n",
"print\"q=\",q"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex8.8:pg-381"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 8, Example 8\n",
"Let us take first trial Tw=64Â°C\n",
"Grashoff number is\n",
"GrD= 226303.67232\n",
"Rayleigh number is\n",
"The flow is laminar \n",
"RaD= 941423.276851\n",
"we use following equation to find Nusselt number NuD=(0.60+((0.387*RaD**(1/6))/(1+(0.559/Pr**(9/16)))**(8/27)))**2\n",
"NuD= 0.974169\n",
"Average heat transfer coefficient in W/(m**2*K)\n",
"hbarD= 77.20289325\n",
"Hence,steady state Surface temprature in Â°C is\n",
"Hence we see that our guess is in excellent agreement with the calculated value\n",
"Tw= 793.068225127\n"
]
}
],
"source": [
"import math \n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 8, Example 8\"\n",
"#An electric immersion heater diameter(D)=8mm and length(L)=300mm is rated at power input,P=450W\n",
"P=450;\n",
"L=0.3;#in metre\n",
"D=0.008;#in metre\n",
"#If the heater is horizontally positioned in a large tank of stationery water at temprature,Tinf=20Â°C\n",
"Tinf=20;\n",
"#At steady state ,The electrical power input(P)=(Q)Heat loss from the heater\n",
"#P=Q\n",
"#Q=hbarD*(pi*D)*L*(Tw-Tinf)\n",
"#This gives Tw(surface temprature)=Tinf+(P/(hbarD*pi*D*L))\n",
"#So we need to find Average heat transfer coefficient,hbarD.\n",
"#In this problem we need to take guess of steady state surface temprature(Tw) and iterate the solution for Tw till a desired convergence is achieved.\n",
"print\"Let us take first trial Tw=64Â°C\"\n",
"Tw=64;\n",
"Tf=(Tw+Tinf)/2;#mean film temprature\n",
"#At this temprature of 42Â°C,The required properties of water kinematic viscosity(nu=6.25*10**-7m**2/s),Prandtl number(Pr=4.16),Conductivity(k=0.634W/(m*K)),Beta=4*10**-4K**-1\n",
"Beta=4*10**-4;#Volume expansion coefficient\n",
"nu=6.25*10**-7;\n",
"Pr=4.16;\n",
"k=0.634;\n",
"#g is acceleration due to gravity =9.81m/s**2\n",
"g=9.81;\n",
"#Grashoff number is given by GrD=(g*beta*(Tw-Tinf)*L**3)/(nu)**2\n",
"print\"Grashoff number is\"\n",
"GrD=(g*Beta*(Tw-Tinf)*D**3)/(nu)**2 \n",
"print\"GrD=\",GrD\n",
"#Rayleigh number is defined as RaD=GrD*Pr\n",
"print\"Rayleigh number is\"\n",
"RaD=GrD*Pr\n",
"print\"The flow is laminar \"\n",
"print\"RaD=\",RaD\n",
"#/NuD is nusselt number\n",
"#hbarD is Average heat transfer coefficient\n",
"print\"we use following equation to find Nusselt number NuD=(0.60+((0.387*RaD**(1/6))/(1+(0.559/Pr**(9/16)))**(8/27)))**2\"\n",
"NuD=(0.60+((0.387*RaD**(1/6))/(1+(0.559/Pr**(9/16)))**(8/27)))**2\n",
"print\"NuD=\",NuD\n",
"print\"Average heat transfer coefficient in W/(m**2*K)\"\n",
"hbarD=(NuD*k)/D\n",
"print\"hbarD=\",hbarD\n",
"print\"Hence,steady state Surface temprature in Â°C is\"\n",
"Tw=Tinf+(P/(hbarD*math.pi*D*L))\n",
"print\"Hence we see that our guess is in excellent agreement with the calculated value\"\n",
"print\"Tw=\",Tw"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKfqJ6LTOTO,Introduction to Heat Transfer/Chapter9.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"# Chapter 09:Heat transfer in condensation and boiling"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex9.1:pg-392"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 9, Example 1\n",
"The properties of condensate(liquid water) are evaluated at the mean film temprature \n",
"The mean film temprature inÂ°C is\n",
"tf= 95\n",
"hfg= 2270000.0\n",
"The average heat transfer coefficient over length L in W/(m**2*K)\n",
"hbar= 0.745\n",
"The rate of heat transfer per unit width in W/m \n",
"Q= 3.772\n",
"The total rate of condensation in kg/(s*m)\n",
"mdotc= 1.66167400881e-06\n",
"We have to check whether the flow is laminar or not \n",
"Reynolds no. is\n",
"Therefore the flow is laminar and hence the use of the equation is justified\n",
"ReL= 0.0221556534508\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 9, Example 1\"\n",
"#A vertical cooling fin, Approximately a flat plate length,(L)=0.4m high is exposed to saturated steam(temprature,Tg=100Â°C) at atmospheric pressure.\n",
"L=0.4;\n",
"Tg=100;\n",
"#The fin is maintained at temprature,Tw=90Â°C by cooling water.\n",
"Tw=90;\n",
"print\"The properties of condensate(liquid water) are evaluated at the mean film temprature \"\n",
"#tf is mean film temprature\n",
"print\"The mean film temprature inÂ°C is\"\n",
"tf=(Tg+Tw)/2\n",
"print\"tf=\",tf\n",
"#The properties of condensate are density(rho=962kg/m**3),conductivity(k=0.677W/(m*K)),viscosity(mu=3*10**-4 kg/(m*s))\n",
"rho=962;\n",
"k=0.677;\n",
"mu=3*10**-4;\n",
"#The value rhov=0.598kg/m**3 and hfg=2.27*10**6J/kg at 100Â°C are found from steam table\n",
"#g is acceleration due to gravity =9.81m/s**2\n",
"g=9.81;\n",
"rhov=0.598;#rhov is vapour density\n",
"hfg=2.27*10**6;#hfg is enthalpy of vaporisation\n",
"print\"hfg=\",hfg\n",
"#The average heat transfer coefficient over length L is hbarL=0.943*((rho*(rho-rhov)*g*h*L**3)/(mu*k*(Tg-Tw)))**(1/4)\n",
"print\"The average heat transfer coefficient over length L in W/(m**2*K)\"\n",
"hbarL=0.943*((rho*(rho-rhov)*g*hfg*k**3)/(mu*L*(Tg-Tw)))**(1/4)\n",
"print\"hbar=\",hbar\n",
"#The rate of heat transfer per unit width is Q=hbarL*L*(Tg-Tw)\n",
"print\"The rate of heat transfer per unit width in W/m \"\n",
"Q=hbarL*L*(Tg-Tw)\n",
"print\"Q=\",Q\n",
"#The rate of condensation is given by mdotc=(Q/hfg)\n",
"print\"The total rate of condensation in kg/(s*m)\"\n",
"mdotc=(Q/hfg)\n",
"print\"mdotc=\",mdotc\n",
"print\"We have to check whether the flow is laminar or not \"\n",
"#Reynolds no is given by ReL=(4*mdotc)/(mu)\n",
"print\"Reynolds no. is\"\n",
"ReL=(4*mdotc)/(mu)\n",
"print\"Therefore the flow is laminar and hence the use of the equation is justified\"\n",
"print\"ReL=\",ReL"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex9.2:pg-393"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 9, Example 2\n",
"The mean film temprature inÂ°C is\n",
"tf= 95\n",
"hfg= 2270000.0\n",
"The average heat transfer coefficient in W/(m**2*K)\n",
"hbar= 0.745\n",
"The total rate of condensation in kg/s\n",
"Check for reynolds no.\n",
"mdotc= 1.54657700017e-06\n",
"Reynolds number is\n",
"Re= 0.00343683777816\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 9, Example 2\"\n",
"#Steam is condensed at temprature(Tg=100Â°C) on the outer surafce of a horizontal tube of length(L=3m) and diameter(d)=50mm or .05m\n",
"Tg=100;\n",
"L=3;\n",
"D=0.05;\n",
"#The Tube surface is maintained at temprature,Tw=90Â°C \n",
"Tw=90;\n",
"#tf is mean film temprature\n",
"print\"The mean film temprature inÂ°C is\"\n",
"tf=(Tg+Tw)/2\n",
"print\"tf=\",tf\n",
"#The properties of condensate are density(rho=962kg/m**3),conductivity(k=0.677W/(m*K)),viscosity(mu=3*10**-4 kg/(m*s))\n",
"rho=962;\n",
"k=0.677;\n",
"mu=3*10**-4;\n",
"#The value rhov=0.598kg/m**3 and hfg=2.27*10**6J/kg at 100Â°C are found from steam table\n",
"#g is acceleration due to gravity =9.81m/s**2\n",
"g=9.81;\n",
"rhov=0.598;#vapour density\n",
"hfg=2.27*10**6;#enthalpy of vaporisation\n",
"print\"hfg=\",hfg\n",
"#The average heat transfer coefficient hbar=0.745*((rho*(rho-rhov)*g*hfg*k**3)/(mu*D*(Tg-Tw)))**(1/4)\n",
"print\"The average heat transfer coefficient in W/(m**2*K)\"\n",
"hbar=0.745*((rho*(rho-rhov)*g*hfg*k**3)/(mu*D*(Tg-Tw)))**(1/4)\n",
"print\"hbar=\",hbar\n",
"#The rate of condensation is given by mdotc=(hbar*(pi*D*L)*(Tg-Tw))/hfg\n",
"print\"The total rate of condensation in kg/s\"\n",
"mdotc=(hbar*(math.pi*D*L)*(Tg-Tw))/hfg\n",
"print\"Check for reynolds no.\"\n",
"print\"mdotc=\",mdotc\n",
"#For a horizontal tube having length,L,perimeter is P=2L\n",
"P=2*L;\n",
"#Re is reynolds number\n",
"print\"Reynolds number is\"\n",
"Re=(4*mdotc)/(mu*P)\n",
"print\"Re=\",Re"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex9.3:pg-394"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 9, Example 3\n",
"The mean film temprature inÂ°C is\n",
"tf= 80\n",
"The average heat transfer coefficient over length L in W/(m**2*K)\n",
"hbar= 0.943\n",
"The rate of heat transfer in kW \n",
"Q= 0.016974\n",
"(b)The film thickness at the trailing edges in m is\n",
"delta= 1.0\n",
"The total rate of condensation in kg/s\n",
"mdotc= 7.47753303965e-06\n",
"Hence the average flow velocity at the trailing edge in m/s is\n",
"v= 2.56431174199e-08\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 9, Example 3\"\n",
"#A vertical plate having length,(L)=1.5m is maintained at temprature(Tw) of 60Â°C in the presence of saturated steam(temprature,Tg=100Â°C) at atmospheric pressure.\n",
"L=1.5;\n",
"Tg=100;\n",
"Tw=60;\n",
"#Consider the width of plate to be (B)=0.3m\n",
"B=0.3;\n",
"#tf is the mean film temprature\n",
"print\"The mean film temprature inÂ°C is\"\n",
"tf=(Tg+Tw)/2\n",
"print\"tf=\",tf\n",
"#The relevant properties are desity(rho=972kg/m**3),conductivity(k=0.670W/(m*K)),viscosity(mu=3.54*10**-4 kg/(m*s))\n",
"#specific heat(cp=4.2J/(kg*K)),vapur density(rhov(100Â°C)=0.598k/m**3),Enthalpy of vaporisation(hfg(100Â°C)=2.27*10**6J/kg)\n",
"#g is acceleration due to gravity =9.81m/s**2\n",
"g=9.81;\n",
"rho=972;\n",
"k=0.670;\n",
"mu=3.54*10**-4;\n",
"cp=4.2;\n",
"rhov=0.598;\n",
"hfg=2.27*10**6;\n",
"#The average heat transfer coefficient over length L is hbar=0.943*((rho*(rho-rhov)*g*h*L**3)/(mu*k*(Tg-Tw)))**(1/4)\n",
"print\"The average heat transfer coefficient over length L in W/(m**2*K)\"\n",
"hbar=0.943*((rho*(rho-rhov)*g*hfg*k**3)/(mu*L*(Tg-Tw)))**(1/4)\n",
"print\"hbar=\",hbar\n",
"#The rate of heat transfer Q=hbarL*A*(Tg-Tw)\n",
"#Area(A)=L*B\n",
"A=L*B;\n",
"print\"The rate of heat transfer in kW \"\n",
"Q=(hbar*A*(Tg-Tw))/1000\n",
"print\"Q=\",Q\n",
"#The film thickness at the trailing edges is found out by delta=((4*mu*k*x*(Tg-Tw))/(g*hfg*rho*(rho-rhov)))**(1/4)\n",
"print\"(b)The film thickness at the trailing edges in m is\"\n",
"#at trailing edges x=1.5m\n",
"x=1.5;\n",
"delta=((4*mu*k*x*(Tg-Tw))/(g*hfg*rho*(rho-rhov)))**(1/4)\n",
"print\"delta=\",delta\n",
"#The rate of condensation is given by mdotc=(Q/hfg)\n",
"print\"The total rate of condensation in kg/s\"\n",
"mdotc=((Q*1000)/hfg)\n",
"print\"mdotc=\",mdotc\n",
"#v is the average flow velocity\n",
"print\"Hence the average flow velocity at the trailing edge in m/s is\"\n",
"v=(mdotc)/(rho*delta*B)\n",
"print\"v=\",v"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex9.4:pg-396"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 9, Example 4\n",
"The mean film temprature inÂ°C is\n",
"tf= 30\n",
" Modified enthalpy in J/kg is\n",
"hfgdash= 131330.0\n",
"The average heat transfer coefficient over length L in W/(m**2*K)\n",
"hbar= 0.555\n",
"The total rate of condensation in kg/hr\n",
"mdotc= 0.00716923260703\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 9, Example 4\"\n",
"#Saturated freon-012 at Temprature(Tg)=35Â°C is condensed horizontal tube of diameter(D)=15mm or.015m at a lower vapour velocity.\n",
"#length,L=1m,Since per meter of tube is considered.\n",
"L=1;\n",
"Tg=35;\n",
"D=0.015;\n",
"#The tube wall is maintained at temprature(Tw)=25Â°C\n",
"Tw=25;\n",
"#For freon-12 at 35Â°C,enthalpy of vaporisation(hfg=131.33kJ/kg) and vapour density(rhov=42.68kg/m**3)\n",
"hfg=131.33*10**3;\n",
"rhov=42.68;\n",
"#tf is mean film temprature\n",
"print\"The mean film temprature inÂ°C is\"\n",
"tf=(Tg+Tw)/2\n",
"print\"tf=\",tf\n",
"#The relevant properties at 30Â°C are density(rho=1.29*10**3kg/m**3),conductivity(k=0.071W/(mK)),viscosity(mu=2.50*10**-4kg/(m*s)),specific heat(cp=983J/(kg*Â°C))\n",
"rho=1.29*10**3;\n",
"k=0.071;\n",
"mu=2.50*10**-4;\n",
"cp=983;\n",
"#g is acceleration due to gravity =9.81m/s**2\n",
"g=9.81;\n",
"#we found the modified enthalpy by using following equation hfgdash=hfg+(3/8)*cp*(Tg-Tw)\n",
"print\" Modified enthalpy in J/kg is\"\n",
"hfgdash=hfg+((3/8)*cp*(Tg-Tw))\n",
"print\"hfgdash=\",hfgdash\n",
"#The average heat transfer coefficient over length L is hbar=0.555*((rho*(rho-rhov)*g*hfgdash*k**3)/(mu*D*(Tg-Tw)))**(1/4)\n",
"print\"The average heat transfer coefficient over length L in W/(m**2*K)\"\n",
"hbar=0.555*((rho*(rho-rhov)*g*hfgdash*k**3)/(mu*D*(Tg-Tw)))**(1/4)\n",
"print\"hbar=\",hbar\n",
"#The rate of condensation is given by mdotc=(hbar*(pi*D*L)*(Tg-Tw))/hfg\n",
"print\"The total rate of condensation in kg/hr\"\n",
"mdotc=((hbar*(math.pi*D*L)*(Tg-Tw))/hfg)*3600\n",
"print\"mdotc=\",mdotc"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex9.5:pg-397"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 9, Example 5\n",
"Heat transfer coefficient in W/m**2 is\n",
"h= 105042.262441\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 9, Example 5\"\n",
"#A nickel wire of length(L)=0.1m,Diameter(D)=1mm or .001m \n",
"#Submerged horizontally in water at pressure=1 atm(101kPa) requires current,I=150A at voltage ,E=2.2V to maintain wire at temprature(T1)=110Â°C\n",
"L=0.1;\n",
"T1=110;\n",
"D=0.001;\n",
"I=150;\n",
"E=2.2;\n",
"#Area(A)=(math.pi*D*L)\n",
"A=math.pi*D*L;\n",
"#The saturation temprature of water at one atmospheric pressure(101kPa) is T2=100Â°C.\n",
"T2=100;\n",
"#We can write from energy balance E*I=h*A*(T1-T2),we can find heat transfer coefficient from it.\n",
"#h is heat transfer coefficient\n",
"print\"Heat transfer coefficient in W/m**2 is\"\n",
"h=(E*I)/(A*(T1-T2))\n",
"print\"h=\",h"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex9.6:pg-398"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 9, Example 6\n",
"Critical Heat flux in W/m**2 is\n",
"qc= 202044.0\n",
"The burn out voltage in Volts is \n",
"E= 1.90421983831\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 9, Example 6\"\n",
"#In a laboratory experiment,A current(I)=100A burns out a nickel wire having Diameter(D)=1mm or 0.001mm,length(L)=0.3m\n",
"I=100;\n",
"D=.001;\n",
"L=0.3;\n",
"#It is submerged horizontally in water at one atmospheric pressure.\n",
"#For saturated water at one atmospheric pressure,density(rhol=960kg/m**3),vapour density(rhov=0.60kg/m**3),enthalpy of vaporisation(hfg=2.26*10**6J/kg),surface tension(sigma=0.055N/m).\n",
"rhol=960;\n",
"rhov=0.60;\n",
"hfg=2.26*10**6;\n",
"sigma=0.055;\n",
"#Area(A)=(pi*D*L)\n",
"A=math.pi*D*L;\n",
"#g is acceleration due to gravity =9.81m/s**2\n",
"g=9.81;\n",
"#The wire is burnt out when heat reaches its peak\n",
"#We use following expression to determine critical heat flux qc=0.149*hfg*rhov*((sigma*g*(rhol-rhov))/rhov**2)**(1/4)*((rhol+rhov)/rhol)**(1/2) \n",
"print\"Critical Heat flux in W/m**2 is\"\n",
"qc=0.149*hfg*rhov*((sigma*g*(rhol-rhov))/rhov**2)**(1/4)*((rhol+rhov)/rhol)**(1/2) \n",
"print\"qc=\",qc\n",
"#From the energy balance E*I=qc*A\n",
"#E is the burn out voltage\n",
"print\"The burn out voltage in Volts is \"\n",
"E=(qc*A)/I\n",
"print\"E=\",E"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex9.7:pg-399"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 9, Example 7\n",
"Heat flux q in W/m**2 is\n",
"The peak heat flux for water at one atmospheric pressure is qc=1.24*10**6(found in example 9.6).Since q0,Then for a finite value of heat transfer rate U*A--->infinity.For a given finite length this implies value of U which is not possible.\n",
"(c)Let us consider a counter flow arrangement\n",
"The minimum flow rate required for the oil in kg/s\n",
"Ch= 2.78666666667\n",
"Cc= 8.36\n",
"Effectiveness of heat exchanger is \n",
"eff= 1.0\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 10, Example 8\"\n",
"#A double pipe heat exchanger of length(L)=0.30m is to be used to heat water(specific heat,cc=4.18kJ/(kg*K)) and mass flow rate(mdotw=2kg/s)\n",
"L=0.30;\n",
"cc=4.18;\n",
"mdotw=2;\n",
"#The water enters at temprature(Tci)=25Â°C and leaves at temprature(Tco)=50Â°C\n",
"#The flow rate of oil is mdoth\n",
"Tci=25;\n",
"Tco=50; \n",
"#The oil used as hot fluid has(specific heat,ch=1.88kJ/(kg*K)) and has inlet temprature(Thi)=100Â°C \n",
"ch=1.88;\n",
"Thi=100;\n",
"print\"(a)Considering a parallel flow arrangement \"\n",
"#For minimum value of mdoth\n",
"#The theoretical minimum value of outlet temprature of hot fluid(Tho) under this situation is equal to Tco\n",
"Tho=Tco;\n",
"print\"Tho=\",Tho\n",
"#The mass flow rate of oil is given by energy balance as mdoth=(mdotw*cpw*(Tco-Tci))/(cph*(Thi-Tho))\n",
"print\"The minimum flow rate required for the oil in kg/s\"\n",
"mdoth=(mdotw*cc*(Tco-Tci))/(ch*(Thi-Tho))\n",
"print\"mdoth=\",mdoth\n",
"print\"(b)Theoretical question\"\n",
"print\"If LMTD--->0,Then for a finite value of heat transfer rate U*A--->infinity.For a given finite length this implies value of U which is not possible.\"\n",
"print\"(c)Let us consider a counter flow arrangement\"\n",
"#In this case value of Tho=Tci.\n",
"Tho=Tci;\n",
"#The mass flow rate of oil is given by energy balance as mdoth=(mdotw*cpw*(Tco-Tci))/(cph*(Thi-Tho))\n",
"print\"The minimum flow rate required for the oil in kg/s\"\n",
"mdoth=(mdotw*cc*(Tco-Tci))/(ch*(Thi-Tci))\n",
"#Now Heat capacities are Ch=mdoth*ch and Cc=mdotw*cc\n",
"Ch=mdoth*ch; \n",
"Cc=mdotw*cc;\n",
"print\"Ch=\",Ch\n",
"print\"Cc=\",Cc\n",
"Cmin=min(Ch,Cc);#minimum heat capacity in Ch and Cc \n",
"#Effectiveness of heat exchanger is eff.\n",
"#Tho=Tci for this kind of arrangement\n",
"Tho=Tci;\n",
"print\"Effectiveness of heat exchanger is \"\n",
"eff=(mdoth*ch*(Thi-Tho))/(mdoth*ch*(Thi-Tci))\n",
"print\"eff=\",eff"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKfqJ>>-Introduction to Heat Transfer/Chapter11.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"# Chapter 11:Radiation heat transfer"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex11.3:pg-445"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 11, Example 3\n",
"The view factors F13 and F31 between the surfaces 1 and 3 are \n",
"F13= 0.04\n",
"F31= 0.032\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 11, Example 3\"\n",
"print\"The view factors F13 and F31 between the surfaces 1 and 3 are \"\n",
"#Determine the view factors F13 and F31 between the surfaces 1 and 3.\n",
"#F1-2,3=F12+F13\n",
"#So F13=F1-2,3-F12\n",
"#Let F1-2,3=F123\n",
"#From Radiation Shape factor b/w two perpendicular rectangles with a commom edge table we get F12=.027,F1-2,3=0.31\n",
"F123=0.31;#View factor\n",
"F12=.27;#View factor\n",
"F13=F123-F12#View factor\n",
"print\"F13=\",F13\n",
"#A1,A2 and A3 are the emitting surface areas\n",
"#From reciprocity relation F31=(A1/A3)/F13\n",
"A1=2;\n",
"A3=2.5;\n",
"F31=(A1/A3)*F13\n",
"print\"F31=\",F31"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex11.4:pg-447"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 11, Example 4\n",
"F124= 0.04\n",
"F24= 0.06\n",
"The view factor F14=((F1,2-4*(A1+A2)))-A2*F24)/A2\n",
"F14= 0.02\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 11, Example 4\"\n",
"#Determine the view factors F14 for the composite surface .\n",
"#From the table of radiation shape factor b/w two perpendicular surfaces F1,2-3,4=0.14 and F1,2-3=0.1\n",
"#By subdivision of the recieving surfaces we get F1,2-4=F1,2-3,4-F1,2-3\n",
"#Let F1,2-4=F124 , F1,2-3,4=F1234 , F1,2-3=F123\n",
"F1234=0.14;#View factor\n",
"F123=0.1;#View factor\n",
"F124=F1234-F123;#View factor\n",
"print\"F124=\",F124\n",
"#Again from the table of radiation shape factor b/w two perpendicular surfaces F2-3,4=0.24 , F23=0.18\n",
"#Let F2-3,4=F234\n",
"F234=0.24;#View factor\n",
"F23=0.18;#View factor\n",
"#By subdivision of the recieving surfaces we get F24=F2-3,4-F23\n",
"F24=F234-F23;#view factor\n",
"print\"F24=\",F24\n",
"#A1 and A2 are the emitting surface areas.\n",
"A1=12;\n",
"A2=12;\n",
"#Now by subdivision of emitting surfaces F1,2-4=(1/(A1+A2))*(A1*F14+A2*F24)\n",
"#This implies F14=((F1,2-4*(A1+A2)))-A2*F24)/A2\n",
"print\"The view factor F14=((F1,2-4*(A1+A2)))-A2*F24)/A2\"\n",
"F14=((F124*(A1+A2))-(A2*F24))/A2\n",
"print\"F14=\",F14"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex11.5:pg-453"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 11, Example 5\n",
"The view factors of cylindrical surface with respect to the base are\n",
"F13= 0.84\n",
"F31= 0.0\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 11, Example 5\"\n",
"#Consider a cylinder having length,L=2r determine the view factor of cylindrical surface with respect to the base.\n",
"#From the graph of radiation shape factor b/w parallel coaxial disks of equal diameter F12=0.16\n",
"F12=0.16;#View factor\n",
"#By the summation rule of an enclosure F11+F12+F13=1\n",
"#But F11=0(since the base surface is flat)\n",
"F11=0;#View factor\n",
"print\"The view factors of cylindrical surface with respect to the base are\"\n",
"F13=1-F12-F11#view factor\n",
"print\"F13=\",F13\n",
"#By making use of reciprocity theorem we have F31=(A1/A2)*F13\n",
"#A1 and A2 are emitting surface areas\n",
"#A1/A2=(pi*r**2)/(2*pi*r*2*r)=1/4\n",
"#Let A1/A2=A\n",
"A=1/4;\n",
"F31=(A)*F13\n",
"print\"F31=\",F31"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex11.6:pg-456"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 11, Example 6\n",
"The rate of heat transfer is given by Q=A1*F12*sigma*(T1**4-T2**4) in W\n",
"Q= -2918.916\n",
"Here minus sign indicates that the net heat transfer is from surface2 to surface1\n",
"The net rate of energy loss from the surface at 127Â°C if the surrounding other than the two surfaces act as black body at 0K in W\n",
"Q1= 2894.4216\n",
"The view factor of surface 1 with respect to surrounding is\n",
"F1s= 0.89\n",
"The net rate of energy loss from the surface at 127Â°C if the surrounding other than the two surfaces act as black body at 300K in W \n",
"Q1= 1055.04525\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 11, Example 6\"\n",
"#Two rectangles length,L=1.5m by breadth,B=3.0m are parallel and directly opposed.\n",
"L=1.5;\n",
"B=3;\n",
"#They are 3m apart\n",
"#Temprature(T1) of surface 1 is 127Â°C or 400K and temprature(T2) of surface 2 is 327Â°C or 600K \n",
"T1=400;\n",
"T2=600;\n",
"#Area (A) is the product of L and B\n",
"A1=L*B;\n",
"#Stefan -Boltzman constant(sigma)=5.67*10**-8 W/(m**2*K**4)\n",
"sigma=5.67*10**-8;\n",
"#From the graph of radiation shape factor b/w parallel rectangles F12=0.11\n",
"F12=0.11;#View factor\n",
"#The rate of heat transfer is given by Q=A1*F12*sigma*(T1**4-T2**4)\n",
"print\"The rate of heat transfer is given by Q=A1*F12*sigma*(T1**4-T2**4) in W\"\n",
"Q=A1*F12*sigma*(T1**4-T2**4)\n",
"print\"Q=\",Q\n",
"print\"Here minus sign indicates that the net heat transfer is from surface2 to surface1\"\n",
"#Surface1 recieves energy only from surface 2,since the surrounding is at 0K.\n",
"#Therefore Q1=A1*Eb1-A2*F21*Eb2\n",
"#This implies Q1 can also be written as A1*sigma*(T1**4-F12*T2**4)\n",
"#From reciprocity theorem F21=F12 (since A1=A2)\n",
"F21=F12;#view factor\n",
"print\"The net rate of energy loss from the surface at 127Â°C if the surrounding other than the two surfaces act as black body at 0K in W\" \n",
"Q1=A1*sigma*(T1**4-F12*T2**4)\n",
"print\"Q1=\",Q1\n",
"#In the case when surrounding is at temprature, Ts=300K ,the energy recieved from the surrounding by the surface 1 has to be considered.\n",
"Ts=300;\n",
"#Applying summation rule of view factors F11+F12+F1s=1\n",
"F11=0;#view factor\n",
"print\"The view factor of surface 1 with respect to surrounding is\"\n",
"F1s=1-F11-F12\n",
"print\"F1s=\",F1s\n",
"#subscript s denotes the surroundings\n",
"#Q1=A1*Eb1-A2*F21*Eb2-As*Fs1*Ebs\n",
"#With the help of reciprocity theorem A2*F21=A1*F12 , As*Fs1=A1*F1s\n",
"#Therefore we can write Q1=A1*sigma*(T1**4-F12*T2**4-F1s*Ts**4)\n",
"print\"The net rate of energy loss from the surface at 127Â°C if the surrounding other than the two surfaces act as black body at 300K in W \"\n",
"Q1=A1*sigma*(T1**4-F12*T2**4-F1s*Ts**4)\n",
"print\"Q1=\",Q1"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex11.7:pg-470"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 11, Example 7\n",
"The net rate of heat transfer per unit area is given Q/A=(sigma*(T1**4-T2**4))/((1/Æ1)+(1/Æ2)-1) in W\n",
"H= 1764.51561476\n",
"The net rate of heat transfer when the two surfaces are black is Q/A=sigma*(T1**4-T2**4) in W\n",
"H= 3276.95757027\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 11, Example 7\"\n",
"#Two parallel infinite surafces are maintained at tempratures T2=200Â°C or 473.15K and T1=300Â°C or 573.15K\n",
"T1=573.15;\n",
"T2=473.15;\n",
"#The emissivity(emi) is 0.7 for both the surfaces which are gray.\n",
"emi1=0.7;\n",
"emi2=0.7;\n",
"#stefan=boltzman constant(sigma)=5.67*10**-8W/(m**2*K**4)\n",
"sigma=5.67*10**-8;\n",
"#The net rate of heat transfer per unit area is given Q/A=(sigma*(T1**4-T2**4))/((1/Æ1)+(1/Æ2)-1)\n",
"#Let Q/A=H\n",
"print\"The net rate of heat transfer per unit area is given Q/A=(sigma*(T1**4-T2**4))/((1/Æ1)+(1/Æ2)-1) in W\"\n",
"H=(sigma*(T1**4-T2**4))/((1/emi1)+(1/emi2)-1)\n",
"print\"H=\",H\n",
"#When the two surfaces are black\n",
"#This implies emiisivity(emi)=1 for both surfaces\n",
"#So,The net rate of heat transfer when the two surfaces are black is Q/A=sigma*(T1**4-T2**4)\n",
"print\"The net rate of heat transfer when the two surfaces are black is Q/A=sigma*(T1**4-T2**4) in W\"\n",
"H=sigma*(T1**4-T2**4)\n",
"print\"H=\",H"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex11.8:pg-482"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 11, Example 8\n",
"The net rate of heat exchange between the spheres when the surfaces are black is Q=A1*sigma*(T1**4-T2**4) in W \n",
"Q= 779.311327631\n",
"The net rate of radiation exchange when one surface is gray and other is diffuse is given by Q1=(A1*sigma*(T1**4-T2**4))/((1/emi1)+(A1/A2)*(1/emi2-1)) in W\n",
"Q1= 346.360590058\n",
"The net rate of radiation exchange when outer surface is assumed to be black body i;e(emi2=1) in W\n",
"Q2= 389.655663816\n",
"Error(E) is given By ((Q2-Q1)/Q1)*100 in percentage\n",
"E= 12.5\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 11, Example 8\"\n",
"#Two concentric spheres of diameters D1=0.5m and D2=1m are separated by an air space.\n",
"#The surface tempratures are T1=400K and T2=300K\n",
"T1=400;\n",
"T2=300;\n",
"D1=0.5;\n",
"D2=1;\n",
"#A1 and A2 are the areas in m**2 of surface 1 and surface 2 respectively\n",
"A1=(math.pi*D1**2);\n",
"A2=(math.pi*D2**2);\n",
"#Stefan-Boltzman constant(sigma)=5.67*10**-8 W/(m**2*K**4)\n",
"sigma=5.67*10**-8;\n",
"#The emissivity is represented by emi \n",
"#The radiation heat exchange in case of two concentric sphere is given by Q=(A1*sigma*(T1**4-T2**4))/((1/emi1)+(A1/A2)*(1/emi2-1)) \n",
"#When the spheres are black emi1=emi2=1\n",
"emi1=1;\n",
"emi2=1;\n",
"#Hence Q=A1*sigma*(T1**4-T2**4)\n",
"print\"The net rate of heat exchange between the spheres when the surfaces are black is Q=A1*sigma*(T1**4-T2**4) in W \"\n",
"Q=A1*sigma*(T1**4-T2**4)\n",
"print\"Q=\",Q\n",
"#The net rate of radiation exchange when one surface is gray and other is diffuse having emi1=0.5 and emi2=0.5 \n",
"emi1=0.5;\n",
"emi2=0.5;\n",
"print\"The net rate of radiation exchange when one surface is gray and other is diffuse is given by Q1=(A1*sigma*(T1**4-T2**4))/((1/emi1)+(A1/A2)*(1/emi2-1)) in W\" \n",
"Q1=(A1*sigma*(T1**4-T2**4))/((1/emi1)+(A1/A2)*(1/emi2-1))\n",
"print\"Q1=\",Q1\n",
"#The net rate of radiation exchange when outer surface is assumed to be black body i;e(emi2=1)\n",
"emi2=1;#emissivity of outer surface\n",
"print\"The net rate of radiation exchange when outer surface is assumed to be black body i;e(emi2=1) in W\"\n",
"Q2=(A1*sigma*(T1**4-T2**4))/((1/emi1)+(A1/A2)*(1/emi2-1))\n",
"print\"Q2=\",Q2\n",
"print\"Error(E) is given By ((Q2-Q1)/Q1)*100 in percentage\"\n",
"E=((Q2-Q1)/Q1)*100\n",
"print\"E=\",E"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex11.10:pg-484"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 11, Example 10\n",
"F12= 0.5\n",
"Equivalent resistance of thermal network (R) is given by R1+((1/R12)+(1/(R13+R23)))**-1+R2\n",
"R= 2.09523809524\n",
"The radiation flux leaving the hot wall is Q/A=[sigma*(T1**4-T2**4)]/(A*R) in W/m**2\n",
"H= 26655.2740483\n"
]
}
],
"source": [
"import math\n",
" \n",
"print\"Introduction to heat transfer by S.K.Som, Chapter 11, Example 10\"\n",
"#Given a furnace which can be approximated as an equuilateral triangle duct\n",
"#The hot wall is maintained at temprature (T1)=1000K and has emmisivity(emi1)=0.75\n",
"#The cold wall is at temprature(T2)=350K and has emmisivity(emi2)=0.7\n",
"T1=1000;\n",
"T2=350;\n",
"emi1=0.75;\n",
"emi2=0.7;\n",
"#Stefan-Boltzman constant(sigma)=5.67*10**-8 W/(m**2*K**4)\n",
"sigma=5.67*10**-8;\n",
"#The third wall is reradiating zone having Q3=0\n",
"#The radiation flux leaving the hot wall is Q/A=(sigma*(T1**4-T2**4))/(A*R)\n",
"#By summation rule F33+F31+F32=1\n",
"#F33=0(in consideration of surface to be plane)\n",
"#From symmetry F31=F32\n",
"F31=0.5;#View factors\n",
"F32=F31;#View factors\n",
"F33=0;#View factors\n",
"#From reciprocity theorem F13=F31 and F23=F32=0.5 (since A1=A2=A3=A)\n",
"F13=F31;#View factors\n",
"F23=F32;#View factors\n",
"#Again F11+F12+F13=1 from summation rule\n",
"F11=0;#View factors\n",
"F12=1-F13-F11;#View factors\n",
"print\"F12=\",F12\n",
"#R1,R2,R12,R13,R23 are the resistances\n",
"#R is equivalent resistance of thermal network is given by R1+((1/R12)+(1/(R13+R23)))**-1+R2\n",
"R1=(1-emi1)/(emi1);\n",
"R2=(1-emi2)/(emi2);\n",
"R12=1/(F12);\n",
"R13=1/(F13);\n",
"R23=1/(F23);\n",
"#R is equivalent resistance of thermal network \n",
"print\"Equivalent resistance of thermal network (R) is given by R1+((1/R12)+(1/(R13+R23)))**-1+R2\"\n",
"R=R1+((1/R12)+(1/(R13+R23)))**-1+R2\n",
"print\"R=\",R\n",
"#The radiation flux leaving the hot wall is Q/A.\n",
"print\"The radiation flux leaving the hot wall is Q/A=[sigma*(T1**4-T2**4)]/(A*R) in W/m**2\"\n",
"#Since A gets cancelled in the factor (A*R)\n",
"#So Q/A=(sigma*(T1**4-T2**4))/(R)\n",
"#Let Q/A=H\n",
"H=(sigma*(T1**4-T2**4))/(R)\n",
"print\"H=\",H"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKfqJ^)tL'L'-Introduction to Heat Transfer/chapter12.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter 12:Principles of mass transfer"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex12.1:pg-496"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 12, Example 1\n",
"The flow area is given by A=(pi*di**2)/4 in m**2\n",
"3e-05\n",
"The molar concentration of mixture which is constant throughout is given by c=p/(R*T)\n",
"0.04079\n",
"Nhe=Nair=(A*c*Db*(Yao-yal))/L in kmol/sec\n",
"mass flow rate of helium is given by m=Mhe*Nhe in kg/sec \n",
"1.7e-11\n",
"mass flow rate of air is given by m=Mair*Nair in kg/sec \n",
"1.2e-10\n"
]
}
],
"source": [
"import math\n",
"\n",
"print \"Introduction to heat transfer by S.K.Som, Chapter 12, Example 1\"\n",
"#The pressure in the pipeline that transports helium gas at a rate of 4kg/s is maintained at pressure(p)=1 atm or 101*10**3 pascal.\n",
"#The internal daimeter of tube is (di)=6mm or .006m\n",
"#The temprature of both air and helium is (T)=25°C or 298 K.\n",
"#The diffusion coefficient of helium in air at normal atmosphere is(Dab)=7.20*10**-5 m**2/s\n",
"#The venting tube extends to a length(L)=20m in the atmosphere.\n",
"di=.006;\n",
"print \"The flow area is given by A=(pi*di**2)/4 in m**2\"\n",
"A=(math.pi*di**2)/4\n",
"print round(A,5)\n",
"p=101*10**3;\n",
"R=8.31*10**3;#gas constant\n",
"T=298;\n",
"Dab=7.20*10**-5;\n",
"L=20;\n",
"#c is the molar concentration\n",
"print \"The molar concentration of mixture which is constant throughout is given by c=p/(R*T)\"\n",
"c=p/(R*T)\n",
"print round(c,5)\n",
"#helium has been considered as species A so (helium mole fraction at the bottom of the tube)is Yao=1 and (helium mole fraction at the bottom of the tube)is Yal=0\n",
"Yal=0;\n",
"Yao=1;\n",
"#Nhe and Nair are molar rate of helium and air respectively\n",
"print \"Nhe=Nair=(A*c*Db*(Yao-yal))/L in kmol/sec\"\n",
"Nair=(A*c*Dab*(Yao-Yal))/L\n",
"Nhe=Nair;\n",
"#Molecular weights of air and helium are 29kg/kmol and 4 kg/kmol respectively.\n",
"Mhe=4;\n",
"Mair=29;\n",
"#mass flow rate of helium is mhe\n",
"print \"mass flow rate of helium is given by m=Mhe*Nhe in kg/sec \"\n",
"mhe=Mhe*Nhe\n",
"print round(mhe,12)\n",
"#mass flow rate of air is mair\n",
"print \"mass flow rate of air is given by m=Mair*Nair in kg/sec \"\n",
"mair=Mair*Nair\n",
"print round(mair,11)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex12.2:pg-500"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 12, Example 2\n",
"The film temperature is given by Tf=(T+Tw)/2 in °C \n",
"30.0\n",
"The density of water at bulb surface is given by rhos=(Ps*M)/(R*Ts) in kg/m**3 \n",
"0.0173\n",
"The concentration of water vapour at free stream is rhoinf=rhos-(hheat/hmass)*((Tinf-Ts)/hfg) in kg/m**3 \n",
"0.00784\n",
"The relative humidity is given by rehu=(rhoinf/rhosteam)*100 in percentage \n",
"15.38028\n"
]
}
],
"source": [
"import math\n",
"print \"Introduction to heat transfer by S.K.Som, Chapter 12, Example 2\"\n",
"#The temprature of atmospheric air (T)=40°C which flows over a wet bulb thermometer.\n",
"#The reading of wet bulb thermometer which is called the wet bulb temprature is (Tw)=20°C\n",
"T=40;\n",
"Tw=20.0;\n",
"#Tf is the film temprature\n",
"print \"The film temperature is given by Tf=(T+Tw)/2 in °C \"\n",
"Tf=(T+Tw)/2\n",
"print round(Tf,5)\n",
"Tinf=T;#surrounding temprature\n",
"#The properties of air at film temprature are density(rho=1.13kg/m**3),specific heat(cp=1.007kJ/(kg*K)),Thermal diffusivity(alpha=0.241*10**-4m**2/s)\n",
"#The diffusivity Dab=0.26*10**-4 m**2/s\n",
"#The enthalpy of vaporisation of water at 20°C is hfg=2407kJ/kg or 2407*10**3 J/kg\n",
"#The partial pressure of water vapour is the saturation pressure corresponding to 20°C so from steam table Ps=2.34kPa or 2.34*10**3 Pa.\n",
"rho=1.13;\n",
"cp=1.007*10**3;\n",
"alpha=0.241*10**-4;\n",
"Dab=0.26*10**-4;\n",
"hfg=2407*10**3;\n",
"Ps=2.34*10**3;\n",
"#The temprature at bulb surface Ts=20°C or 293K\n",
"Ts=Tw+273;#in kelvin\n",
"R=8.31*10**3;#gas constant\n",
"#The molecular weight of water is M=18\n",
"M=18;\n",
"#The density of water at bulb surface is rhos\n",
"print \"The density of water at bulb surface is given by rhos=(Ps*M)/(R*Ts) in kg/m**3 \"\n",
"rhos=(Ps*M)/(R*Ts)\n",
"print round(rhos,5)\n",
"#Let X=hheat/hmass=rho*cp*(alpha/Dab)**(2/3).\n",
"X=rho*cp*(alpha/Dab)**(2/3);\n",
"#At steady atate (Rate of heat transfer from air to wet cover of thermometer bulb)=(Heat removed by evaporation of water from the wet cover of thermometer bulb)\n",
"#hheat*(Tinf-Ts)=hmass*(rhos-rhoinf)*hfg\n",
"#Rearranging above we get rhoinf=rhos-(hheat/hmass)*((Tinf-Ts)/hfg)\n",
"#The concentration of water vapour at free stream is rhoinf\n",
"print \"The concentration of water vapour at free stream is rhoinf=rhos-(hheat/hmass)*((Tinf-Ts)/hfg) in kg/m**3 \"\n",
"rhoinf=rhos-((X)*((Tinf-Tw)/hfg))\n",
"print round(rhoinf,5)\n",
"#The mass concentration of saturated water vapour(rhosteam) at 40°C(as found from steam table) is .051 kg/m**3\n",
"rhosteam=.051;\n",
"#The relative humidity is (rehu)\n",
"print \"The relative humidity is given by rehu=(rhoinf/rhosteam)*100 in percentage \"\n",
"rehu=(rhoinf/rhosteam)*100\n",
"print round(rehu,5)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Ex12.3:pg-503"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Introduction to heat transfer by S.K.Som, Chapter 12, Example 3\n",
"The mole fraction of water vapour at the interface is given by Yao=pvapour/p\n",
"0.03963\n",
"The total molecular concentration (c) through the tube remains constant is given by c=p/(R*T) in kmol/m**3\n",
"0.03286\n",
"The cross sectional area of the tube is given by A=(pi*(di*10**-3)**2)/4 in m**2\n",
"0.00096\n",
"The molar flow rate of water vapour is given by N=mdot/M in kmol/s\n",
"1e-10\n",
"The diffusion coefficient of water vapour is Dab=(N*L)/(c*A*ln[(1-Yal)/(1-Yao)]) in m/s\n",
"3e-05\n"
]
}
],
"source": [
"import math\n",
"\n",
"print \"Introduction to heat transfer by S.K.Som, Chapter 12, Example 3\"\n",
"#The diameter of tube is (di)=35mm which measures binary diffusion coefficient of water vapour in air at temprature,T=20°C or 293 K.\n",
"#The measurement is done at height of 1500 m where the atmospheric pressure is (p)=80kPa.\n",
"p=80;\n",
"T=293.0;\n",
"#The distance from the water surface to the open end of the tube is L=500 mm or 0.5m.\n",
"L=.5;\n",
"#After t=12 days of continuous operation at constant pressure and temprature the amount of water evaporated was measured to be m= 1.2*10**-3kg.\n",
"m= 1.2*10**-3;\n",
"#From the steam table pvapour=3.17kPa\n",
"pvapour=3.17;#partial pressure of vapour\n",
"#Yao is the mole fraction of water vapour at the interface\n",
"print \"The mole fraction of water vapour at the interface is given by Yao=pvapour/p\"\n",
"Yao=pvapour/p\n",
"print round(Yao,5)\n",
"#The mole fraction of water vapour at the top end of the tube is Yal=0\n",
"Yal=0;\n",
"R=8.31*10**3;#gas constant\n",
"#The total molecular concentration is (c)\n",
"print \"The total molecular concentration (c) through the tube remains constant is given by c=p/(R*T) in kmol/m**3\"\n",
"c=(p*10**3)/(R*T)\n",
"print round(c,5)\n",
"di=35;\n",
"#A is the cross sectional area of the tube\n",
"print \"The cross sectional area of the tube is given by A=(pi*(di*10**-3)**2)/4 in m**2\"\n",
"A=(math.pi*(di*10**-3)**2)/4\n",
"print round(A,5)\n",
"#The molecular weight of wate is M=18\n",
"M=18;\n",
"#The mass flow rate is given by mdot=(m/(12*24*3600))\n",
"mdot=(m/(12*24*3600));\n",
"#N is the molar flow rate of water vapour\n",
"print \"The molar flow rate of water vapour is given by N=mdot/M in kmol/s\"\n",
"N=mdot/M\n",
"print round(N,10)\n",
"#The molar flow rate of water vapour can also be written as N=(c*Dab*A*ln[(1-Yal)/(1-Yao)])/L\n",
"#The diffusion coefficient of water vapour is Dab=(N*L)/(c*A*ln[(1-Yal)/(1-Yao)])\n",
"#let us take X=math.log10((1-Yal)/(1-Yao)) and Y=math.log10(2.7182)\n",
"X=math.log10((1-Yal)/(1-Yao));\n",
"Y=math.log10(2.7182);\n",
"#ln[(1-Yal)/(1-Yao)] is given by\n",
"ln=X/Y;\n",
"print \"The diffusion coefficient of water vapour is Dab=(N*L)/(c*A*ln[(1-Yal)/(1-Yao)]) in m/s\"\n",
"Dab=(N*L)/(c*A*ln)\n",
"print round(Dab,5)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.11"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
PKfqJ>-_Introduction to Heat Transfer/Chapter11.ipynbPKfqJ^)tL'L'-Introduction to Heat Transfer/chapter12.ipynbPK;