import math
# (1) Sphere within Cube
F12a = 1 ;#By Inspection
F21a = (math.pi/6.)*F12a ; #By Reciprocity
#calculations
# (2) Partition within a Square Duct
F11b = 0 ;#By Inspection
#By Symmetry F12 = F13
F12b = (1-F11b)/2. ; #By Summation Rule
F21b = math.sqrt(2.)*F12b ; #By Reciprocity
# (3) Circular Tube
#From Table 13.2 or 13.5, with r3/L = 0.5 and L/r1 = 2
F13c = .172;
F11c = 0; #By Inspection
F12c = 1 - F11c - F13c ;#By Summation Rule
F21c = F12c/4. ;#By Reciprocity
#results
print' %s' %('\n Desired View Factors may be obtained from inspection, the reciprocity rule, the summation rule and/or use of charts')
print '%s %.3f' %('\n (1) Sphere within Cube F21 =',F21a)
print '%s %.3f' %('\n (2) Partition within a Square Duct F21 = ',F21b)
print '%s %.3f' %('\n (3) Circular Tube F21 =',F21c);
import math
import numpy
from numpy import linalg
L = 10 ;#[m] Collector length = Heater Length
T2 = 600 ;#[K] Temperature of curved surface
A2 = 15 ;#[m^2] Area of curved surface
e2 = .5 ;# emissivity of curved surface
stfncnstt = 5.67*math.pow(10,-8); #[W/m^2.K^4] Stefan-Boltzmann constant
T1 = 1000 ;#[K] Temperature of heater
A1 = 10 ;#[m^2] area of heater
e1 = .9 ;# emissivity of heater
W = 1 ;#[m] Width of heater
H = 1 ;#[m] Height
T3 = 300 ;#[K] Temperature of surrounding
e3 = 1 ;# emissivity of surrounding
#calculations
J3 = stfncnstt*T3*T3*T3*T3; #[W/m^2]
#From Figure 13.4 or Table 13.2, with Y/L = 10 and X/L =1
F12 = .39;
F13 = 1 - F12; #By Summation Rule
#For a hypothetical surface A2h
A2h = L*W;
F2h3 = F13; #By Symmetry
F23 = A2h/A2*F13; #By reciprocity
Eb1 = stfncnstt*T1*T1*T1*T1;#[W/m^2]
Eb2 = stfncnstt*T2*T2*T2*T2;#[W/m^2]
#Radiation network analysis at Node corresponding 1
#-10J1 + 0.39J2 = -510582
#.26J1 - 1.67J2 = -7536
#Solving above equations
A = ([[-10 ,.39],
[.26, -1.67]]);
B = ([[-510582.],
[-7536.]]);
X = numpy.linalg.solve (A,B);
q2 = (Eb2 - X[1])/(1-e2)*(e2*A2);
#results
print '%s %.1f %s' %('\n Net Heat transfer rate to the absorber is = ',q2/1000. ,'kW');
import math
T3 = 300. ;#[K] Temperature of surrounding
L = .15 ;#[m] Furnace Length
T2 = 1650+273. ;#[K] Temperature of bottom surface
T1 = 1350+273. ;#[K] Temperature of sides of furnace
D = .075 ;#[m] Diameter of furnace
stfncnstt = 5.670*math.pow(10,-8); #[W/m^2.K^4] Stefan Boltzman Constant
#calculations
A2 = math.pi*D*D/4. ;#[m] Area of bottom surface
A1 = math.pi*D*L ;#[m] Area of curved sides
#From Figure 13.5 or Table 13.2, with ri/L = .25
F23 = .056;
F21 = 1 - F23; #By Summation Rule
F12 = A2/A1*F21; #By reciprocity
F13 = F12 ;#By Symmetry
#From Equation 13.17 Heat balance
q = A1*F13*stfncnstt*(T1*T1*T1*T1 - T3*T3*T3*T3) + A2*F23*stfncnstt*(T2*T2*T2*T2 - T3*T3*T3*T3);
#results
print '%s %d %s' %('\n Power required to maintain prescribed temperatures is =',q, 'W');
import math
T2 = 300 ;#[K] Temperature of inner surface
D2 = .05 ;#[m] Diameter of Inner Surface
e2 = .05 ;# emissivity of Inner Surface
T1 = 77 ;#[K] Temperature of Outer Surface
D1 = .02 ;#[m] Diameter of Inner Surface
e1 = .02 ;# emissivity of Outer Surface
D3 = .035 ;#[m] Diameter of Shield
e3 = .02 ;# emissivity of Shield
stfncnstt = 5.670*math.pow(10,-8) ;#[W/m^2.K^4] Stefan Boltzman Constant
#calculations
#From Equation 13.20 Heat balance
q = stfncnstt*(math.pi*D1)*(T1*T1*T1*T1-T2*T2*T2*T2)/(1/e1 + (1-e2)/e2*D1/D2) ;#[W/m]
RtotL = (1-e1)/(e1*math.pi*D1) + 1/(math.pi*D1*1) + 2*((1-e3)/(e3*math.pi*D3)) + 1/(math.pi*D3*1) + (1-e2)/(e2*math.pi*D2) ;#[m^-2]
q2 = stfncnstt*(T1*T1*T1*T1 - T2*T2*T2*T2)/RtotL; #[W/m]
#results
print '%s %.2f %s' %('\n Heat gain by the fluid passing through the inner tube =',q,'W/m')
print '%s %.2f %s' %('\n Percentage change in heat gain with radiation shield inserted midway between inner and outer tubes is =',(q2-q)*100/q,'percent');
import math
T2 = 500 ;#[K] Temperature of Painted surface
e2 = .4 ;# emissivity of Painted Surface
T1 = 1200 ;#[K] Temperature of Heated Surface
W = 1 ; #[m] Width of Painted Surface
e1 = .8 ;# emissivity of Heated Surface
er = .8 ;# emissivity of Insulated Surface
stfncnstt = 5.670*math.pow(10,-8);#[W/m^2.K^4] Stefan Boltzman Constant
#By Symmetry Rule
F2R = .5;
F12 = .5;
F1R = .5;
#calculations
#From Equation 13.20 Heat balance
q = stfncnstt*(T1*T1*T1*T1-T2*T2*T2*T2)/((1-e1)/e1*W+ 1/(W*F12+1/((1/W/F1R) + (1/W/F2R))) + (1-e2)/e2*W) ;#[W/m]
#Surface Energy Balance 13.13
J1 = stfncnstt*T1*T1*T1*T1 - (1-e1)*q/(e1*W) ;# [W/m^2] Surface 1
J2 = stfncnstt*T2*T2*T2*T2 - (1-e2)*(-q)/(e2*W) ;# [W/m^2] Surface 2
#From Equation 13.26 Heat balance
JR = (J1+J2)/2.;
TR = math.pow((JR/stfncnstt),.25);
#results
print '%s %.2f %s' %('\n Rate at which heat must be supplied per unit length of duct = ',q/1000.,'kW/m')
print '%s %d %s' %('\n Temperature of the insulated surface = ',TR,'K');
import math
T1 = 1000. ;#[K] Temperature of Heated Surface
e1 = .8 ;# emissivity of Heated Surface
e2 = .8 ; # emissivity of Insulated Surface
r = .02 ;#[m] Radius of surface
Tm = 400 ;#[K] Temperature of surrounding air
m = .01 ;#[kg/s] Flow rate of surrounding air
p = 101325 ;#[Pa] Pressure of surrounding air
stfncnstt = 5.670*math.pow(10,-8);#[W/m^2.K^4] Stefan Boltzman Constant
#Table A.4 Air Properties at 1 atm, 400 K
k = .0338 ;#[W/m.K] conductivity
u = 230*math.pow(10,-7) ;#[kg/s.m] Viscosity
cp = 1014 ;#[J/kg] Specific heat
Pr = .69 ;# Prandtl Number
#calculations and results
#Hydraulic Diameter
Dh = 2*math.pi*r/(math.pi+2.) ;#[m]
#Reynolds number
Re = m*Dh/(math.pi*r*r/2.)/u;
#View Factor
F12 = 1 ;
print '%s %d %s' %("\n As Reynolds Number is",Re,", Hence it is Turbulent flow inside a cylinder. Hence we will use Dittus-Boelter Equation");
#From Dittus-Boelter Equation
Nu = .023*math.pow(Re,.8) *math.pow(Pr,.4);
h = Nu*k/Dh; #[W/m^2.K]
#From Equation 13.18 Heat Energy balance
#Newton Raphson
T2=600; #Initial Assumption
T2=696. #Final answer
#From energy Balance
q = h*math.pi*r*(T2-Tm) + h*2*r*(T1-Tm) ;#[W/m]
print '%s %.2f %s' %('\n Rate at which heat must be supplied per unit length of duct =',q,'W/m')
print '%s %.2f %s' %('& Temperature of the insulated surface =',T2,'K');