import math
print"Introduction to heat transfer by S.K.Som, Chapter 11, Example 3"
print"The view factors F13 and F31 between the surfaces 1 and 3 are "
#Determine the view factors F13 and F31 between the surfaces 1 and 3.
#F1-2,3=F12+F13
#So F13=F1-2,3-F12
#Let F1-2,3=F123
#From Radiation Shape factor b/w two perpendicular rectangles with a commom edge table we get F12=.027,F1-2,3=0.31
F123=0.31;#View factor
F12=.27;#View factor
F13=F123-F12#View factor
print"F13=",F13
#A1,A2 and A3 are the emitting surface areas
#From reciprocity relation F31=(A1/A3)/F13
A1=2;
A3=2.5;
F31=(A1/A3)*F13
print"F31=",F31
import math
print"Introduction to heat transfer by S.K.Som, Chapter 11, Example 4"
#Determine the view factors F14 for the composite surface .
#From the table of radiation shape factor b/w two perpendicular surfaces F1,2-3,4=0.14 and F1,2-3=0.1
#By subdivision of the recieving surfaces we get F1,2-4=F1,2-3,4-F1,2-3
#Let F1,2-4=F124 , F1,2-3,4=F1234 , F1,2-3=F123
F1234=0.14;#View factor
F123=0.1;#View factor
F124=F1234-F123;#View factor
print"F124=",F124
#Again from the table of radiation shape factor b/w two perpendicular surfaces F2-3,4=0.24 , F23=0.18
#Let F2-3,4=F234
F234=0.24;#View factor
F23=0.18;#View factor
#By subdivision of the recieving surfaces we get F24=F2-3,4-F23
F24=F234-F23;#view factor
print"F24=",F24
#A1 and A2 are the emitting surface areas.
A1=12;
A2=12;
#Now by subdivision of emitting surfaces F1,2-4=(1/(A1+A2))*(A1*F14+A2*F24)
#This implies F14=((F1,2-4*(A1+A2)))-A2*F24)/A2
print"The view factor F14=((F1,2-4*(A1+A2)))-A2*F24)/A2"
F14=((F124*(A1+A2))-(A2*F24))/A2
print"F14=",F14
import math
print"Introduction to heat transfer by S.K.Som, Chapter 11, Example 5"
#Consider a cylinder having length,L=2r determine the view factor of cylindrical surface with respect to the base.
#From the graph of radiation shape factor b/w parallel coaxial disks of equal diameter F12=0.16
F12=0.16;#View factor
#By the summation rule of an enclosure F11+F12+F13=1
#But F11=0(since the base surface is flat)
F11=0;#View factor
print"The view factors of cylindrical surface with respect to the base are"
F13=1-F12-F11#view factor
print"F13=",F13
#By making use of reciprocity theorem we have F31=(A1/A2)*F13
#A1 and A2 are emitting surface areas
#A1/A2=(pi*r**2)/(2*pi*r*2*r)=1/4
#Let A1/A2=A
A=1/4;
F31=(A)*F13
print"F31=",F31
import math
print"Introduction to heat transfer by S.K.Som, Chapter 11, Example 6"
#Two rectangles length,L=1.5m by breadth,B=3.0m are parallel and directly opposed.
L=1.5;
B=3;
#They are 3m apart
#Temprature(T1) of surface 1 is 127°C or 400K and temprature(T2) of surface 2 is 327°C or 600K
T1=400;
T2=600;
#Area (A) is the product of L and B
A1=L*B;
#Stefan -Boltzman constant(sigma)=5.67*10**-8 W/(m**2*K**4)
sigma=5.67*10**-8;
#From the graph of radiation shape factor b/w parallel rectangles F12=0.11
F12=0.11;#View factor
#The rate of heat transfer is given by Q=A1*F12*sigma*(T1**4-T2**4)
print"The rate of heat transfer is given by Q=A1*F12*sigma*(T1**4-T2**4) in W"
Q=A1*F12*sigma*(T1**4-T2**4)
print"Q=",Q
print"Here minus sign indicates that the net heat transfer is from surface2 to surface1"
#Surface1 recieves energy only from surface 2,since the surrounding is at 0K.
#Therefore Q1=A1*Eb1-A2*F21*Eb2
#This implies Q1 can also be written as A1*sigma*(T1**4-F12*T2**4)
#From reciprocity theorem F21=F12 (since A1=A2)
F21=F12;#view factor
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"
Q1=A1*sigma*(T1**4-F12*T2**4)
print"Q1=",Q1
#In the case when surrounding is at temprature, Ts=300K ,the energy recieved from the surrounding by the surface 1 has to be considered.
Ts=300;
#Applying summation rule of view factors F11+F12+F1s=1
F11=0;#view factor
print"The view factor of surface 1 with respect to surrounding is"
F1s=1-F11-F12
print"F1s=",F1s
#subscript s denotes the surroundings
#Q1=A1*Eb1-A2*F21*Eb2-As*Fs1*Ebs
#With the help of reciprocity theorem A2*F21=A1*F12 , As*Fs1=A1*F1s
#Therefore we can write Q1=A1*sigma*(T1**4-F12*T2**4-F1s*Ts**4)
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 "
Q1=A1*sigma*(T1**4-F12*T2**4-F1s*Ts**4)
print"Q1=",Q1
import math
print"Introduction to heat transfer by S.K.Som, Chapter 11, Example 7"
#Two parallel infinite surafces are maintained at tempratures T2=200°C or 473.15K and T1=300°C or 573.15K
T1=573.15;
T2=473.15;
#The emissivity(emi) is 0.7 for both the surfaces which are gray.
emi1=0.7;
emi2=0.7;
#stefan=boltzman constant(sigma)=5.67*10**-8W/(m**2*K**4)
sigma=5.67*10**-8;
#The net rate of heat transfer per unit area is given Q/A=(sigma*(T1**4-T2**4))/((1/Æ1)+(1/Æ2)-1)
#Let Q/A=H
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"
H=(sigma*(T1**4-T2**4))/((1/emi1)+(1/emi2)-1)
print"H=",H
#When the two surfaces are black
#This implies emiisivity(emi)=1 for both surfaces
#So,The net rate of heat transfer when the two surfaces are black is Q/A=sigma*(T1**4-T2**4)
print"The net rate of heat transfer when the two surfaces are black is Q/A=sigma*(T1**4-T2**4) in W"
H=sigma*(T1**4-T2**4)
print"H=",H
import math
print"Introduction to heat transfer by S.K.Som, Chapter 11, Example 8"
#Two concentric spheres of diameters D1=0.5m and D2=1m are separated by an air space.
#The surface tempratures are T1=400K and T2=300K
T1=400;
T2=300;
D1=0.5;
D2=1;
#A1 and A2 are the areas in m**2 of surface 1 and surface 2 respectively
A1=(math.pi*D1**2);
A2=(math.pi*D2**2);
#Stefan-Boltzman constant(sigma)=5.67*10**-8 W/(m**2*K**4)
sigma=5.67*10**-8;
#The emissivity is represented by emi
#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))
#When the spheres are black emi1=emi2=1
emi1=1;
emi2=1;
#Hence Q=A1*sigma*(T1**4-T2**4)
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 "
Q=A1*sigma*(T1**4-T2**4)
print"Q=",Q
#The net rate of radiation exchange when one surface is gray and other is diffuse having emi1=0.5 and emi2=0.5
emi1=0.5;
emi2=0.5;
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"
Q1=(A1*sigma*(T1**4-T2**4))/((1/emi1)+(A1/A2)*(1/emi2-1))
print"Q1=",Q1
#The net rate of radiation exchange when outer surface is assumed to be black body i;e(emi2=1)
emi2=1;#emissivity of outer surface
print"The net rate of radiation exchange when outer surface is assumed to be black body i;e(emi2=1) in W"
Q2=(A1*sigma*(T1**4-T2**4))/((1/emi1)+(A1/A2)*(1/emi2-1))
print"Q2=",Q2
print"Error(E) is given By ((Q2-Q1)/Q1)*100 in percentage"
E=((Q2-Q1)/Q1)*100
print"E=",E
import math
print"Introduction to heat transfer by S.K.Som, Chapter 11, Example 10"
#Given a furnace which can be approximated as an equuilateral triangle duct
#The hot wall is maintained at temprature (T1)=1000K and has emmisivity(emi1)=0.75
#The cold wall is at temprature(T2)=350K and has emmisivity(emi2)=0.7
T1=1000;
T2=350;
emi1=0.75;
emi2=0.7;
#Stefan-Boltzman constant(sigma)=5.67*10**-8 W/(m**2*K**4)
sigma=5.67*10**-8;
#The third wall is reradiating zone having Q3=0
#The radiation flux leaving the hot wall is Q/A=(sigma*(T1**4-T2**4))/(A*R)
#By summation rule F33+F31+F32=1
#F33=0(in consideration of surface to be plane)
#From symmetry F31=F32
F31=0.5;#View factors
F32=F31;#View factors
F33=0;#View factors
#From reciprocity theorem F13=F31 and F23=F32=0.5 (since A1=A2=A3=A)
F13=F31;#View factors
F23=F32;#View factors
#Again F11+F12+F13=1 from summation rule
F11=0;#View factors
F12=1-F13-F11;#View factors
print"F12=",F12
#R1,R2,R12,R13,R23 are the resistances
#R is equivalent resistance of thermal network is given by R1+((1/R12)+(1/(R13+R23)))**-1+R2
R1=(1-emi1)/(emi1);
R2=(1-emi2)/(emi2);
R12=1/(F12);
R13=1/(F13);
R23=1/(F23);
#R is equivalent resistance of thermal network
print"Equivalent resistance of thermal network (R) is given by R1+((1/R12)+(1/(R13+R23)))**-1+R2"
R=R1+((1/R12)+(1/(R13+R23)))**-1+R2
print"R=",R
#The radiation flux leaving the hot wall is Q/A.
print"The radiation flux leaving the hot wall is Q/A=[sigma*(T1**4-T2**4)]/(A*R) in W/m**2"
#Since A gets cancelled in the factor (A*R)
#So Q/A=(sigma*(T1**4-T2**4))/(R)
#Let Q/A=H
H=(sigma*(T1**4-T2**4))/(R)
print"H=",H