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 /800/CH8 | |
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 '800/CH8')
-rwxr-xr-x | 800/CH8/EX8.10/8_10.sce | 40 | ||||
-rwxr-xr-x | 800/CH8/EX8.11/8_11.sce | 44 | ||||
-rwxr-xr-x | 800/CH8/EX8.12/8_12.sce | 23 | ||||
-rwxr-xr-x | 800/CH8/EX8.3/8_3.sce | 10 | ||||
-rwxr-xr-x | 800/CH8/EX8.4/8_4.sce | 25 | ||||
-rwxr-xr-x | 800/CH8/EX8.6/8_6.sce | 42 | ||||
-rwxr-xr-x | 800/CH8/EX8.7/8_7.sce | 32 | ||||
-rwxr-xr-x | 800/CH8/EX8.8/8_8.sce | 12 | ||||
-rwxr-xr-x | 800/CH8/EX8.9/8_9.sce | 40 |
9 files changed, 268 insertions, 0 deletions
diff --git a/800/CH8/EX8.10/8_10.sce b/800/CH8/EX8.10/8_10.sce new file mode 100755 index 000000000..2be7eaad9 --- /dev/null +++ b/800/CH8/EX8.10/8_10.sce @@ -0,0 +1,40 @@ +//clear//
+clc
+clear
+//eY(2)ec("8.6data.sci");
+W = 0:1:28.58;
+W0=0;
+function w=f(W,Y)
+ w =zeros(3,1);
+
+
+fao=.188
+visc=.090
+Ta=1264.67
+deltah=-42471-1.563*(Y(3)-1260)+.00136*(Y(3)**2-1260**2)-(2.459*10**(-7))*(Y(3)**3-1260**3);
+summ= 57.23+.014 * Y(3)-1.94 *10**(-6.)*Y(3)**2
+dcp=-1.5625+2.72*10**(-3)*Y(3)-7.38*10**(-7)*Y(3)**2
+k=360D*exp(-176008/Y(3)-(110.1*log(Y(3)))+912.8)
+thetaso=0;
+Po=2
+Pao=.22
+thetao=.91
+eps=-.055
+R=1.987;
+Kp=exp(42311/R/Y(3)-11.24);
+if(Y(2)< =.05)
+
+ ra=(-k*(.848-.012/(Kp**2)));
+else
+ ra=(-k*(1-Y(2))/(thetaso+Y(2)))**.5*(Y(1)/Po*Pao*((thetao-.5*Y(2))/((1+eps*Y(2)))-((thetaso+Y(2))/(1-Y(2)))**2/(Kp**2)));
+end
+
+w(1)=(-1.12*10**(-8)*(1-.055*Y(2))*Y(3))*(5500*visc+2288)/Y(1) ;
+w(2)=-(ra)/fao ;
+w(3)=(5.11*(Ta-Y(3))+(-ra)*(-deltah) )/(fao*(summ+Y(2)*dcp))
+endfunction
+
+X=ode([2;0;1400],W0,W,f);
+
+plot2d(W,X(1,:));
+plot2d(W,X(3,:));
diff --git a/800/CH8/EX8.11/8_11.sce b/800/CH8/EX8.11/8_11.sce new file mode 100755 index 000000000..f01409768 --- /dev/null +++ b/800/CH8/EX8.11/8_11.sce @@ -0,0 +1,44 @@ +//clear//
+clc
+clear
+exec("8.11data.sci");
+V = 0:.01:1;
+
+function w=f(V,Y)
+
+ w =zeros(4,1);
+
+k1a=10*exp(4000*((1/300)-(1/Y(4))));
+k2a=.09*exp(9000*((1/300)-(1/Y(4))))
+
+Ft=Y(1)+Y(2)+Y(3);
+
+Ca=Cto*(Y(1)/Ft)*(To/Y(4))
+Cb=Cto*(Y(2)/Ft)*(To/Y(4))
+Cc=Cto*(Y(3)/Ft)*(To/Y(4))
+r1a=-k1a*Ca;
+r2a=-k2a*Ca^2;
+
+w(1)=r1a+r2a;
+w(2)=-r1a;
+
+w(3)=-r2a/2;
+w(4)=(4000*(373-Y(4))+(-r1a)*20000+(-r2a)*60000)/(90*Y(1)+90*Y(2)+180*Y(3));
+endfunction
+
+x=ode([100;0;0;423],V0,V,f);
+
+scf(1)
+plot2d(V,x(4,:));
+
+xtitle( 'Figure E8-11.1', 'V', 'T' ) ;
+
+scf(2)
+
+l1=x(1,: )'
+l2=x(2,: )'
+l3=x(3,: )'
+plot2d(V',[l1 l2 l3]);
+
+xtitle( 'Figure E8-11.2', 'V', 'Fa,Fb,Fc' ) ;
+legend(['Fa';'Fb';'Fc']);
diff --git a/800/CH8/EX8.12/8_12.sce b/800/CH8/EX8.12/8_12.sce new file mode 100755 index 000000000..74bfd8010 --- /dev/null +++ b/800/CH8/EX8.12/8_12.sce @@ -0,0 +1,23 @@ +//clear//
+clc
+clear
+exec("8.12data.sci");
+t=1:10:250;
+for i=1:length(t)
+T(i)=2*t(i)+283;
+
+k2(i)=4.58*exp((E2/1.987)*((1/500)-(1/T(i))))
+k1(i)=3.3*exp((E1/1.987)*((1/300)-(1/T(i))))
+Ca(i)=Cao/(1+tau*k1(i))
+kappa=UA/(vo*Cao)/Cp
+G(i)=-(tau*k1(i)/(1+k1(i)*tau))*DH1-(k1(i)*tau*k2(i)*tau*DH2/((1+tau*k1(i)) *(1+tau*k2(i))));
+Tc=(To+kappa*Ta)/(1+kappa);
+Cb(i)=tau*k1(i)*Ca(i)/(1+k2(i)*tau);
+R(i)=Cp*(1+kappa)*(T(i)-Tc);
+Cc=Cao-Ca(i)-Cb(i);
+F(i)=G(i)-R(i);
+end
+plot(T',[G R])
+
+xtitle( 'Figure E8-12.1', 'T (K)', 'G(T),R(T)' ) ;
+legend(['G(T)';'R(T)']);
diff --git a/800/CH8/EX8.3/8_3.sce b/800/CH8/EX8.3/8_3.sce new file mode 100755 index 000000000..8969d3cf9 --- /dev/null +++ b/800/CH8/EX8.3/8_3.sce @@ -0,0 +1,10 @@ +//clear//
+clc
+clear
+exec("8.3data.sci");
+deltaHRx0 = 2*H0NH3-3*H0H2-HN2;
+deltaCp = 2*CpNH3-3*CpH2-CpN2;
+deltaHRx = deltaHRx0+deltaCp*(T-TR);
+disp("The heat of reaction on the basis on the moles of H2 reacted is =")
+disp((1/3)*deltaHRx*4.184)
+disp("J at 423 K")
diff --git a/800/CH8/EX8.4/8_4.sce b/800/CH8/EX8.4/8_4.sce new file mode 100755 index 000000000..15bd92165 --- /dev/null +++ b/800/CH8/EX8.4/8_4.sce @@ -0,0 +1,25 @@ +//clear//
+clc
+clear
+exec("8.4data.sci");
+HRx0 = H0C-H0B-H0A;
+deltaCp = CpC-CpB-CpA;
+deltaHRx0 = HRx0+deltaCp*(TR-TR);
+v0 = vA0+vB0+VM0;
+tau = V/v0;
+CA0 = FA0/v0;
+phiM0 = FM0/FA0;
+phiB0 = FB0/FA0;
+Cpi = CpA+phiB0*CpB+phiM0*CpM;
+
+for i =1:length(T)
+XEB(i) = -Cpi*(T(i)-Ti0)/(deltaHRx0+deltaCp*(T(i)-TR));
+XMB(i) = tau*A*exp(-E/(R*T(i)))/(1+tau*A*exp(-E/(R*T(i))));
+end
+
+
+
+plot2d(T',[XEB XMB]);
+
+xtitle( 'Figure E8-4.2', 'T(oR)', 'Conversion, X' ) ;
+legend(['XEB';'XMB']);
diff --git a/800/CH8/EX8.6/8_6.sce b/800/CH8/EX8.6/8_6.sce new file mode 100755 index 000000000..af00ec816 --- /dev/null +++ b/800/CH8/EX8.6/8_6.sce @@ -0,0 +1,42 @@ +//clear//
+clc
+clear
+exec("8.6data.sci");
+ V = 0:.1:3.6;
+function w=f(V,X)
+
+ w =zeros(1,1);
+T =330+43.3*X;
+k=31.1*exp(7906*(T-360)/(T*360));
+Kc = 3.03*exp(-830.3*((T-360)/(T*360)));
+Xe = Kc/(1+Kc);
+ra = -k*Ca0*(1-(1+(1/Kc))*X);
+ w(1)= -ra/Fa0;
+ rate = -ra;
+endfunction
+
+x=ode([0],V0,V,f);
+
+for i =1:length(x)
+ T(1,i) =330+43.3*x(1,i)
+
+ k(1,i)=31.1*exp(7906*(T(1,i)-360)/(T(1,i)*360));
+ Kc(1,i) = 3.03*exp(-830.3*((T(1,i)-360)/(T(1,i)*360)));
+
+ ra(1,i) = k(1,i)*Ca0*(1-(1+(1/Kc(1,i)))*x(1,i));
+end
+scf(1)
+plot2d(V,x(1,:));
+
+xtitle( 'Figure E8-6.1a', 'V(m^3)', 'X' ) ;
+scf(2)
+plot2d(V,T(1,:));
+
+xtitle( 'Figure E8-6.1b', 'V(m^3)', 'T (K)' ) ;
+
+scf(3)
+plot2d(V,ra);
+
+xtitle( 'Figure E8-6.1c', 'V(m^3)', '-ra (kmol/m^3hr)' ) ;
+
+
diff --git a/800/CH8/EX8.7/8_7.sce b/800/CH8/EX8.7/8_7.sce new file mode 100755 index 000000000..9c87d4189 --- /dev/null +++ b/800/CH8/EX8.7/8_7.sce @@ -0,0 +1,32 @@ +//clear//
+clc
+clear
+//this code is only for the first part of the problem (Adiabatic PFR)
+exec("8.7data.sci");
+ V = 0:.1:5;
+function w=f(V,Y)
+
+ w =zeros(2,1);
+
+k=(8.2e14)*exp(-34222/Y(1));
+
+Cpa = 26.63+.183*Y(1)-(45.86e-6)*(Y(1)^2);
+delCp = 6.8-(11.5e-3)*Y(1)-(3.81e-6)*(Y(1)^2);
+deltaH = 80770+6.8*(Y(1)-Tr)-(5.75e-3)*((Y(1)^2)-Tr^2)-(1.27e-6)*((Y(1)^3)-Tr^3);
+ra = -k*Ca0*(((1-Y(2))/(1+Y(2)))*(T0/Y(1)));
+w(1) = -ra*(-deltaH)/(Fa0*(Cpa+Y(2)*delCp));
+w(2)= -ra/Fa0;
+
+endfunction
+
+x=ode([1035;0],V0,V,f);
+scf(1)
+plot2d(V,x(1,:));
+
+xtitle( 'Figure E8-7.1', 'V (m^3)', 'T (K)' ) ;
+
+scf(2)
+plot2d(V,x(2,:));
+
+xtitle( 'Figure E8-7.1', 'V (m^3)', 'X' ) ;
+
diff --git a/800/CH8/EX8.8/8_8.sce b/800/CH8/EX8.8/8_8.sce new file mode 100755 index 000000000..7e842f878 --- /dev/null +++ b/800/CH8/EX8.8/8_8.sce @@ -0,0 +1,12 @@ +//clear//
+clc
+clear
+exec("8.8data.sci");
+for i = 1:length(T)
+ Xe(i) = 100000*exp(-33.78*(T(i)-298)/(T(i)))/(1+ 100000*exp(-33.78*(T(i)-298)/T(i)));
+ XEB(i) = (2.5e-3)*(T(i)-300);
+end
+plot2d(T,[Xe XEB])
+
+xtitle( 'Figure E8-8.1', 'T', 'X' ) ;
+legend(['Xe';'XEB']);
diff --git a/800/CH8/EX8.9/8_9.sce b/800/CH8/EX8.9/8_9.sce new file mode 100755 index 000000000..2be7eaad9 --- /dev/null +++ b/800/CH8/EX8.9/8_9.sce @@ -0,0 +1,40 @@ +//clear//
+clc
+clear
+//eY(2)ec("8.6data.sci");
+W = 0:1:28.58;
+W0=0;
+function w=f(W,Y)
+ w =zeros(3,1);
+
+
+fao=.188
+visc=.090
+Ta=1264.67
+deltah=-42471-1.563*(Y(3)-1260)+.00136*(Y(3)**2-1260**2)-(2.459*10**(-7))*(Y(3)**3-1260**3);
+summ= 57.23+.014 * Y(3)-1.94 *10**(-6.)*Y(3)**2
+dcp=-1.5625+2.72*10**(-3)*Y(3)-7.38*10**(-7)*Y(3)**2
+k=360D*exp(-176008/Y(3)-(110.1*log(Y(3)))+912.8)
+thetaso=0;
+Po=2
+Pao=.22
+thetao=.91
+eps=-.055
+R=1.987;
+Kp=exp(42311/R/Y(3)-11.24);
+if(Y(2)< =.05)
+
+ ra=(-k*(.848-.012/(Kp**2)));
+else
+ ra=(-k*(1-Y(2))/(thetaso+Y(2)))**.5*(Y(1)/Po*Pao*((thetao-.5*Y(2))/((1+eps*Y(2)))-((thetaso+Y(2))/(1-Y(2)))**2/(Kp**2)));
+end
+
+w(1)=(-1.12*10**(-8)*(1-.055*Y(2))*Y(3))*(5500*visc+2288)/Y(1) ;
+w(2)=-(ra)/fao ;
+w(3)=(5.11*(Ta-Y(3))+(-ra)*(-deltah) )/(fao*(summ+Y(2)*dcp))
+endfunction
+
+X=ode([2;0;1400],W0,W,f);
+
+plot2d(W,X(1,:));
+plot2d(W,X(3,:));
|