diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1709 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1709')
85 files changed, 1285 insertions, 0 deletions
diff --git a/1709/CH1/EX1.1/1_1.sce b/1709/CH1/EX1.1/1_1.sce new file mode 100755 index 000000000..4b8693b62 --- /dev/null +++ b/1709/CH1/EX1.1/1_1.sce @@ -0,0 +1,14 @@ +clc
+//Initialization of variables
+d=8 //in
+ir=16 //in
+MW=28.97
+T=70+460 //R
+P=30+14.7 //psia
+//calculations
+V=%pi^2 *d^2 *(d+ir)/4
+V=V*10/12^3
+Rair=1545/MW
+m=P*144*V/(Rair*T)
+//results
+printf("Mass of air = %.2f lbm",m)
diff --git a/1709/CH1/EX1.2/1_2.sce b/1709/CH1/EX1.2/1_2.sce new file mode 100755 index 000000000..cb520d737 --- /dev/null +++ b/1709/CH1/EX1.2/1_2.sce @@ -0,0 +1,19 @@ +clc
+//Initialization of variables
+V=4 //in^3
+P=30 //psia
+T=500//R
+MW=32
+//calculations
+disp("Metric unit conversion,")
+V=V*2.54^3 *10^-3
+P=30*4.448/(2.54^2 *10^-4)
+T=5*(T-32)/9 +273
+n=P*V/(8314.5*T)
+eta=n*1000
+N=eta*6.025*10^23
+m=eta*MW
+//results
+printf("No. of molecules of oxygen = %.3e molecules",N)
+printf("\n Mass of molecules = %.1f g",m)
+//The answer in the textbook is a bit different due to rounding off error
diff --git a/1709/CH1/EX1.3/1_3.sce b/1709/CH1/EX1.3/1_3.sce new file mode 100755 index 000000000..4b29c042f --- /dev/null +++ b/1709/CH1/EX1.3/1_3.sce @@ -0,0 +1,12 @@ +clc
+//Initialization of variables
+P=14.7 //psia
+T=70+460 //R
+M=32
+//calculations
+Ro=1545/M
+V2=3*Ro*T
+V2=V2*32.174
+vrms=sqrt(V2)
+//results
+printf("rms velocity = %d ft/sec",vrms)
diff --git a/1709/CH10/EX10.1/10_1.sce b/1709/CH10/EX10.1/10_1.sce new file mode 100755 index 000000000..cc50f27f8 --- /dev/null +++ b/1709/CH10/EX10.1/10_1.sce @@ -0,0 +1,14 @@ +clc
+//Initialization of variables
+m=2
+M=28
+M2=32
+PN=300 //psia
+Pt=400 //psia
+//calculations
+nN=m/M
+PO=Pt-PN
+nO=nN*PO/PN
+mO=M2*nO
+//results
+printf("Mass of oxygen added = %.3f lbm",mO)
diff --git a/1709/CH10/EX10.2/10_2.sce b/1709/CH10/EX10.2/10_2.sce new file mode 100755 index 000000000..a97db2a66 --- /dev/null +++ b/1709/CH10/EX10.2/10_2.sce @@ -0,0 +1,12 @@ +clc
+//Initialization of variables
+n=0.0714
+R=1545
+T=560 //R
+P=400 //psia
+//clculations
+VN=n*R*T/(P*144)
+VO=(0.0238)*R*T/(P*144)
+V=VN+VO
+//results
+printf("Total volume = %.3f ft^3",V)
diff --git a/1709/CH10/EX10.3/10_3.sce b/1709/CH10/EX10.3/10_3.sce new file mode 100755 index 000000000..ec1dfb3aa --- /dev/null +++ b/1709/CH10/EX10.3/10_3.sce @@ -0,0 +1,21 @@ +clc
+//Initialization of variables
+m1=5
+m2=2
+cp1=0.248
+cp2=0.203
+T11=300 //F
+T12=100 //F
+P=10 //psia
+Pi=20 //psia
+Pf=15 //psia
+//calculations
+T2=(m1*cp1*T11 + m2*cp2*T12)/(m1*cp1+m2*cp2)
+n1=m1/28
+n2=m2/44
+n=n1+n2
+P1=P*n1/n
+P2=P*n2/n
+dS=m2*(cp2*log((T2+460)/(T12+460)) - 35.1/778 *log(P2/Pi)) +m2*(cp2*log((T2+460)/(T12+460)) - 55.2/778 *log(P1/Pf))
+//results
+printf("change in enthalpy = %.2f B/R",dS)
diff --git a/1709/CH10/EX10.4/10_4.sce b/1709/CH10/EX10.4/10_4.sce new file mode 100755 index 000000000..cc63d38a3 --- /dev/null +++ b/1709/CH10/EX10.4/10_4.sce @@ -0,0 +1,12 @@ +clc
+//Initialization of variables
+Pg=2.8886 //psia
+P=25 //psia
+phi=0.5
+//calculations
+pv=phi*Pg
+pa=P-pv
+w=0.622*pv/pa
+x=(w)/(1+w)
+//results
+printf("Mass fraction of water vapor in the mixture = %.4f lbm vapor/ lvm mixture",x)
diff --git a/1709/CH10/EX10.5/10_5.sce b/1709/CH10/EX10.5/10_5.sce new file mode 100755 index 000000000..a3d289fe6 --- /dev/null +++ b/1709/CH10/EX10.5/10_5.sce @@ -0,0 +1,12 @@ +clc
+//Initialization of variables
+pgw=0.5069 //psia
+p=14.696 //psia
+Td=100 //F
+Tw=80 //F
+//calculations
+pv= pgw- (p-pgw)*(Td-Tw)/(2800-Tw)
+pg=0.9492 //psia
+phi=pv/pg
+//results
+printf("relative humidity of air stream = %.1f percent",phi*100)
diff --git a/1709/CH10/EX10.6/10_6.sce b/1709/CH10/EX10.6/10_6.sce new file mode 100755 index 000000000..d51e69c94 --- /dev/null +++ b/1709/CH10/EX10.6/10_6.sce @@ -0,0 +1,16 @@ +clc
+//Initialization of variables
+w1=0.0176 //lbm
+w2=0.0093 //lbm
+T2d=73//F
+T2=55 //F
+//calculations
+disp("From steam tables,")
+hv1=1061+0.445*100
+hv2=1061+0.445*55
+hf=23.06
+q1=20
+q2=4.88
+//results
+printf("Heat removed in cooling section = %d Btu/lbm ",q1)
+printf("Heat added in heating section = %.2f Btu/lbm ",q2)
diff --git a/1709/CH10/EX10.7/10_7.sce b/1709/CH10/EX10.7/10_7.sce new file mode 100755 index 000000000..4b0dc46ff --- /dev/null +++ b/1709/CH10/EX10.7/10_7.sce @@ -0,0 +1,8 @@ +clc
+//Initialization of variables
+Tdb=115 //F
+ph=0.05
+
+Twb=67 //F
+//results
+disp("From steam tables, Twb=67 F")
diff --git a/1709/CH10/EX10.8/10_8.sce b/1709/CH10/EX10.8/10_8.sce new file mode 100755 index 000000000..741dac671 --- /dev/null +++ b/1709/CH10/EX10.8/10_8.sce @@ -0,0 +1,16 @@ +clc
+//Initialization of variables
+w1=206
+w2=55
+ma1=2
+ma2=3
+//calculations
+w3= (ma1*w1 + ma2*w2)/(ma1+ma2)
+disp("From psychrometric chart,")
+Tdb3=82 //F
+TWb3=74.55 //F
+phi3=70 //percent
+//results
+printf("relative humidity = %d percent",phi3)
+printf("\n Dry bulb temperature = %d F",Tdb3)
+printf("\n Wet bulb temperature = %.2f F",TWb3)
diff --git a/1709/CH11/EX11.1/11_1.sce b/1709/CH11/EX11.1/11_1.sce new file mode 100755 index 000000000..6a708fe94 --- /dev/null +++ b/1709/CH11/EX11.1/11_1.sce @@ -0,0 +1,28 @@ +clc
+//Initialization of variables
+x=1.5
+P=14.696 //psia
+m=28.96
+//calculations
+mf=114 // lbm/mol fuel
+ma=x*12.5*(1+3.76)*m
+AF=ma/mf
+n1=8
+n2=9
+n3=(x-1)*12.5
+n4= x*3.76*12.5
+np=n1+n2+n3+n4
+x1=n1/np
+x2=n2/np
+x3=n3/np
+x4=n4/np
+ph=x2*P
+Td=113.5 //F
+//results
+printf("Air fuel ratio = %.1f lbm air/lbm fuel",AF)
+printf("\n Mole fraction of CO2 = %.2f percent",x1)
+printf("\n Mole fraction of H2O = %.2f percent",x2)
+printf("\n Mole fraction of O2 = %.2f percent",x3)
+printf("\n Mole fraction of N2 = %.2f percent",x4)
+disp("From tables of saturation pressure")
+printf("Dew point = %.1f F",Td)
diff --git a/1709/CH11/EX11.2/11_2.sce b/1709/CH11/EX11.2/11_2.sce new file mode 100755 index 000000000..e2185acfd --- /dev/null +++ b/1709/CH11/EX11.2/11_2.sce @@ -0,0 +1,15 @@ +clc
+//Initialization of variables
+x1=9
+x2=1.2
+x3=1.5
+x4=88.3
+//calculations
+a=x1+x2
+b=2*a
+xO=(2*x1 + x2+ 2*x3 + b)/2
+xN=x4/3.76
+ratio=xO/a
+percent=ratio/2 *100
+//results
+printf("Percent theoretical air = %.1f percent",percent)
diff --git a/1709/CH11/EX11.3/11_3.sce b/1709/CH11/EX11.3/11_3.sce new file mode 100755 index 000000000..249fcc810 --- /dev/null +++ b/1709/CH11/EX11.3/11_3.sce @@ -0,0 +1,11 @@ +clc
+//Initialization of variables
+T=440 //F
+//calculations
+disp("From steam tables,")
+h1=-169290
+h2=7597.6
+h3=4030.2
+ht=h1+h2-h3
+//results
+printf("Molal enthalpy of CO2 = %d Btu/lbm mole",ht)
diff --git a/1709/CH11/EX11.4/11_4.sce b/1709/CH11/EX11.4/11_4.sce new file mode 100755 index 000000000..7bd462a14 --- /dev/null +++ b/1709/CH11/EX11.4/11_4.sce @@ -0,0 +1,11 @@ +clc
+//Initialization of variables
+T=77 //F
+//calculations
+Hr=-36420 //B
+hc=-169290 //B/lb mol
+hh=-122970 //B/lb mol
+Hp=2*hc+3*hh
+Q=Hp-Hr
+//results
+printf("Heat transfer = %d B/mol fuel",Q)
diff --git a/1709/CH11/EX11.5/11_5.sce b/1709/CH11/EX11.5/11_5.sce new file mode 100755 index 000000000..ca8eb84bb --- /dev/null +++ b/1709/CH11/EX11.5/11_5.sce @@ -0,0 +1,20 @@ +clc
+//Initialization of variables
+T2=440 //F
+T1=77 //F
+Mch4=16
+Mw=18
+//calculations
+h77=3725.1
+ht=6337.9
+ht2=7597.6
+h772=4030.2
+hwt=1260.3
+h77w=45.02
+hr77=-383040 //B/lbm mol
+dHR=1*Mch4*0.532*(T1-T2) + 2*(h77-ht)
+dHp=1*(ht2-h772) + 2*Mw*(hwt - h77w)
+hrp=dHp+hr77+dHR
+//results
+printf("Enthalpy of combustion of gaseous methane = %d B/lbm mol fuel",hrp)
+//The calculation in textbook is wrong Please check it using a calculator.
diff --git a/1709/CH11/EX11.6/11_6.sce b/1709/CH11/EX11.6/11_6.sce new file mode 100755 index 000000000..366cdd795 --- /dev/null +++ b/1709/CH11/EX11.6/11_6.sce @@ -0,0 +1,7 @@ +clc
+//Initialization of variables
+Hr=-107530 //B/mol fuel
+disp("By iteration of temperatures, T=2700 R")
+T=2700 //R
+//results
+printf("Adiabatic flame temperature = %d R",T)
diff --git a/1709/CH11/EX11.7/11_7.sce b/1709/CH11/EX11.7/11_7.sce new file mode 100755 index 000000000..83ef3c77d --- /dev/null +++ b/1709/CH11/EX11.7/11_7.sce @@ -0,0 +1,17 @@ +clc
+//Initialization of variables
+Kp=0.668
+y=Kp^2
+//calculations
+x=poly(0,"x")
+vec=roots(x^3 + y*x^3 + 2*y*x^2 -y*x -2*y)
+eps=vec(1)
+x1=(1-eps)/(1+ eps/2)
+x2=eps/(1+eps/2)
+x3=eps/2/(1+ eps/2)
+//results
+printf("degree of reaction = %.3f ",eps)
+printf("\n Equilibrium concentration of CO2 = %.3f ",x1)
+printf("\n Equilibrium concentration of CO = %.3f ",x2)
+printf("\n Equilibrium concentration of O2 = %.3f ",x3)
+//the answers are a bit different due to approximation in textbook
diff --git a/1709/CH11/EX11.8/11_8.sce b/1709/CH11/EX11.8/11_8.sce new file mode 100755 index 000000000..39fe1e0e3 --- /dev/null +++ b/1709/CH11/EX11.8/11_8.sce @@ -0,0 +1,16 @@ +clc
+//Initialization of variables
+Kp=15.63
+y=Kp
+//calculations
+x=poly(0,"x")
+vec=roots(x^2 + y*x^2 - y)
+eps=vec(1)
+x1=(1-eps)/(1+eps)
+x2=eps/(1+eps)
+x3=eps/(1+eps)
+//results
+printf(" Equilibrium concentration of Cs = %.4f ",x1)
+printf("\n Equilibrium concentration of Cs+ = %.4f ",x2)
+printf("\n Equilibrium concentration of e- = %.4f ",x3)
+//the answers are a bit different due to approximation in textbook
diff --git a/1709/CH12/EX12.1/12_1.sce b/1709/CH12/EX12.1/12_1.sce new file mode 100755 index 000000000..307bff068 --- /dev/null +++ b/1709/CH12/EX12.1/12_1.sce @@ -0,0 +1,15 @@ +clc
+//Initialization of variables
+disp("From Mollier diagram,")
+h1=1357 //500 psia, 700 F
+h2=935 //P2=2 psia
+h3=93.99 //sat liq at 2 psia
+vf=0.01613
+P4=500 //psia
+P3=2 //psia
+//calculations
+dh4=vf*(P4-P3)*144/778
+h4=h3+dh4
+eta= ((h1-h2)-(h4-h3))/(h1-h4)
+//results
+printf("Thermal efficiency = %.1f percent ",eta*100)
diff --git a/1709/CH12/EX12.10/12_10.sce b/1709/CH12/EX12.10/12_10.sce new file mode 100755 index 000000000..2a2b538e2 --- /dev/null +++ b/1709/CH12/EX12.10/12_10.sce @@ -0,0 +1,16 @@ +clc
+//Initialization of variables
+e=0.83
+//calculations
+T1=530 //R
+T2d=838 //R
+T6d=T2d
+T3=1960 //R
+T4d=1375 //R
+T5d=T4d
+T5=e*(T5d-T2d) +T2d
+W=0.24*((T3-T4d)- (T2d-T1))
+Q=0.24*(T3-T5)
+eta=W/Q
+//results
+printf("Thermal efficiency = %d percent",eta*100+1)
diff --git a/1709/CH12/EX12.11/12_11.sce b/1709/CH12/EX12.11/12_11.sce new file mode 100755 index 000000000..eb55fa123 --- /dev/null +++ b/1709/CH12/EX12.11/12_11.sce @@ -0,0 +1,26 @@ +clc
+//Initialization of variables
+T1=420 //R
+T11=530 //R
+T3=2460 //R
+V1=300 //ft/sec
+P1=5 //psia
+P5=P1
+P2=50 //psia
+P3=5 //psia
+P4=50 //psia
+g=1.4
+cp=0.24
+m=1
+//calculations
+T2=T1*(P2/P1)^((g-1)/g)
+T4=T3-T2+T11
+T5=T3*(P3/P4)^((g-1)/g)
+V5=sqrt(2*32.2*cp*(T4-T5)*778)
+T=m*(V1-V5)/32.2
+Qh=cp*(T3-T2)
+P=-T*V1
+//results
+printf("Thrust = %.1f lbf",T)
+printf("\n Heat input = %d B/lbm",Qh)
+printf("\n Power = %d ft-lbf /sec",P)
diff --git a/1709/CH12/EX12.12/12_12.sce b/1709/CH12/EX12.12/12_12.sce new file mode 100755 index 000000000..9a9790807 --- /dev/null +++ b/1709/CH12/EX12.12/12_12.sce @@ -0,0 +1,20 @@ +clc
+//Initialization of variables
+h1=80.419 //B/lbm
+h3=36.013 //B/lbm
+h4=h3
+P3=172.35 //psia
+P2=P3
+m=5 //tons
+Q=12000
+//calculations
+h2=91.5 //B/lbm
+disp("From superheated steam tables,")
+COP=(h1-h4)/(h2-h1)
+W=h2-h1
+md=m*Q/(h1-h4)
+Wt=md*(h2-h1)
+Wt2=Wt/2545
+//results
+printf("Coefficient of performance = %.1f",COP)
+printf("\n Input work = %.1f hp",Wt2)
diff --git a/1709/CH12/EX12.2/12_2.sce b/1709/CH12/EX12.2/12_2.sce new file mode 100755 index 000000000..685d6ad0a --- /dev/null +++ b/1709/CH12/EX12.2/12_2.sce @@ -0,0 +1,15 @@ +clc
+//Initialization of variables
+disp("From molier diagram,")
+h1=1357 //500 psia 700F
+h2=1194 //P2=100 psia
+h3=1379 //100 psia, 700 F
+h4=1047 //p4=2 psia
+h5=93.99 //sat liq at 2 psia
+h6=95.02 //example 12.1
+//calculations
+W=h1-h2+h3-h4-(h6-h5)
+Q=(h1-h6)+(h3-h2)
+eta=W/Q
+//results
+printf("Thermal efficiency = %.2f percent",eta*100)
diff --git a/1709/CH12/EX12.3/12_3.sce b/1709/CH12/EX12.3/12_3.sce new file mode 100755 index 000000000..c08607c7e --- /dev/null +++ b/1709/CH12/EX12.3/12_3.sce @@ -0,0 +1,26 @@ +clc
+//Initialization of variables
+P=100 //psia
+//calculations
+disp("From mollier diagram,")
+h1=1357 //500 psia, 700F
+h2=1194 //100 psia
+h3=935//2 psia
+h4=93.99 //sat liq at 2 psia
+vf=0.01613
+vf2=0.01774
+P5=100 //psia
+P4=2 //psia
+dh4=vf*(P5-P4)*144/778
+h5=h4+dh4
+h6=298.4
+P7=500 //psia
+P6=100 //psia
+dh6=vf2*(P7-P6)*144/778
+h7=dh6+h6
+m=(h6-h5)/(h2-h5)
+W=h1-h2 + (1-m)*(h2-h3) - (1-m)*(h5-h4) -(h7-h6)
+Q=h1-h7
+etath=W/Q
+//results
+printf("Thermal efficiency = %.1f percent",etath*100)
diff --git a/1709/CH12/EX12.4/12_4.sce b/1709/CH12/EX12.4/12_4.sce new file mode 100755 index 000000000..6fa8899bf --- /dev/null +++ b/1709/CH12/EX12.4/12_4.sce @@ -0,0 +1,18 @@ +clc
+//Initialization of variables
+x=0.8
+//calculations
+disp("From molier diagram,")
+h1=1357 //500 psia 700F
+h2=1194 //P2=100 psia
+h3=1379 //100 psia, 700 F
+h4=1047 //p4=2 psia
+h5=93.99 //sat liq at 2 psia
+h6=95.02 //example 12.1
+h2d=h1- x*(h1-h2)
+h4d=h3- x*(h3-h4)
+W=(h1-h2d) +(h3-h4d) - (h6-h5)
+Q=(h1-h6) + (h3-h2d)
+eta=W/Q
+//results
+printf("Thermal efficiency = %d percent",eta*100+1)
diff --git a/1709/CH12/EX12.5/12_5.sce b/1709/CH12/EX12.5/12_5.sce new file mode 100755 index 000000000..acd7db3f7 --- /dev/null +++ b/1709/CH12/EX12.5/12_5.sce @@ -0,0 +1,22 @@ +clc
+//Initialization of variables
+P4=50 //psia
+P1=14.7 //psia
+P3=50 //psia
+P2=14.7 //psia
+g=1.4
+//calculations
+V1r=(P4/P1)^(1/g)
+V2r=(P3/P2)^(1/g)
+//After solving,
+V4=5.38 //ft^3/min
+V1=12.9 //ft^3/min
+V2=112.9 //ft^3/min
+PD=V2-V4
+etavol=(V2-V1)/(V2-V4)
+W32=g*P2*144*V2*((P3/P2)^((g-1)/g) -1 ) /(1-g)
+W41=g*P4*144*V4*((P1/P4)^((g-1)/g) -1 ) /(1-g)
+Wt=W32+W41
+//results
+printf("Total work = %.2e ft-lbf /min",Wt)
+//The answer given in textbook is wrong . please verify it using a calculator
diff --git a/1709/CH12/EX12.6/12_6.sce b/1709/CH12/EX12.6/12_6.sce new file mode 100755 index 000000000..e9a328de7 --- /dev/null +++ b/1709/CH12/EX12.6/12_6.sce @@ -0,0 +1,22 @@ +clc
+//Initialization of variables
+P1=14.7 //psia
+P4=100 //psia
+T1=530 //R
+T3=T1
+g=1.4
+m=10 //lbm
+cp=0.24
+//calculations
+P2=sqrt(P1*P4)
+T2=T1*(P2/P1)^((g-1)/g)
+T4=T2
+W=2*cp*(T2-T1)
+Wt=W*m
+hp=Wt*60/2545
+Q=m*cp*(T2-T3)
+T4=T1*(P4/P1)^((g-1)/g)
+W2=m*cp*(T4-T1)
+//results
+printf("Work required in case 1 = %d Btu/min",Wt+1)
+printf("\n Work required in case 2 = %d Btu/min",W2+1)
diff --git a/1709/CH12/EX12.7/12_7.sce b/1709/CH12/EX12.7/12_7.sce new file mode 100755 index 000000000..f4c8e7546 --- /dev/null +++ b/1709/CH12/EX12.7/12_7.sce @@ -0,0 +1,18 @@ +clc
+//Initialization of variables
+g=1.4
+r1=10
+r2=12
+r3=15
+Tl=530 //R
+Th=1960 //R
+//calculations
+eta1=1- (r1)^(1-g)
+eta2=1- (r2)^(1-g)
+eta3=1- (r3)^(1-g)
+etac=1-Tl/Th
+//results
+printf("Efficiency in case 1 = %.1f percent",eta1*100)
+printf("\n Efficiency in case 2 = %.1f percent",eta2*100)
+printf("\n Efficiency in case 3 = %.1f percent",eta3*100)
+printf("\n Carnot efficiency = %.2f percent",etac*100)
diff --git a/1709/CH12/EX12.8/12_8.sce b/1709/CH12/EX12.8/12_8.sce new file mode 100755 index 000000000..deda55bbd --- /dev/null +++ b/1709/CH12/EX12.8/12_8.sce @@ -0,0 +1,20 @@ +clc
+//Initialization of variables
+T1=70+460 //R
+P1=14.7 //psia
+g=1.4
+r=15
+rc=2
+cp=0.24
+cp2=0.1715
+//calculations
+T2=T1*(r)^(g-1)
+T3=rc*T2
+T4=T3*(rc/r)^(g-1)
+Qh=cp*(T3-T2)
+Ql=cp2*(T4-T1)
+W=Qh-Ql
+eta=W/Qh
+//results
+printf("Work output = %d B/lbm",W)
+printf("\n Efficiency = %.1f percent",eta*100)
diff --git a/1709/CH12/EX12.9/12_9.sce b/1709/CH12/EX12.9/12_9.sce new file mode 100755 index 000000000..341624e9c --- /dev/null +++ b/1709/CH12/EX12.9/12_9.sce @@ -0,0 +1,21 @@ +clc
+//Initialization of variables
+P1=14.7 //psia
+P4=14.7 //psia
+T1=530 //R
+T3=1960 //R
+P2=60 //psia
+P3=P2
+g=1.4
+eta1=0.85
+eta2=0.9
+//calculations
+T2=T1*(P2/P1)^((g-1)/g)
+T4=T3*(P4/P3)^((g-1)/g)
+T2d=(T2-T1)/eta1 + T1
+T4d=-eta2*(T3-T4) +T3
+Wact=0.24*(T3-T4d - (T2d-T1))
+Qh=0.24*(T3-T2d)
+etath=Wact/Qh
+//results
+printf("Thermal efficiency = %.1f percent",etath*100)
diff --git a/1709/CH13/EX13.1/13_1.sce b/1709/CH13/EX13.1/13_1.sce new file mode 100755 index 000000000..720a90e49 --- /dev/null +++ b/1709/CH13/EX13.1/13_1.sce @@ -0,0 +1,14 @@ +clc
+//Initialization of variables
+Eab1=0
+Eab2=5.87 //mV
+T1=150 //F
+T2=200 //F
+//calculations
+Eab= -1.12+ 0.035*T1
+pi1=0.035*(T1+460)
+pi2=0.035*(T2+460)
+//results
+printf("Thermocouple reading at %d F = %.2f mv",T1,Eab)
+printf("\n Peltier coefficient at %d F = %.1f mv",T1,pi1)
+printf("\n Peltier coefficient at %d F = %.1f mv",T2,pi2)
diff --git a/1709/CH13/EX13.2/13_2.sce b/1709/CH13/EX13.2/13_2.sce new file mode 100755 index 000000000..8c6476bfd --- /dev/null +++ b/1709/CH13/EX13.2/13_2.sce @@ -0,0 +1,10 @@ +clc
+//Initialization of variables
+T=0 //C
+//calculations
+de1=-72 //mV/C
+de2=500 //mv/C
+alpha=de1-de2
+pi=-(T+273)*alpha
+//results
+printf("Peltier coefficient at %d C = %d mv",T,pi/1000)
diff --git a/1709/CH14/EX14.1/14_1.sce b/1709/CH14/EX14.1/14_1.sce new file mode 100755 index 000000000..97b21c957 --- /dev/null +++ b/1709/CH14/EX14.1/14_1.sce @@ -0,0 +1,16 @@ +clc
+//Initialization of variables
+T=25+273 //K
+F=23060
+//calculations
+H=-68317
+G=-56690
+Er=-G/(2*F)
+eta=G/H
+W=-G
+Q=H-G
+//results
+printf("Voltage output of the cell = %.3f volts",Er)
+printf("\n Efficiency = %d percent",eta*100 +1)
+printf("\n Electrical Work output = %d cal/mol H2",W)
+printf("\n Heat transfer to the surroundings = %d cal/mol H2",Q)
diff --git a/1709/CH14/EX14.2/14_2.sce b/1709/CH14/EX14.2/14_2.sce new file mode 100755 index 000000000..70f6d5631 --- /dev/null +++ b/1709/CH14/EX14.2/14_2.sce @@ -0,0 +1,34 @@ +clc
+//Initialization of variables
+x1=0.75
+x2=0.25
+an=-190*10^-6 //volt/C
+rn=1.45*10^-3 //ohm cm
+zn=2*10^-3 //K^-1
+ap=190*10^-6 //volt/C
+rp=1.8*10^-3 //ohm cm
+zp=1.7*10^-3 //K^-1
+T=200+273 //K
+Tc=373 //K
+Th=573 //K
+//calculations
+Ktn=an^2/(rn*zn)
+Ktp=ap^2/(rp*zp)
+Z=(an-ap)^2 /(sqrt(rn*Ktn) + sqrt(rp*Ktp))^2
+Ap=sqrt(Ktn*rp/Ktp/rn)
+An=1
+K=Ktn*An+ Ktp*Ap
+R=rn/An + rp/Ap
+mopt=sqrt(1+ Z*T)
+RL=mopt*R
+nopt=(T-273)*(mopt-1)/(Th*(mopt+ Tc/Th))
+nmax=T/(Th*(1+1- T/Th/2 + 4/Th/Z))
+nmax=0.0624
+dT=T-273
+Popt=(an-ap)^2 *dT^2 /((1+mopt)^2 *RL)
+Pmax=(an-ap)^2 *dT^2 /((1+1)^2 *R)
+//results
+printf("Optimum efficiency = %.2f percent",nopt*100)
+printf("\n Max. efficiency = %.2f percent",nmax*100)
+printf("\n Optimum power = %.3f Watt",Popt)
+printf("\n Maximum power = %.3f Watt",Pmax)
diff --git a/1709/CH14/EX14.3/14_3.sce b/1709/CH14/EX14.3/14_3.sce new file mode 100755 index 000000000..6654a2d55 --- /dev/null +++ b/1709/CH14/EX14.3/14_3.sce @@ -0,0 +1,22 @@ +clc
+//Initialization of variables
+phic=2.5 //V
+phia=2 //V
+phip=0.1//V
+Th=2000 //K
+Tc=1000 //K
+eff=0.2
+k=1.38*10^-23
+e=1.6*10^-19
+sigma=5.67*10^-12
+//calculations
+V=phic-phia-phip
+Jc=1.2*10^6 *Th^2 *exp(-e*phic/(k*Th))
+Ja=1.2*10^6 *Tc^2 *exp(-e*phia/(k*Tc))
+J=Jc
+Qc1=J*(phic + 2*k*Th/e) + eff*sigma*10^4 *(Th^4 - Tc^4)
+eta1=J*0.4/Qc1
+eta2=(Th-Tc)/Th
+//results
+printf("Efficiency of the device = %.1f percent",eta1*100)
+printf("\n Carnot efficiency = %d percent",eta2*100)
diff --git a/1709/CH2/EX2.1/2_1.sce b/1709/CH2/EX2.1/2_1.sce new file mode 100755 index 000000000..462e82096 --- /dev/null +++ b/1709/CH2/EX2.1/2_1.sce @@ -0,0 +1,11 @@ +clc
+//Initialization of variables
+P1=200 //psia
+P2=15 //psia
+V1=1 //ft^3
+g=1.3
+//calculations
+V2=V1*(P1/P2)^(1/g)
+W=-(144*(P2*V2 - P1*V1)/(g-1))
+//results
+printf("Work done = %.2e ft. lbf",W)
diff --git a/1709/CH2/EX2.2/2_2.sce b/1709/CH2/EX2.2/2_2.sce new file mode 100755 index 000000000..134895bce --- /dev/null +++ b/1709/CH2/EX2.2/2_2.sce @@ -0,0 +1,12 @@ +clc
+//Initialization of variables
+L=0.305 //m
+v=4.58 //m/s
+i=10 //A
+B=1 //W/m^2
+//calculations
+F=i*B*L
+W=F*v
+//results
+printf("Force necessary = %.2f N",F)
+printf("\n Work per unit time = %.2f W",W)
diff --git a/1709/CH2/EX2.3/2_3.sce b/1709/CH2/EX2.3/2_3.sce new file mode 100755 index 000000000..11b9788f1 --- /dev/null +++ b/1709/CH2/EX2.3/2_3.sce @@ -0,0 +1,9 @@ +clc
+//Initialization of variables
+U=2545 //B/hr
+m=50 //lbm
+cv=1
+//calculations
+dT=U/(m*cv)
+//results
+printf("Change in temperature = %.1f F",dT)
diff --git a/1709/CH2/EX2.4/2_4.sce b/1709/CH2/EX2.4/2_4.sce new file mode 100755 index 000000000..345f57cc0 --- /dev/null +++ b/1709/CH2/EX2.4/2_4.sce @@ -0,0 +1,20 @@ +clc
+//Initialization of variables
+P1=14.7 //psia
+V1=1 //ft^3
+P2=14.7 //psia
+M=28.97
+T1=70+460 //R
+T2=500+460 //R
+cp=0.24 //B/lbm F
+//calculations
+m=P1*144*V1*M/(1545*T1)
+Qp=m*cp*(T2-T1)
+V2=V1*P1*T2/(P2*T1)
+W=P1*144*(V2-V1)
+W=-W/778
+dU=Qp+W
+//results
+printf("Work done = %.2f Btu",W)
+printf("\n Heat added = %.2f Btu",Qp)
+printf("\n Change in internal energy = %.2f Btu",dU)
diff --git a/1709/CH2/EX2.5/2_5.sce b/1709/CH2/EX2.5/2_5.sce new file mode 100755 index 000000000..89f8ede6e --- /dev/null +++ b/1709/CH2/EX2.5/2_5.sce @@ -0,0 +1,21 @@ +clc
+//Initialization of variables
+l=20
+b=25
+h=8
+Vp=2.5
+n=20
+P=14.7//psia
+T=530 //R
+t=15 //min
+Qp=375 //B/hr
+cv=0.1715 //B/lbm F
+//calculations
+Vroom=l*b*h
+Vair=Vroom-Vp*n
+m=P*Vair*144/(53.35*T)
+dU=n*Qp
+U=t*dU/60
+dT=U/(m*cv)
+//results
+printf("Air temperature rise = %d F",dT+1)
diff --git a/1709/CH3/EX3.1/3_1.sce b/1709/CH3/EX3.1/3_1.sce new file mode 100755 index 000000000..cfe39b906 --- /dev/null +++ b/1709/CH3/EX3.1/3_1.sce @@ -0,0 +1,22 @@ +clc
+//Initialization of variables
+V=1 //ft^3
+m=30 //lbm
+//calculations
+v=V/m
+vf1=0.01665
+vfg1=32.38 //ft^3/lbm
+x1=0.000515
+uf1=169.92
+ufg1=904.8
+u1=uf1+x1*ufg1
+vfg=0.0216
+vfg2=0.4240
+v2=v
+x2=0.0277
+uf2=538.4
+ufg2=571
+u2=uf2+x2*ufg2
+Q=m*(u2-u1)
+//results
+printf("Heat transfer = %d Btu",Q)
diff --git a/1709/CH3/EX3.2/3_2.sce b/1709/CH3/EX3.2/3_2.sce new file mode 100755 index 000000000..35704d586 --- /dev/null +++ b/1709/CH3/EX3.2/3_2.sce @@ -0,0 +1,23 @@ +clc
+//Initialization of variables
+V2=2.5 //ft^3
+V1=0.5 //ft^3
+P=100 //psia
+x1=0.5
+//calculations
+W=-P*144*(V2-V1)
+vf1=0.01774
+vfg1=4.414
+v1=vf1+x1*vfg1
+m=V1/v1
+v2=V2/m
+disp("From tables ,")
+uf1=298.08
+ufg1=807.1
+u1=uf1+x1*ufg1
+h2=1747.9
+u2=h2-P*144*v2/778
+Q=m*(u2-u1)
+//results
+printf("Amount of heat = %d Btu",Q)
+//The answer for u2 is given wrong in the textbook. Please use a calculator to find it
diff --git a/1709/CH3/EX3.3/3_3.sce b/1709/CH3/EX3.3/3_3.sce new file mode 100755 index 000000000..b8ab8b1ce --- /dev/null +++ b/1709/CH3/EX3.3/3_3.sce @@ -0,0 +1,22 @@ +clc
+//Initialization of variables
+V1=1.735*10^-4 //ft^3
+v1=0.016080 //ft^3/lbm
+h1=70.61 //B/lbm
+P1=100 //psia
+V2=1 //ft^3
+//calculations
+u1=h1-P1*v1*144/778
+m=V1/v1
+v2=V2/m
+vf2=0.01613
+vfg2=350.3
+x2=(v2-vf2)/vfg2
+hf2=67.97
+hfg2=1037.2
+h2=hf2+x2*hfg2
+P2=0.9492
+u2=h2- P2*144*v2/778
+Q=m*(u2-u1)
+//results
+printf("Enthalpy change = %.2f Btu",Q)
diff --git a/1709/CH3/EX3.4/3_4.sce b/1709/CH3/EX3.4/3_4.sce new file mode 100755 index 000000000..977971fdb --- /dev/null +++ b/1709/CH3/EX3.4/3_4.sce @@ -0,0 +1,13 @@ +clc
+//Initialization of variables
+P=20 //psia
+V=1 //ft^3
+T=560 //R
+cv=0.1715
+Q=10//Btu
+//calculations
+m=P*144*V/(53.35*T)
+T2=Q/(m*cv) +T
+P2=m*53.35*T2/V
+//results
+printf("Fina pressure = %d lbf/ft^2",P2)
diff --git a/1709/CH3/EX3.5/3_5.sce b/1709/CH3/EX3.5/3_5.sce new file mode 100755 index 000000000..fc0294ddd --- /dev/null +++ b/1709/CH3/EX3.5/3_5.sce @@ -0,0 +1,15 @@ +clc
+//Initialization of variables
+T1=560 //R
+T2=3460 //R
+m=28.02 //lb
+cv=0.248
+//calculations
+function [q]=fun(T)
+ q=9.47 - 3.29*10^3 /T +1.07*10^6 /T^2
+endfunction
+Q1=intg(T1,T2,fun)
+Q2=m*cv*(T2-T1)
+Error=(Q1-Q2)/Q1
+//results
+printf("Percentage error = %.1f percent",Error*100)
diff --git a/1709/CH3/EX3.6/3_6.sce b/1709/CH3/EX3.6/3_6.sce new file mode 100755 index 000000000..a1a7c6635 --- /dev/null +++ b/1709/CH3/EX3.6/3_6.sce @@ -0,0 +1,17 @@ +clc
+//Initialization of variables
+rate=20 //gal/min
+P1=20 //psia
+P2=1000 //psia
+T=100+460 //R
+//calculations
+vf=0.01613
+disp("From table A-8")
+dv=-5.2*10^-5 //ft^3/lbm
+K=-dv/(vf*P2*144)
+wt=K*vf*(P2^2 - P1^2)*144*144*10^4 /2
+m=rate*8.33
+Wt=wt*m
+Wthp=Wt/33000
+//results
+printf("Pump power required = %d hp",Wthp)
diff --git a/1709/CH4/EX4.1/4_1.sce b/1709/CH4/EX4.1/4_1.sce new file mode 100755 index 000000000..20d22e2e3 --- /dev/null +++ b/1709/CH4/EX4.1/4_1.sce @@ -0,0 +1,13 @@ +clc
+//Initialization of variables
+m=1
+he=1148.8 //B/lbm
+hi=1357 //B/lbm
+Ve=100 //ft/sec
+Vi=800 //ft/sec
+//calculations
+dW= m*(he-hi) + m*(Ve^2 - Vi^2)/(2*32.2*778)
+dWhr=dW*3600
+hp=-dWhr/2545
+//results
+printf("Horsepower output = %d hp",hp+1)
diff --git a/1709/CH4/EX4.2/4_2.sce b/1709/CH4/EX4.2/4_2.sce new file mode 100755 index 000000000..4fd1e8dea --- /dev/null +++ b/1709/CH4/EX4.2/4_2.sce @@ -0,0 +1,12 @@ +clc
+//Initialization of variables
+rate=80 //lbm/min
+T1=100 //F
+P1=100 //psia
+P2=1000 //psia
+//calculations
+disp("From the tables,")
+v=0.01613 //ft^3/lbm
+W=rate*(P2-P1)*144*v
+//results
+printf("Work done = %.2f ft-lbf/min",W)
diff --git a/1709/CH4/EX4.3/4_3.sce b/1709/CH4/EX4.3/4_3.sce new file mode 100755 index 000000000..506b2bd7e --- /dev/null +++ b/1709/CH4/EX4.3/4_3.sce @@ -0,0 +1,9 @@ +clc
+//Initialization of variables
+disp("from saturated steam tables,")
+hi=1279.1 //B/lbm
+//calculations
+u2=hi
+T2=564 //F
+//results
+printf("Temperature of steam = %d F",T2)
diff --git a/1709/CH4/EX4.4/4_4.sce b/1709/CH4/EX4.4/4_4.sce new file mode 100755 index 000000000..a63617811 --- /dev/null +++ b/1709/CH4/EX4.4/4_4.sce @@ -0,0 +1,17 @@ +clc
+//Initialization of variables
+P1=20 //psia
+P2=100 //psia
+V=3 //ft^3
+T=560 //R
+ma=0.289
+//calculations
+ma=P1*V/(53.35*T)
+Wa=-ma*53.35*T*log(P1/P2)
+Qa=-Wa
+Va2=3/5
+V2s=V-Va2
+hi=1279.1 //B/lbm
+T2s=536 //F
+//results
+printf("Final temperature = %d F",T2s)
diff --git a/1709/CH4/EX4.5/4_5.sce b/1709/CH4/EX4.5/4_5.sce new file mode 100755 index 000000000..543441095 --- /dev/null +++ b/1709/CH4/EX4.5/4_5.sce @@ -0,0 +1,12 @@ +clc
+//Initialization of variables
+P1=200 //psia
+P2=100 //psia
+T1=300+460 //R
+g=1.4
+cp=0.24
+//calculations
+T2=(T1)*(P2/P1)^((g-1)/g)
+V2=sqrt(2*32.2*778*cp*(T1-T2))
+//results
+printf("Final velocity = %d ft/sec",V2)
diff --git a/1709/CH4/EX4.6/4_6.sce b/1709/CH4/EX4.6/4_6.sce new file mode 100755 index 000000000..5b7ee61fd --- /dev/null +++ b/1709/CH4/EX4.6/4_6.sce @@ -0,0 +1,12 @@ +clc
+//Initialization of variables
+T1=500+460 //R
+P1=50 //psia
+P2=15 //psia
+g=1.4
+cp=0.24
+//calculations
+T2=T1*(P2/P1)^((g-1)/g)
+W=cp*(T2-T1) + (T1-460)^2 /(2*32.2*778)
+//results
+printf("Net work output from turbine = %.1f B/lbm",W)
diff --git a/1709/CH4/EX4.7/4_7.sce b/1709/CH4/EX4.7/4_7.sce new file mode 100755 index 000000000..822ad7343 --- /dev/null +++ b/1709/CH4/EX4.7/4_7.sce @@ -0,0 +1,12 @@ +clc
+//Initialization of variables
+T1=150+460 //R
+T1=40+460 //R
+//calculations
+disp("from freon tables,")
+h2=43.850 //B/lbm
+hf2=17.273
+hfg2=64.163
+x2=(h2-hf2)/hfg2
+//results
+printf("Quality of freon vapor = %.3f",x2)
diff --git a/1709/CH5/EX5.1/5_1.sce b/1709/CH5/EX5.1/5_1.sce new file mode 100755 index 000000000..b8a895431 --- /dev/null +++ b/1709/CH5/EX5.1/5_1.sce @@ -0,0 +1,11 @@ +clc
+//Initialization of variables
+N1=1
+N2=1
+N3=3
+N4=1
+//calculations
+N=N1+N2+N3+N4
+sig=factorial(N) /(factorial(N1) *factorial(N2)*factorial(N3)*factorial(N4))
+//results
+printf("No. of ways of arranging = %d ",sig)
diff --git a/1709/CH5/EX5.2/5_2.sce b/1709/CH5/EX5.2/5_2.sce new file mode 100755 index 000000000..ae9a735d0 --- /dev/null +++ b/1709/CH5/EX5.2/5_2.sce @@ -0,0 +1,8 @@ +clc
+//Initialization of variables
+N=6
+g=4
+//calculations
+sig=factorial(g+N-1) /(factorial(g-1) *factorial(N))
+//results
+printf("No. of ways of arranging = %d ",sig)
diff --git a/1709/CH5/EX5.3/5_3.sce b/1709/CH5/EX5.3/5_3.sce new file mode 100755 index 000000000..ab51f2793 --- /dev/null +++ b/1709/CH5/EX5.3/5_3.sce @@ -0,0 +1,8 @@ +clc
+//Initialization of variables
+N=6
+g=8
+//calculations
+sig=factorial(g) /(factorial(N) *factorial(g-N))
+//results
+printf("No. of ways = %d ",sig)
diff --git a/1709/CH5/EX5.4/5_4.sce b/1709/CH5/EX5.4/5_4.sce new file mode 100755 index 000000000..14afd194f --- /dev/null +++ b/1709/CH5/EX5.4/5_4.sce @@ -0,0 +1,22 @@ +clc
+//Initialization of variables
+N0=1
+//calculations
+N1=3/%e
+N2=6/%e^2
+N3=10/%e^3
+N=N0+N1+N2+N3
+ei=[0 1 2 3]
+eid=ei+1
+f0=N0/N
+f1=N1/N
+f2=N2/N
+f3=N3/N
+fi=[f0 f1 f2 f3]
+//results
+printf("fractional population of level 0 = %.3f",f0)
+printf(" \n fractional population of level 1 = %.3f",f1)
+printf(" \n fractional population of level 2 = %.3f",f2)
+printf(" \n fractional population of level 3 = %.3f",f3)
+xtitle('fractional populations vs Energy levels','Energy levels ei','fractional population Ni/N')
+bar(ei,fi,0.1)
diff --git a/1709/CH6/EX6.1/6_1.sce b/1709/CH6/EX6.1/6_1.sce new file mode 100755 index 000000000..f2972f2b2 --- /dev/null +++ b/1709/CH6/EX6.1/6_1.sce @@ -0,0 +1,12 @@ +clc
+//Initialization of variables
+m=5 //lbm
+P=50 //psia
+T=500 + 460 //R
+//calculations
+disp("From saturated steam tables,")
+s1=0.4110 //B/lbm R
+s2=1.7887 //B/lbm R
+dS=m*(s2-s1)
+//results
+printf("Change in entropy = %.3f B/R",dS)
diff --git a/1709/CH6/EX6.2/6_2.sce b/1709/CH6/EX6.2/6_2.sce new file mode 100755 index 000000000..e73e02a15 --- /dev/null +++ b/1709/CH6/EX6.2/6_2.sce @@ -0,0 +1,10 @@ +clc
+//Initialization of variables
+P=20 //psia
+T=227.96+ 459.69 //R
+//calculations
+disp("from saturation tables,")
+sfg=1.3962 //B/ R lbm
+Q=T*sfg
+//results
+printf("heat transfer = %.1f B/lbm",Q)
diff --git a/1709/CH6/EX6.3/6_3.sce b/1709/CH6/EX6.3/6_3.sce new file mode 100755 index 000000000..432c068ea --- /dev/null +++ b/1709/CH6/EX6.3/6_3.sce @@ -0,0 +1,13 @@ +clc
+//Initialization of variables
+T1=100+460 //R
+P1=15//psia
+P2=50 //psia
+n=1.3
+cp=0.24
+//calculations
+T2=T1*(P2/P1)^((n-1)/n)
+dS=cp*log(T2/T1) - 53.35/778 *log(P2/P1)
+//results
+printf("Change in entropy = %.3f B/lbm R",dS)
+//the answer given in textbook is wrong. Please check it using a calculator
diff --git a/1709/CH6/EX6.4/6_4.sce b/1709/CH6/EX6.4/6_4.sce new file mode 100755 index 000000000..eeb285090 --- /dev/null +++ b/1709/CH6/EX6.4/6_4.sce @@ -0,0 +1,11 @@ +clc
+//Initialization of variables
+T1=85+460 //R
+T2=T1
+cp=0.24
+P2=15 //psia
+P1=30 //psia
+//calculations
+dS=cp*log(T2/T1) - 53.35/778 *log(P2/P1)
+//results
+printf("Change in entropy = %.4f B/lbm R",dS)
diff --git a/1709/CH6/EX6.5/6_5.sce b/1709/CH6/EX6.5/6_5.sce new file mode 100755 index 000000000..2c5bcd9a1 --- /dev/null +++ b/1709/CH6/EX6.5/6_5.sce @@ -0,0 +1,12 @@ +clc
+//Initialization of variables
+Qh=-1000 //Btu
+Ql=1000 //Btu
+Th=1460 //R
+Tl=960 //R
+//calculations
+Sh=Qh/Th
+Sl=Ql/Tl
+S=Sh+Sl
+//results
+printf("Change in entropy of the universe = %.3f B/R",S)
diff --git a/1709/CH6/EX6.6/6_6.sce b/1709/CH6/EX6.6/6_6.sce new file mode 100755 index 000000000..7f332736d --- /dev/null +++ b/1709/CH6/EX6.6/6_6.sce @@ -0,0 +1,13 @@ +clc
+//Initialization of variables
+disp("from steam tables,")
+h1=1416.4 //B/lbm
+s1=1.6842 //B/lbm R
+//calculations
+s2=s1
+P2=50 //psia
+T2=317.5 //F
+h2=1193.7
+W=h2-h1
+//results
+printf("Work calculated = %.1f B/lbm",W)
diff --git a/1709/CH7/EX7.1/7_1.sce b/1709/CH7/EX7.1/7_1.sce new file mode 100755 index 000000000..6343ae798 --- /dev/null +++ b/1709/CH7/EX7.1/7_1.sce @@ -0,0 +1,15 @@ +clc
+//Initialization of variables
+disp("Using gas tables,")
+T1=1160 //R
+h1=281.14 //B/lbm
+Pr1=21.18
+P2=30 //psia
+P1=100 //psia
+//calculations
+Pr2=Pr1*P2/P1
+T2=833 //R
+h2=199.45 //B/lbm
+dh=h2-h1
+//results
+printf("Change in enthalpy = %.2f B/lbm",dh)
diff --git a/1709/CH7/EX7.2/7_2.sce b/1709/CH7/EX7.2/7_2.sce new file mode 100755 index 000000000..ac4d93362 --- /dev/null +++ b/1709/CH7/EX7.2/7_2.sce @@ -0,0 +1,11 @@ +clc
+//Initialization of variables
+T2=860 //R
+phi1=0.78767
+phi2=0.71323
+P2=30 //psia
+P1=100 //psia
+//calculations
+dS=phi2-phi1- 53.35/778 *log(P2/P1)
+//results
+printf("Net change of entropy = %.5f B/lbm R",dS)
diff --git a/1709/CH7/EX7.3/7_3.sce b/1709/CH7/EX7.3/7_3.sce new file mode 100755 index 000000000..267e1addb --- /dev/null +++ b/1709/CH7/EX7.3/7_3.sce @@ -0,0 +1,13 @@ +clc
+//Initialization of variables
+T1=540 //R
+T2=960 //R
+disp("From gas tables,")
+h2=231.06 //B/lbm
+h1=129.06 //B/lbm
+cp=0.24
+//calculations
+W=h2-h1
+dh=cp*(T2-T1)
+//results
+printf("Change in enthalpy = %.1f B/lbm",dh)
diff --git a/1709/CH7/EX7.4/7_4.sce b/1709/CH7/EX7.4/7_4.sce new file mode 100755 index 000000000..de9ee49b3 --- /dev/null +++ b/1709/CH7/EX7.4/7_4.sce @@ -0,0 +1,12 @@ +clc
+//Initialization of variables
+T1=420 //R
+T2=380 //R
+hig=1221.2
+P1=0.0019
+//calculations
+lnp=hig*778*(1/T1 - 1/T2)/85.6
+pra=exp(lnp)
+P2=pra*P1
+//results
+printf("Final pressure = %.3e psia",P2)
diff --git a/1709/CH7/EX7.5/7_5.sce b/1709/CH7/EX7.5/7_5.sce new file mode 100755 index 000000000..e045d1a5d --- /dev/null +++ b/1709/CH7/EX7.5/7_5.sce @@ -0,0 +1,17 @@ +clc
+//Initialization of variables
+disp("from critical constant tables")
+pc=482//psia
+Tc=227 //R
+vc=1.44 //ft^3/lbm mol
+P=600 //psia
+T=310 //R
+//calculations
+Pr=P/pc
+Tr=T/Tc
+disp("From Z tables,")
+Z=0.83
+v=Z*55.12*T/(P*144)
+rho=1/v
+//results
+printf("Density = %.1f lbm/ft^3",rho)
diff --git a/1709/CH7/EX7.6/7_6.sce b/1709/CH7/EX7.6/7_6.sce new file mode 100755 index 000000000..e7e49cb63 --- /dev/null +++ b/1709/CH7/EX7.6/7_6.sce @@ -0,0 +1,15 @@ +clc
+//Initialization of variables
+T=-150+460 //R
+v=0.6 //ft^3/lbm
+vc=1.44
+Tc=227 //R
+Pc=482 //psia
+//calculations
+disp("From tables of z")
+vr=v/vc
+Tr=T/Tc
+Pr=1.75
+P=Pr*Pc
+//results
+printf("Final pressure = %d psia",P)
diff --git a/1709/CH7/EX7.7/7_7.sce b/1709/CH7/EX7.7/7_7.sce new file mode 100755 index 000000000..60b59d465 --- /dev/null +++ b/1709/CH7/EX7.7/7_7.sce @@ -0,0 +1,21 @@ +clc
+//Initialization of variables
+disp("Critical tables suggest,")
+Tc=344 //R
+Pc=673 //psia
+P1=20 //psia
+P2=500 //psia
+M=16
+T=560 //R
+//calculations
+pr1=P1/Pc
+pr2=P2/Pc
+Tr=T/Tc
+dh2=0.65*Tc
+dsp=0.35 //B/lbm mol R
+dsp2=0.018-dsp- 1545/778 *log(P2/P1)
+W=dh2-dsp2*T
+W2=W/M
+//results
+printf("Work per pound mass = %d B/lbm",W2)
+//The answer is a bit different due to rounding off error
diff --git a/1709/CH7/EX7.8/7_8.sce b/1709/CH7/EX7.8/7_8.sce new file mode 100755 index 000000000..5c48db17a --- /dev/null +++ b/1709/CH7/EX7.8/7_8.sce @@ -0,0 +1,24 @@ +clc
+//Initialization of variables
+P=1000 //psia
+T1=100 + 460 //R
+T2=800+460 //R
+//calculations
+pc=1070 //psia
+Tc=548 //R
+pr1=P/pc
+Tr1=T1/Tc
+Tr2=T2/Tc
+M=44
+disp("from fig 7.7")
+h1=4235.8 //B/lbm mol
+h2=11661 //B/lbm mol
+h2bar=3.5 //B/lbm mol
+h1bar=0.48 //B/lbm mol
+dhbar=Tc*(h2bar-h1bar) + h2-h1
+Q=dhbar/M
+cp=0.202 //B/lbm F
+Q2=cp*(T2-T1)
+Error=(Q-Q2)/Q
+//results
+printf("Error in calculation = %d percent",Error*100)
diff --git a/1709/CH8/EX8.1/8_1.sce b/1709/CH8/EX8.1/8_1.sce new file mode 100755 index 000000000..377a95d3f --- /dev/null +++ b/1709/CH8/EX8.1/8_1.sce @@ -0,0 +1,11 @@ +clc
+//Initialization of variables
+T=70 //K
+Tr=85.5 //K
+//calculations
+disp("From fig 8.2")
+cvrot=1.1
+cvtra=1.5
+cv=cvtra+cvrot
+//results
+printf("Cv total = %.1f R",cv)
diff --git a/1709/CH8/EX8.2/8_2.sce b/1709/CH8/EX8.2/8_2.sce new file mode 100755 index 000000000..ee4aadcfd --- /dev/null +++ b/1709/CH8/EX8.2/8_2.sce @@ -0,0 +1,12 @@ +clc
+//Initialization of variables
+T=2000 //K
+Tr=3340 //K
+//calculations
+disp("From fig 8.2")
+cvrot=0.85
+cvtra=1.5
+cvvib=1
+cv=cvtra+cvrot+cvvib
+//results
+printf("Cv total = %.2f R",cv)
diff --git a/1709/CH8/EX8.3/8_3.sce b/1709/CH8/EX8.3/8_3.sce new file mode 100755 index 000000000..94c62a11a --- /dev/null +++ b/1709/CH8/EX8.3/8_3.sce @@ -0,0 +1,10 @@ +clc
+//Initialization of variables
+T=200 //K
+the=398 //K
+//calculations
+ratio=T/the
+disp("from fig 8.6")
+cv=4.9
+//results
+printf("Specific heat of aluminium = %.1f cal/g mol K",cv)
diff --git a/1709/CH8/EX8.4/8_4.sce b/1709/CH8/EX8.4/8_4.sce new file mode 100755 index 000000000..71280dfec --- /dev/null +++ b/1709/CH8/EX8.4/8_4.sce @@ -0,0 +1,8 @@ +clc
+//Initialization of variables
+T=10 //K
+td=315 //K
+//calculations
+cv=464.4 *(T/td)^3
+//results
+printf("specific heat of copper = %.5f cal/g mol K",cv)
diff --git a/1709/CH8/EX8.5/8_5.sce b/1709/CH8/EX8.5/8_5.sce new file mode 100755 index 000000000..9e8e92a8c --- /dev/null +++ b/1709/CH8/EX8.5/8_5.sce @@ -0,0 +1,14 @@ +clc
+//Initialization of variables
+N0=6.025*10^23
+M=63.57
+d=8.94 //g/cc
+h=6.624*10^-27
+me=9.1*10^-28
+//calculations
+NbyV=N0*d/M
+mu0=h^2 *(3*NbyV/ %pi)^(2/3) /(8*me)
+e0=0.6*mu0*10^-7
+Teq=2*e0/(3*1.38*10^-23)
+//results
+printf("Equivalent temperature = %d K",Teq)
diff --git a/1709/CH8/EX8.6/8_6.sce b/1709/CH8/EX8.6/8_6.sce new file mode 100755 index 000000000..2d5c6846a --- /dev/null +++ b/1709/CH8/EX8.6/8_6.sce @@ -0,0 +1,9 @@ +clc
+//Initialization of variables
+T=300 //K
+mu=1.13*10^-18
+k=1.38*10^-23
+//calculations
+cv=%pi^2 *k*T/(2*mu)
+//results
+printf("Electron contribution = %.4f R",cv)
diff --git a/1709/CH8/EX8.7/8_7.sce b/1709/CH8/EX8.7/8_7.sce new file mode 100755 index 000000000..4d29752fc --- /dev/null +++ b/1709/CH8/EX8.7/8_7.sce @@ -0,0 +1,11 @@ +clc
+//Initialization of variables
+sig=5.668*10^-5
+T1=1000 //K
+T2=2000 //K
+//calculations
+Eb1=sig*T1^4 *10^-7
+Eb2=sig*T2^4 *10^-7
+//results
+printf("total energy emitted in case 1 = %.3f Watts/cm^2",Eb1)
+printf("\n total energy emitted in case 2 = %.3f Watts/cm^2",Eb2)
diff --git a/1709/CH9/EX9.1/9_1.sce b/1709/CH9/EX9.1/9_1.sce new file mode 100755 index 000000000..d44dfd0fb --- /dev/null +++ b/1709/CH9/EX9.1/9_1.sce @@ -0,0 +1,15 @@ +clc
+//Initialization of variables
+N0=6.025*10^26
+M=32
+k=1.38*10^-23
+T=300 //K
+//calculations
+m=M/N0
+vavg=sqrt(8*k*T/(%pi*m))
+vrms=sqrt(3*k*T/m)
+vm=sqrt(2*k*T/m)
+//results
+printf("Average velocity = %d m/sec",vavg)
+printf("\n RMS velocity = %d m/sec",vrms)
+printf("\n Most probable velocity = %d m/sec",vm)
diff --git a/1709/CH9/EX9.2/9_2.sce b/1709/CH9/EX9.2/9_2.sce new file mode 100755 index 000000000..90bd3ec8a --- /dev/null +++ b/1709/CH9/EX9.2/9_2.sce @@ -0,0 +1,14 @@ +clc
+//Initialization of variables
+T=300 //K
+dv=0.02
+vm=395 //m/s
+m=5.32*10^-26 //kg
+k=1.38*10^-23
+vrms=483 //m/s
+//calculations
+N1=sqrt(2/%pi) *(m/(k*T))^(3/2) *vm^2 *exp(-1) *dv*vm
+N2=sqrt(2/%pi) *(m/(k*T))^(3/2) *vrms^2 *exp(-3/2) *dv*vrms
+//results
+printf("Fraction of oxygen molecules at v most probable speed = %.4f ",N1)
+printf("\n Fraction of oxygen molecules at v rms speed = %.4f ",N2)
diff --git a/1709/CH9/EX9.3/9_3.sce b/1709/CH9/EX9.3/9_3.sce new file mode 100755 index 000000000..e3ff858e9 --- /dev/null +++ b/1709/CH9/EX9.3/9_3.sce @@ -0,0 +1,13 @@ +clc
+//Initialization of variables
+p=1.013*10^5 //N/m^2
+k=1.38*10^-23
+T=300 //K
+v=445 //m/s
+A=0.001*10^-6 //m^2
+//calculations
+n=p/(k*T)
+J=n*v/4
+escaping=J*A
+//results
+printf("No. of molecules escaping per unit time = %.2e mol/sec",escaping)
diff --git a/1709/CH9/EX9.4/9_4.sce b/1709/CH9/EX9.4/9_4.sce new file mode 100755 index 000000000..591e9da7e --- /dev/null +++ b/1709/CH9/EX9.4/9_4.sce @@ -0,0 +1,11 @@ +clc
+//Initialization of variables
+d=3.5*10^-10 //m
+n=2.45*10^25
+//calculations
+sig=%pi*d^2
+lambda=1/(sqrt(2) *sig*n)
+frac=exp(-2)
+//results
+printf("Mean free path = %.2e m",lambda)
+printf("\n fraction of molecules = %.3f",frac)
diff --git a/1709/CH9/EX9.5/9_5.sce b/1709/CH9/EX9.5/9_5.sce new file mode 100755 index 000000000..8180dba09 --- /dev/null +++ b/1709/CH9/EX9.5/9_5.sce @@ -0,0 +1,12 @@ +clc
+//Initialization of variables
+P=1 //atm
+T=300 //K
+//calculations
+cv=4.97
+vavg=1580 //ft/s
+sig=4.13*10^-18 //ft^2
+N0=6.025*10^26 *0.4536
+K=vavg*3600*cv/(3*N0*sig)
+//results
+printf("Thermal conductivity = %.2e B/hr ft F",K)
diff --git a/1709/CH9/EX9.6/9_6.sce b/1709/CH9/EX9.6/9_6.sce new file mode 100755 index 000000000..a7f57a742 --- /dev/null +++ b/1709/CH9/EX9.6/9_6.sce @@ -0,0 +1,9 @@ +clc
+//Initialization of variables
+m=5.32*10^-26 //kg
+v=445 //m/s
+sigma=3.84*10^-19 //m^2
+//calculations
+mu=m*v/(3*sigma)
+//results
+printf("Dynamic viscosity of oxygen = %.2e newton sec/m^2",mu)
|