import math
#Operating Conditions
v = 10; #[m/s] Air velocity
p = 6000; #[N/m^2] Air pressure
Tsurr = 300+273.; #[K] Surrounding Air Temperature
L = .5; #[m] Length of plate
Ts = 27+273.; #[K] Surface Temp
#Table A.4 Air Properties at T = 437K
uv = 30.84*math.pow(10,-6)*(101325./6000.); #[m^2/s] Kinematic Viscosity at P = 6000 N/m^2
k = 36.4*math.pow(10,-3); #[W/m.K] Thermal COnductivity
Pr = .687; #Prandtl number
#calculations
Re = v*L/uv; #Reynolds number
print '%s %d %s' %("\n Since Reynolds Number is",Re,", The flow is laminar over the entire plate");
#Correlation 7.30
NuL = .664*math.pow(Re,.5)*math.pow(Pr,0.3334); #Nusselt Number over entire plate length
hL = NuL*k/L; # Average Convection Coefficient
#Required cooling rate per unit width of plate
q = hL*L*(Tsurr-Ts);
#results
print '%s %d %s' %("\n\n Required cooling rate per unit width of plate =",q," W/m");
#END
import math
#Operating Conditions
v = 60; #[m/s] Air velocity
Tsurr = 25+273.; #[K] Surrounding Air Temperature
w = 1; #[m] Width of plate
L = .05; #[m] Length of stripper
Ts = 230+273.; #[K] Surface Temp
#Table A.4 Air Properties at T = 400K
uv = 26.41*math.pow(10,-6); #[m^2/s] Kinematic Viscosity
k = .0338; #[W/m.K] Thermal COnductivity
Pr = .690; #Prandtl number
#calculations
Re = v*L/uv; #Reynolds number
Rexc = 5*math.pow(10,5); #Transition Reynolds Number
xc = uv*Rexc/v; #Transition Length
#results
print '%s %d' %("\n Reynolds Number based on length L = .05m is ",Re)
print '%s %.2f %s' %("\n And the transition occur at xc =",xc," m ie fifth plate");
#For first heater
#Correlation 7.30
Nu1 = .664*math.pow(Re,0.5)*math.pow(Pr,0.3334); #Nusselt Number
h1 = Nu1*k/L; # Average Convection Coefficient
q1 = h1*(L*w)*(Ts-Tsurr); # Convective Heat exchange
#For first four heaters
Re4 = 4*Re;
L4 = 4*L;
Nu4 = .664*math.pow(Re4,0.5)*math.pow(Pr,0.3334); #Nusselt Number
h4 = Nu4*k/L4; # Average Convection Coefficient
print(h4)
#For Fifth heater from Eqn 7.38
Re5 = 5*Re;
A = 871;
L5 = 5*L;
Nu5 = (.037*math.pow(Re5,.8)-A)*math.pow(Pr,.3334); #Nusselt Number
h5 = Nu5*k/L5; # Average Convection Coefficient
q5 = (h5*L5-h4*L4)*w*(Ts-Tsurr);
#For Sixth heater from Eqn 7.38
Re6 = 6*Re;
L6 = 6*L;
Nu6 = (.037*math.pow(Re6,.8)-A)*math.pow(Pr,.3334) ; #Nusselt Number
h6 = Nu6*k/L6 ; # Average Convection Coefficient
q6 = (h6*L6-h5*L5)*w*(Ts-Tsurr);
print '%s %d %s %d %s %d %s' %("\n\n Power requirement are \n qconv1 = ",q1,"W qconv5 =",q5," W qconv6 = ",q6,"W");
print '%s %d %s %d %s %d %s' %("\n Hence",q6,">",q1," >",q5,"and the sixth plate has largest power requirement");
#END
import math
#Operating Conditions
v = 2; #[m/s] Air velocity
Tsurr = 25+273.; #[K] Surrounding Air Temperature
H = .5; # Humidity
w = 6; #[m] Width of pool
L1 = 12; #[m] Length of pool
e = 1.5; #[m] Deck Wide
Ts = 25+273.; #[K] Surface Temp of water
#calculations
#Table A.4 Air Properties at T = 298K
uv = 15.7*math.pow(10,-6); #[m^2/s] Kinematic Viscosity
#Table A.8 Water vapor-Air Properties at T = 298K
Dab = .26*math.pow(10,-4); #[m^2/s] Diffusion Coefficient
Sc = uv/Dab;
#Table A.6 Air Properties at T = 298K
rho = .0226; #[kg/m^3]
L = L1+e;
Re = v*L/uv; #Reynolds number
#Equation 7.41 yields
ShLe = .037*math.pow(Re,.8)*math.pow(Sc,.3334);
#Equation 7.44
p = 8.; #Turbulent Flow
ShL = (L/(L-e))*ShLe*math.pow((1-math.pow((e/L),((p+1)/(p+2)))),(p/(p+1)));
hmL = ShL*(Dab/L);
n = hmL*(L1*w)*rho*(1-H);
#results
print '%s %.2e %s' %("\n Reynolds Number is ",Re,". Hence for turbulent Flow p = 8 in Equation 7.44.")
print '%s %d %s' %("\n Daily Water Loss due to evaporation is",n*86400. ,"kg/day");
#END
import math
#Operating Conditions
v = 10; #[m/s] Air velocity
Tsurr = 26.2+273.; #[K] Surrounding Air Temperature
P = 46.; # [W] Power dissipation
L = .094; #[m] Length of cylinder
D = .0127; #[m] Diameter of cylinder
Ts = 128.4+273.; #[K] Surface Temp of water
q = 46.15*46; #[W] Actual power dissipation without the 15% loss
#Table A.4 Air Properties at T = 300K
uv = 15.89*math.pow(10,-6); #[m^2/s] Kinematic Viscosity
k = 26.3*math.pow(10,-3); #[W/m.K] Thermal conductivity
Pr = .707; #Prandtl Number
#Table A.4 Air Properties at T = 401K
Prs = .690; #Prandtl Number
#calculations
A = math.pi*D*L;
h = q/(A*(Ts-Tsurr));
Re = v*D/uv; #Reynolds number
#Using Zukauskas Relation, Equation 7.53
C = .26;
m = .6;
n = .37;
Nu = C*math.pow(Re,m)*math.pow(Pr,n)*math.pow((Pr/Prs),.25);
havg = Nu*k/D;
#results
print '%s %d %s' %("\n Convection Coefficient associated with operating conditions",h,"W/m^2.K.")
print '%s %d %s' %("\n Reynolds Number is ",Re,". Hence taking suitable corresponding data from Table 7.4.")
print '%s %d %s' %("\n Convection Coefficient from an appropriate Zukauskas correlation",havg," W/m^2.K");
#END
import math
#Operating Conditions
v = 23; #[m/s] Air velocity
Tsurr = 296.; #[K] Surrounding Air Temperature
L = .8; #[m] Length of cylinder
Di = .1; #[m] Diameter of cylinder
t = .005; #[m] Thickness of cylinder
#Table A.4 Air Properties at T = 285K
uv = 14.56*math.pow(10,-6); #[m^2/s] Kinematic Viscosity
k = 25.2*math.pow(10,-3); #[W/m.K] Thermal conductivity
Pr = .712; #Prandtl Number
#Table A.1 AISI 316 Stainless steel Properties at T = 300K
kss = 13.4; #[W/m.K]Conductivity
pH2 = 1.01; #[N]
Ti = -3550/(2.30*math.log10(pH2) - 12.9);
Eg = -(1.35*math.pow(10,-4))*(29.5*math.pow(10,6));
#calculations
Re = v*(Di+2*t)/uv; #Reynolds number
# Equation 7.54
Nu = .3+.62*math.pow(Re,.5)*math.pow(Pr,.3334) /math.pow((1+math.pow((.4/Pr),.6668)),.25) *math.pow(1+math.pow((Re/282000.),(5./8.)),.8);
h = Nu*k/(Di+2*t);
qconv = (Tsurr-Ti)/((1/(math.pi*L*(Di+2*t)*h))+(2.30*math.log10((Di+2*t)/Di)/(2*math.pi*kss*L)));
#results
print '%s %d %s' %("\n Additional Thermal Energy must be supplied to canister to mainatin steady-state operating temperatue",-qconv-Eg,"W");
#END
import math
#Operating Conditions
v = 10; #[m/s] Air velocity
Tsurr = 23+273.; #[K] Surrounding Air Temperature
D = .01; #[m] Diameter of sphere
Ti = 75+273.; #[K] Initial temp
Tt = 35+273.; #[K] Temperature after time t
p = 1; #[atm]
#Table A.1 Copper at T = 328K
rho = 8933; #[kg/m^3] Density
k = 399; #[W/m.K] Conductivity
cp = 388; #[J/kg.K] specific
#Table A.4 Air Properties T = 296 K
u = 182.6*math.pow(10,-7); #[N.s/m^2] Viscosity
uv = 15.53*math.pow(10,-6); #[m^2/s] Kinematic Viscosity
k = 25.1*math.pow(10,-3); #[W/m.K] Thermal conductivity
Pr = .708; #Prandtl Number
#Table A.4 Air Properties T = 328 K
u2 = 197.8*math.pow(10,-7); #[N.s/m^2] Viscosity
#calculations
Re = v*D/uv; #Reynolds number
#Using Equation 7.56
Nu = 2+(0.4*math.pow(Re,.5) + 0.06*math.pow(Re,.668))*math.pow(Pr,.4)*math.pow((u/u2),.25);
h = Nu*k/D;
#From equation 5.4 and 5.5
t = rho*cp*D*2.30*math.log10((Ti-Tsurr)/(Tt-Tsurr))/(6*h);
#results
print '%s %.1f %s' %("\nTime required for cooling is",t,"sec");
#END
import math
#Operating Conditions
v = 6; #[m/s] Air velocity
Tsurr = 15+273.; #[K] Surrounding Air Temperature
D = .0164; #[m] Diameter of tube
Ts = 70+273.; #[K] Temp of tube
#Staggered arrangement dimensions
St = .0313; #[m]
Sl = .0343; #[m]
#Table A.4 Air Properties T = 288 K
rho = 1.217; #[kg/m^3] Density
cp = 1007; #[J/kg.K] specific heat
uv = 14.82*math.pow(10,-6); #[m^2/s] Kinematic Viscosity
k = 25.3*math.pow(10,-3); #[W/m.K] Thermal conductivity
Pr = .71; #Prandtl Number
#Table A.4 Air Properties T = 343 K
Pr2 = .701; #Prandtl Number
#Table A.4 Air Properties T = 316 K
uv3 = 17.4*math.pow(10,-6); #[m^2/s] Kinematic Viscosity
k3 = 27.4*math.pow(10,-3); #[W/m.K] Thermal conductivity
Pr3 = .705; #Prandtl Number
#calculations
Sd = math.pow((Sl*Sl + (St/2)*(St/2)),.5);
Vmax = St*v/(St-D);
Re = Vmax*D/uv; #Reynolds number
C = .35*math.pow((St/Sl),.2);
m = .6;
C2 = .95;
N = 56;
Nt = 8;
#Using Equation 7.64 & 7.65
Nu = C2*C*math.pow(Re,m)* math.pow(Pr,.36) *math.pow((Pr/Pr2),.25);
h = Nu*k/D;
#From Eqnn 7.67
Tso = (Ts-Tsurr)*math.exp(-(math.pi*D*N*h)/(rho*v*Nt*St*cp));
Tlm = ((Ts-Tsurr) - Tso)/(2.30*math.log10((Ts-Tsurr)/Tso));
q = N*(h*math.pi*D*Tlm);
Pt = St/D;
#From Fig 7.14
X = 1.04;
f = .35;
NL = 7;
press = NL*X*(rho*Vmax*Vmax/2.)*f;
#results
print '%s %.1f %s' %("\n Air side Convection coefficient h = ",h,"W/m^2.k");
print '%s %.1f %s' %("\n and Heat rate q = ",q/1000. ," kW/m");
print '%s %.2e %s' %(" \n Pressure Drop =",press/100000. ," bars");
#END