summaryrefslogtreecommitdiff
path: root/479/CH2/EX2.6/Example_2_6.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /479/CH2/EX2.6/Example_2_6.sce
downloadScilab-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/EX2.6/Example_2_6.sce')
-rwxr-xr-x479/CH2/EX2.6/Example_2_6.sce49
1 files changed, 49 insertions, 0 deletions
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