import math
#Operating Conditions
Ts = 70+273.; #[K] Surface Temperature
Tsurr = 25+273.; #[K] Surrounding Temperature
v1 = 0; #[m/s] Velocity of free air
v2 = 5; #[m/s] Velocity of free air
L = .25; #[m] length
#calculations and results
#Table A.4 Air Properties T = 320 K
uv = 17.95*math.pow(10,-6); #[m^2/s] Kinematic Viscosity
be = 3.12*math.pow(10,-3); #[K^-1] Tf^-1
Pr = 269; # Prandtl number
g = 9.81; #[m^2/s]gravitational constt
Gr = g*be*(Ts-Tsurr)*L*L*L/(uv*uv);
del1 = 6*L/math.pow((Gr/4),.25);
print '%s %.3f %s' %("\n Boundary Layer thickness at trailing edge for no air stream",del1,"m");
Re = v2*L/uv;
print '%s %.2e %s' %("\n\n For air stream at 5 m/s As the Reynolds Number is ",Re,"the free convection boundary layer is Laminar");
del2 = 5*L/math.pow((Re),.5);
print '%s %.4f %s' %("\n Boundary Layer thickness at trailing edge for air stream at 5 m/s is",del2,"m");
#END
import math
#Operating Conditions
Ts = 232+273.; #[K] Surface Temperature
Tsurr = 23+273.; #[K] Surrounding Temperature
L = .71; #[m] length
w = 1.02; #[m] Width
#Table A.4 Air Properties T = 400 K
k = 33.8*math.pow(10,-3) ;#[W/m.K]
uv = 26.4*math.pow(10,-6) ;#[m^2/s] Kinematic Viscosity
al = 38.3*math.pow(10,-6) ;#[m^2/s]
be = 2.5*math.pow(10,-3) ;#[K^-1] Tf^-1
Pr = .69 ;# Prandtl number
g = 9.81 ;#[m^2/s] gravitational constt
#calculations and results
Ra = g*be*(Ts-Tsurr)/al*L*L*L/uv;
print '%s %.2e %s' %("\n\n As the Rayleigh Number is",Ra,"the free convection boundary layer is turbulent");
#From equatiom 9.23
Nu = math.pow(.825 + .387*math.pow(Ra,.16667) /math.pow((1+math.pow((.492/Pr),(9./16.))),(8./27.)),2);
h = Nu*k/L;
q = h*L*w*(Ts-Tsurr);
print '%s %d %s' %("\n Heat transfer by convection between screen and room air is",q,"W");
#END
import math
#Operating Conditions
Ts = 45+273.; #[K] Surface Temperature
Tsurr = 15+273. ;#[K] Surrounding Temperature
H = .3 ;#[m] Height
w = .75 ;#[m] Width
#Table A.4 Air Properties T = 303 K
k = 26.5*math.pow(10,-3) ;#[W/m.K]
uv = 16.2*math.pow(10,-6) ;#[m^2/s] Kinematic Viscosity
al = 22.9*math.pow(10,-6) ;#[m^2/s] alpha
be = 3.3*math.pow(10,-3) ;#[K^-1] Tf^-1
Pr = .71 ;# Prandtl number
g = 9.81 ;#[m^2/s] gravitational constt
#calculations
Ra = g*be*(Ts-Tsurr)/al*H*H*H/uv; #Length = Height
#From equatiom 9.27
Nu = (.68 + .67*math.pow(Ra,.25) /math.pow((1+math.pow((.492/Pr),(9./16.))),(4./9.)));
#for Sides
hs = Nu*k/H;
Ra2 = g*be*(Ts-Tsurr)/al*(w/2.)*(w/2.)*(w/2.)/uv; #Length = w/2
#For top eq 9.31
ht = k/(w/2.)*.15*math.pow(Ra2,.3334);
#For bottom Eq 9.32
hb = k/(w/2.)*.27*math.pow(Ra2,.25);
q = (2*hs*H+ht*w+hb*w)*(Ts-Tsurr);
#results
print '%s %d %s' %("\n Rate of heat loss per unit length of duct is",q," W/m");
#END
import math
#Operating Conditions
Ts = 165+273.; #[K] Surface Temperature
Tsurr = 23+273.; #[K] Surrounding Temperature
D = .1 ;#[m] Diameter
e = .85 ;# emissivity
stfncnstt=5.67*math.pow(10,(-8))# [W/m^2.K^4] - Stefan Boltzmann Constant
#Table A.4 Air Properties T = 303 K
k = 31.3*math.pow(10,-3) ;#[W/m.K] Conductivity
uv = 22.8*math.pow(10,-6) ;#[m^2/s] Kinematic Viscosity
al = 32.8*math.pow(10,-6) ;#[m^2/s] alpha
be = 2.725*math.pow(10,-3) ;#[K^-1] Tf^-1
Pr = .697 ;# Prandtl number
g = 9.81 ;#[m^2/s] gravitational constt
#calculations
Ra = g*be*(Ts-Tsurr)/al*D*D*D/uv;
#From equatiom 9.34
Nu = math.pow((.60 + .387*math.pow(Ra,(1./6.))/math.pow(1+math.pow((.559/Pr),(9./16.)),(8./27.))),2);
h = Nu*k/D;
qconv = h*math.pi*D*(Ts-Tsurr);
qrad = e*math.pi*D*stfncnstt*(Ts*Ts*Ts*Ts-Tsurr*Tsurr*Tsurr*Tsurr);
#results
print '%s %d %s' %("\n Rate of heat loss per unit length of pipe is ",qrad+qconv,"W/m");
#END
import math
#Operating Conditions
To = 35+273. ;#[K] Shield Temperature
Ti = 120+273. ;#[K] Tube Temperature
Di = .1 ;#[m] Diameter inner
Do = .12 ;#[m] Diameter outer
L = .01 ;#[m] air gap insulation
#Table A.4 Air Properties T = 350 K
k = 30*math.pow(10,-3) ;#[W/m.K] Conductivity
uv = 20.92*math.pow(10,-6) ;#[m^2/s] Kinematic Viscosity
al = 29.9*math.pow(10,-6) ;#[m^2/s] alpha
be = 2.85*math.pow(10,-3) ;#[K^-1] Tf^-1
Pr = .7 ;# Prandtl number
g = 9.81 ;#[m^2/s] gravitational constt
#Table A.3 Insulation glass fiber T=300K
kins = .038 ;#[W/m.K] Conductivity
#calculations
Lc = 2*math.pow((2.303*math.log10(Do/Di)),(4./3.))/math.pow((math.pow((Di/2.),(-3./5.))+math.pow((Do/2.),(-3./5.))),(5./3.));
Ra = g*be*(Ti-To)/al*Lc*Lc*Lc/uv;
keff = .386*k*math.pow((Pr/(.861+Pr)),.25) *math.pow(Ra,.25);
q = 2*math.pi*keff*(Ti-To)/(2.303*math.log10(Do/Di));
#From equatiom 9.58 and 3.27
qin = q*kins/keff;
#results
print '%s %d %s' %("\n Heat Loss from pipe per unit of length is ",q,"W/m")
print '%s %d %s' %(" \n Heat Loss if air is filled with glass-fiber blanket insulation",qin,"W/m");
#END