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 /389/CH8/EX8.1/Example8_1.sce | |
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 '389/CH8/EX8.1/Example8_1.sce')
-rwxr-xr-x | 389/CH8/EX8.1/Example8_1.sce | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/389/CH8/EX8.1/Example8_1.sce b/389/CH8/EX8.1/Example8_1.sce new file mode 100755 index 000000000..b6f720fe4 --- /dev/null +++ b/389/CH8/EX8.1/Example8_1.sce @@ -0,0 +1,42 @@ +clear;
+clc;
+
+// Illustration 8.1
+// Page: 278
+
+printf('Illustration 8.1 - Page: 278\n\n');
+
+// solution
+
+//****Data****//
+P_star = 2*10^(5);// [N/square m]
+X_methane = 0.6;
+X_ethane = 0.2;
+X_propane = 0.08;
+X_nbutane = 0.06;
+X_npentane = 0.06;
+//******//
+
+MoleFraction = [0.6 0.2 0.08 0.06 0.06]
+Heading = ["Component" "Equilibrium Partial Pressure" "Vapour Pressue " "Mole Fraction"];
+Component = ["Methane" "Ethane " "Propane" "n-Butane" "n-Pentane"];
+VapPressure = [0 42.05 8.96 2.36 0.66];// [N/square m]
+Sum = 0;
+for i = 1:4
+ printf("%s \t",Heading(i));
+end
+printf("\n");
+for i = 1:5
+ printf("%s \t ",Component(i));
+ printf("%e \t \t \t",(MoleFraction(i)*P_star));
+ printf("%e \t \t",(VapPressure(i)*10^(5)));
+ if (VapPressure(i) = = 0)
+ printf("\t \n");
+ Sum = Sum+0;
+ else
+ printf("%f \n",(MoleFraction(i)*P_star)/(VapPressure(i)*10^(5)));
+ Sum = Sum+(MoleFraction(i)*P_star)/(VapPressure(i)*10^(5));
+
+end
+end
+printf("Mole Fraction Of solvent Oil is %f",1-Sum);
\ No newline at end of file |