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 /479/CH2 | |
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 '479/CH2')
-rwxr-xr-x | 479/CH2/EX2.1/Example_2_1.sce | 18 | ||||
-rwxr-xr-x | 479/CH2/EX2.10/Example_2_10.sce | 57 | ||||
-rwxr-xr-x | 479/CH2/EX2.2/Example_2_2.sce | 11 | ||||
-rwxr-xr-x | 479/CH2/EX2.3/Example_2_3.sce | 11 | ||||
-rwxr-xr-x | 479/CH2/EX2.4/Example_2_4.sce | 11 | ||||
-rwxr-xr-x | 479/CH2/EX2.5/Example_2_5.sce | 53 | ||||
-rwxr-xr-x | 479/CH2/EX2.6/Example_2_6.sce | 49 | ||||
-rwxr-xr-x | 479/CH2/EX2.7/Example_2_7.sce | 31 | ||||
-rwxr-xr-x | 479/CH2/EX2.8/Example_2_8.sce | 63 | ||||
-rwxr-xr-x | 479/CH2/EX2.9/Example_2_9.sce | 81 | ||||
-rwxr-xr-x | 479/CH2/EX2.9/Example_2_9.txt | 4 |
11 files changed, 389 insertions, 0 deletions
diff --git a/479/CH2/EX2.1/Example_2_1.sce b/479/CH2/EX2.1/Example_2_1.sce new file mode 100755 index 000000000..2f010bdf9 --- /dev/null +++ b/479/CH2/EX2.1/Example_2_1.sce @@ -0,0 +1,18 @@ +//Chemical Engineering Thermodynamics
+//Chapter 2
+//P-V-T Relations
+
+//Example 2.1
+clear;
+clc;
+
+//Given
+m = 140;//m is the mass of N2 in Kg
+P = 4.052*(10^5);//P is the pressure of the system in Pa
+V = 30;//V is the volume of the system in m^3
+R = 8314.4;// R is the gas constant
+
+//To determine temperature required
+T = P*V/((m/28)*R);//T is the temperature of the system in K
+mprintf('Temperature of the system is %f K',T);
+//end
\ No newline at end of file diff --git a/479/CH2/EX2.10/Example_2_10.sce b/479/CH2/EX2.10/Example_2_10.sce new file mode 100755 index 000000000..a135dcfee --- /dev/null +++ b/479/CH2/EX2.10/Example_2_10.sce @@ -0,0 +1,57 @@ +//Chemical Engineering Thermodynamics
+//Chapter 2
+//P-V-T Relations
+
+//Example 2.10
+clear;
+clc;
+
+//Given
+yN2 = 1/4;//mole faction of N2 in the mixture
+yH2 = 3/4;//mole fraction of H2 in the mixture
+V = 5.7;//V is the rate at which mixture enters in m^3 in 1 hour
+P = 600;//P is in atm
+T = 298;//T is in K
+TcN2 = 126;//critical temp of N2 in K
+TcH2 = 33.3;//critical temp of H2 in K
+TcNh3 = 406.0;//critical temp of NH3 in K
+PcN2 = 33.5;//critical pressure of N2 in atm
+PcH2 = 12.8;//critical pressure of H2 in atm
+PcNH3 = 111.0;//critical pressure of NH3 in atm
+R = 0.082;//gas constant
+
+//To calculate the amount of ammonia leaving the reactor and the velocity of gaseous product leaving the reactor
+//(i)Calculation of amount of NH3 leaving the reactor
+Tcm = (TcN2*yN2)+(TcH2*yH2);//critical temperature of the mixture
+Pcm = (PcN2*yN2)+(PcH2*yH2);//critical pressure of the mixture
+Trm = T/Tcm;
+Prm = P/Pcm;
+//From figure A.2.3
+Zm = 1.57;//compressibility factor of the mixture
+N = (P*V)/(Zm*R*T);//Kg mole of the mixture
+N1 = 0.25*N;//Kg mole of N2 in feed
+//N2+3H2 - 2NH3
+W = 2*0.15*N1*17;
+mprintf('(i)Ammonia formed per hour is %f Kg',W);
+
+//(ii)Calculation of velocity
+N1 = 0.25*N-(0.25*N*0.15);//Kg mole of N2 after reactor
+N2 = 0.75*N-(0.75*N*0.15);//Kg mole of H2 after reactor
+N3 = 0.25*N*2*0.15;//Kg mole of NH3 after reactor
+Nt = N1+N2+N3;//total Kg moles after reactor
+y1NH3 = N3/Nt;//mole fraction of NH3 after reactor
+y1N2 = N1/Nt;//mole fraction of N2 after reactor
+y1H2 = N2/Nt;//mole fraction of H2 after reactor
+T1cm = (TcN2*y1N2)+(TcH2*y1H2);
+P1cm = (PcN2*y1N2)+(PcH2*y1H2);
+T1 = 448;//in K
+P1 = 550;//in atm
+T1rm = T1/T1cm;
+P1rm = P1/P1cm;
+//From Figure A.2.2
+Zm1 = 1.38;
+V1 = (Zm1*Nt*R*T1)/P1;
+d = 5*(10^-2);//diameter of pipe
+v = V1/((%pi/4)*(d^2)*3600);
+mprintf('\n (ii)Velocity in pipe is %f m/sec',v);
+//end
\ No newline at end of file diff --git a/479/CH2/EX2.2/Example_2_2.sce b/479/CH2/EX2.2/Example_2_2.sce new file mode 100755 index 000000000..e01570f74 --- /dev/null +++ b/479/CH2/EX2.2/Example_2_2.sce @@ -0,0 +1,11 @@ +//Chemical Engineering Thermodynamics
+//Chapter 2
+//P-V-T Relations
+
+//Example 2.2
+clear;
+clc;
+
+//Given
+//This example is a theoretical problem and does not involve any numerical computation
+//end
\ No newline at end of file diff --git a/479/CH2/EX2.3/Example_2_3.sce b/479/CH2/EX2.3/Example_2_3.sce new file mode 100755 index 000000000..10f075406 --- /dev/null +++ b/479/CH2/EX2.3/Example_2_3.sce @@ -0,0 +1,11 @@ +//Chemical Engineering Thermodynamics
+//Chapter 2
+//P-V-T Relations
+
+//Example 2.3
+clear;
+clc;
+
+//Given
+//This example is a theoretical problem and does not involve any numerical computation
+//end
\ No newline at end of file diff --git a/479/CH2/EX2.4/Example_2_4.sce b/479/CH2/EX2.4/Example_2_4.sce new file mode 100755 index 000000000..b94ffe17f --- /dev/null +++ b/479/CH2/EX2.4/Example_2_4.sce @@ -0,0 +1,11 @@ +//Chemical Engineering Thermodynamics
+//Chapter 2
+//P-V-T Relations
+
+//Example 2.4
+clear;
+clc;
+
+//Given
+//This example is a theoretical problem and does not involve any numerical computation
+//end
\ No newline at end of file diff --git a/479/CH2/EX2.5/Example_2_5.sce b/479/CH2/EX2.5/Example_2_5.sce new file mode 100755 index 000000000..728348458 --- /dev/null +++ b/479/CH2/EX2.5/Example_2_5.sce @@ -0,0 +1,53 @@ +//Chemical Engineering Thermodynamics
+//Chapter 2
+//P-V-T Relations
+
+//Example 2.5
+clear;
+clc;
+
+//Given
+n = 1;//n is Kg moles of methane
+T = 423;//T is the temperatue of the system in kelvin
+P = 100;//P is the pressure of the system in atm
+Tc = 191;//Tc is the critical temperature of the system in K
+Pc = 45.8;//Pc is the critical pressure of the system in atm
+R = 0.08206;//R is the gas constant in (m^3 atm/Kg mole K)
+
+//To calculate the volume of methane
+//(i)Using ideal gas equation
+V1 = (n*R*T)/P;//V1 is the volume of the gas in m^3
+mprintf('(i)Volume of the gas using ideal gas equation is %f cubic meter',V1);
+
+//(ii)Using Vander Waals' equation
+a = (27*(R^2)*(Tc^2))/(64*Pc);//Vander Waais constant
+b = (R*Tc)/(8*Pc);//Vander Waais constant
+v = poly(0, 'v');
+q = -((a*b)/P)+(a/P)*v-(((R*T)+(b*P))/P)*v^2+(v^3);//According to Vander Waals equation
+r = roots(q);
+mprintf('\n (ii)Volume of the gas using Vander Waals equation is %f cubic meter',r(1));
+
+//(iii)Using generalized Z chart
+Tr = T/Tc;//Tr is the reduced temperatue
+Pr = P/Pc;//Pr is the reduced pressure
+//From the figure A.2.2,
+Z = 0.97;//Z is the compressibility factor
+V = (Z*R*T)/P;
+mprintf('\n (iii)Volume of the gas using Z chart is %f cubic meter',V);
+
+//(iv)Using molar polarisation method
+//From Table 2.2
+Pmc = 6.82;//Pmc is the molar polarisation for methane
+//From figure A.2.4
+Z0 = .965;
+Z1 = 14.8*(10^-4);
+Z = Z0+(Z1*Pmc);
+V = (Z*R*T)/P;
+mprintf('\n (iv)Volume of the gas using molar polarisation method is %f cubic meter',V);
+
+//(v)From experiment
+//Given
+Z = 0.9848;
+V = (0.9848*n*R*T)/P;
+mprintf('\n (v)Volume of the gas calculated by experimental Z value is %f cubic meter',V);
+//end
\ No newline at end of file diff --git a/479/CH2/EX2.6/Example_2_6.sce b/479/CH2/EX2.6/Example_2_6.sce new file mode 100755 index 000000000..6de8f8e07 --- /dev/null +++ b/479/CH2/EX2.6/Example_2_6.sce @@ -0,0 +1,49 @@ +//Chemical Engineering Thermodynamics
+//Chapter 2
+//P-V-T Relations
+
+//Example 2.6
+clear;
+clc;
+
+//Given
+P1 = 266;
+T1 = 473.16;//Initial temperature in Kelvin
+T2 = 273.16;//Final temperature in Kelvin
+V1 = 80; V2 = 80;//Initial & final volume in litres
+N1 = (14.28/28); N2 = (14.28/28);//Initial and final Kg moles are equal
+Tc = 126;//Critical temperature of N2 in K
+Pc = 33.5;//Critical pressure of N2 in atm
+
+//To calculate the final pressure achieved
+//(i)Using ideal gas law
+p2 = (P1*V1*N2*T2)/(V2*N1*T1);
+mprintf('(i)Final pressure of N2 using ideal gas law is %f atm',p2);
+
+//(ii)Using generalized Z chart
+Tr1 = T1/Tc;//reduced initial temp in k
+Pr1 = P1/Pc;//reduced initial press in K
+//From the Z-chart compressibility factor coressponding to the above Tr1 &Pr1 is
+Z1 = 1.07;
+P2 = [125,135,150];
+Z2 = [0.95, 0.96, 0.98];
+F = [0,0,0];
+for i = 1:3
+ F(i) = (P2(i)/(Z2(i)*T2))-(P1/(Z1*T1));
+end
+clf;
+plot(P2,F);
+xtitle("P2 vs F","P2","F");
+P3 = interpln([F;P2],0);
+mprintf('\n (ii)Final pressure of N2 from Z chart is %f atm',P3);
+
+//(iii)Using Pseudo reduced density chart
+R = 0.082;//gas constant
+v = V1/N1;//Volume per moles of nitrogen in m^3/Kg mole
+Dr = (R*Tc)/(Pc*v);
+Tr2 = T2/Tc;//final reduced temp in K
+//From figure A.2.1, reduced pressure coressponding to this Dr and Tr2 is
+Pr2 = 4.1//final reduced pressure in atm
+p2_ = Pr2*Pc;
+mprintf('\n (iii)Final pressure achieved using Dr chart is %f atm',p2_);
+//end
\ No newline at end of file diff --git a/479/CH2/EX2.7/Example_2_7.sce b/479/CH2/EX2.7/Example_2_7.sce new file mode 100755 index 000000000..fd7d89932 --- /dev/null +++ b/479/CH2/EX2.7/Example_2_7.sce @@ -0,0 +1,31 @@ +//Chemical Engineering Thermodynamics
+//Chapter 2
+//P-V-T Relations
+
+//Example 2.7
+clear;
+clc;
+
+//Given
+n = 1;//n is the Kg mole of methane gas
+T = 298;//T is the constant temperature in K
+P1 = 1;//P1 is the initial pressure of the system
+P2 = 100;//P2 is the final pressure of the system
+R = 8314.4;//R is the gas constant in Nm/Kgmole deg K
+
+//To compute the work required
+//(i)Using ideal gas law
+W = R*T*log(P1/P2);
+mprintf('(i)Work done by the system if the gas obeys ideal gas law is %4.2e Nm',W);
+
+//(ii)Using Vander Waals' equation
+//Given
+//For methane
+a = 2.32*(10^5);//Vander Wals' constant a in N/m^2
+b = 0.0428;//Vanderwaals' constant b in m^3
+//V1 and V2 are evaluated by trial and error using Vanderwaals' equation as P1 and P2 are known
+V1 = 11.1;//initial volume of the gas in m^3
+V2 = 0.089;//final volume of the gas in m^3
+W = (R*T*log((V2-b)/(V1-b)))+(a*((1/V2)-(1/V1)))
+mprintf('\n (ii)Work done by the system if the gas obeys Vander Waals equation is %4.2e Nm',W);
+//end
\ No newline at end of file diff --git a/479/CH2/EX2.8/Example_2_8.sce b/479/CH2/EX2.8/Example_2_8.sce new file mode 100755 index 000000000..22019a4ec --- /dev/null +++ b/479/CH2/EX2.8/Example_2_8.sce @@ -0,0 +1,63 @@ +//Chemical Engineering Thermodynamics
+//Chapter 2
+//P-V-T Relations
+
+//Example 2.8
+clear;
+clc;
+
+//Given
+V = 27*(10^-3);//Volume of the container in m^3
+n = (15/70.91);//n is the Kg moles of chlorine
+T = 293;//T is the temperature in K
+R = 0.08206;
+P = 10^(4.39-(1045/293));//P is the vapour pressure of chlorine
+Pc = 76.1;//Critical pressure of Chlorine
+Tc = 417;//Critical temperature of Chlorine
+Pr = P/Pc;//Reduced pressure of Chlorine
+Tr = T/Tc;//Critical temperature of Chlorine
+M = 70.91;//Molecular weight of the Chlorine
+
+//To determine the vapour pressure of chlorine, amount of liquid Cl2 and temperature required
+//(i)Specific volume of liquid Chlorine
+//From figure A.2.2
+Zg = 0.93;
+//From figure A.2.6
+Zl = 0.013;
+vl = ((Zl*R*T)/P);
+mprintf('(i)Specific volume of liquid Chlorine from compressibility chart is %f cubic meter /Kgmole',vl);
+
+//From Francis relation, taking the constants from Table 2.3
+D = (1.606-(216*(10^-5)*20)-(28/(200-20)))*10^3;//Density of liq Cl2 in Kg/m^3
+Vl = M/D;
+mprintf('\n Specific volume of liquid Chlorine from Francis relation is %f cubic meter /Kgmole',Vl);
+
+//(ii)Amount of liquid Cl2 present in the cylinder
+vg = ((Zg*R*T)/P);
+V1 = V-vg;//V1 is the volume of liquid Chlorine
+Vct = 0.027;//volume of the container
+Vg = (0.212-(Vct/vl))/((1/vg)-(1/vl));//By material balance
+W = ((V-Vg)*70.9)/vl;
+mprintf('\n\n (ii)Weight of Chlorine at 20deg cel is %f Kg',W);
+
+//(iii)Calculation of temperature required to evaporate all the liquid chlorine
+//log P' = 4.39 - 1045/T (given)
+//Assume the various temperature
+Ng = 0.212;//total Kg moles of gas
+Ta = [413 415 417];
+N = [0,0,0];
+for i = 1:3
+ Tr(i) = Ta(i)/Tc;//reduced temperature in K
+ P(i) = 10^(4.39-(1045/Ta(i)));
+ Pr(i) = P(i)/Pc;//reduced pressure in K
+//From the compressibility factor chart,Z values coressponding to the above Tr &Pr are given as
+Z = [0.4 0.328 0.208];
+N(i) = (P(i)*Vct)/(Z(i)*R*Ta(i));
+end
+
+clf;
+plot(N,Ta);
+xtitle("Ta vs N","N","Ta");
+T1 = interpln([N;Ta],0.212);//in K
+mprintf('\n (iii)The temperature required to evaporate all the liquid chlorine is %f deg celsius',T1-273);
+//end
\ No newline at end of file diff --git a/479/CH2/EX2.9/Example_2_9.sce b/479/CH2/EX2.9/Example_2_9.sce new file mode 100755 index 000000000..45519a7c2 --- /dev/null +++ b/479/CH2/EX2.9/Example_2_9.sce @@ -0,0 +1,81 @@ +//Chemical Engineering Thermodynamics
+//Chapter 2
+//P-V-T Relations
+
+//Example 2.9
+clear;
+clc;
+
+//Given
+N1 = 0.7;//Kg mole of CH4
+N2 = 0.3;//Kg mole of N2
+R = 0.08206;//Gas constant
+T = 323;//Temperature in Kelvin
+V = 0.04;//Volume in m^3
+a1 = 2.280; b1 = 0.0428;//Vanderwaals constants for CH4
+a2 = 1.345;b2 = 0.0386;//Vanderwaals constants for N2
+Tc1 = 191; Pc1 = 45.8;//Critical temperature in K and pressure of CH4 in atm
+Tc2 = 126;Pc2 = 33.5;//Critical temperature in K and pressure of N2 in atm
+
+//To find Approx Value
+function[A]=approx(V,n)
+ A=round(V*10^n)/10^n;//V-Value n-To what place
+ funcprot(0)
+endfunction
+
+//To calculate the pressure exerted by the gas mixture
+//(i)Using ideal gas law
+P = (N1+N2)*((R*T)/V);
+mprintf('(i) Pressure exerted by the gas mixture using ideal gas law is %d atm',P);
+
+//(ii)Using Vander waal equation
+P1 = ((N1*R*T)/(V-(N1*b1)))-((a1*(N1^2))/(V^2));//Partial pressure of CH4
+P2 = ((N2*R*T)/(V-(N2*b2)))-((a2*(N2^2))/(V^2));//Partial pressure of N2
+Pt = P1+P2;
+mprintf('\n(ii) Pressure exerted by the gas mixture using Vander waal equation is %f atm', Pt);
+
+//(iii)Using Zchart and Dalton's law
+Tra = T/Tc1;//reduced temperature of CH4
+Trb = T/Tc2;//reduced temperature of N2
+//Asssume the pressure
+P = [660 732 793 815 831];
+for i = 1:5
+ Pa(i) = N1*P(i);// partial pressure of CH4 for the ith total pressure
+ Pb(i) = N2*P(i);// partial pressure of N2 for the ith total pressure
+ Pra(i) = Pa(i)/Pc1;//reduced pressure of CH4 for the ith total pressure
+ Prb(i) = Pb(i)/Pc2;//reduced pressure of N2 for the ith total pressure
+end
+
+//For the above Pr and Tr values compressibility factors from the figure A.2.3 are given as
+Za = [1.154 1.280 1.331 1.370 1.390];//Z values of CH4
+Zb = [1 1 1 1 1];//Z values of N2
+V3 = 0.0421;
+for i = 1:5
+ Pa(i) = Za(i)*N1*((R*T)/V);//partial pressure of CH4 coressponding to the ith total presure
+ Pb(i) = Zb(i)*N2*((R*T)/V);//partial pressure of N2 coressponding to the ith total pressure
+ Pt(i) = Pa(i)+Pb(i);//total pressure of the gas mixture
+ if Pt(i)-P(i) < 15
+ mprintf('\n(iii) pressure exerted by the gas mixture using Z chart and Dalton Law is %d atm',Pt(i));
+ else
+ end
+end
+
+//(iv)Using Amagat's law and Z chart
+P = [1000 1200 1500 1700];
+for i=1:4
+ Pra(i) = P(i)/Pc1;
+ Prb(i) = P(i)/Pc2;
+end
+//For the above Pr and Tr values compressibility factors from the figure A.2.3 are given as
+Za = [1.87 2.14 2.52 2.77];
+Zb = [1.80 2.10 2.37 2.54];
+for i = 1:4
+ Va(i) = approx((N1*Za(i)*((R*T)/P(i))),4);
+ Vb(i) = approx((N2*Zb(i)*((R*T)/P(i))),4);
+ V1(i) = approx((Va(i)+Vb(i)),4);
+ if V1(i)-V <= 0.003
+ mprintf('\n(iv) Pressure exerted by the gas mixture using Amagat law and Zchart is %d atm ',P(i));
+ else
+end
+end
+//end
diff --git a/479/CH2/EX2.9/Example_2_9.txt b/479/CH2/EX2.9/Example_2_9.txt new file mode 100755 index 000000000..791f69feb --- /dev/null +++ b/479/CH2/EX2.9/Example_2_9.txt @@ -0,0 +1,4 @@ +For example 2.9,
+In the (iii) part, i am getting answer as P = 843 atm.
+But the answer given in the book is 833 atm.
+There might be some calculation mistke in the book.
\ No newline at end of file |