summaryrefslogtreecommitdiff
path: root/926/CH5/EX5.2/Chapter5_Example2.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /926/CH5/EX5.2/Chapter5_Example2.sce
parentb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (diff)
downloadScilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.gz
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.tar.bz2
Scilab-TBC-Uploads-7f60ea012dd2524dae921a2a35adbf7ef21f2bb6.zip
initial commit / add all books
Diffstat (limited to '926/CH5/EX5.2/Chapter5_Example2.sce')
-rw-r--r--926/CH5/EX5.2/Chapter5_Example2.sce34
1 files changed, 34 insertions, 0 deletions
diff --git a/926/CH5/EX5.2/Chapter5_Example2.sce b/926/CH5/EX5.2/Chapter5_Example2.sce
new file mode 100644
index 000000000..426e5302a
--- /dev/null
+++ b/926/CH5/EX5.2/Chapter5_Example2.sce
@@ -0,0 +1,34 @@
+//Hougen O.A., Watson K.M., Ragatz R.A., 2004. Chemical process principles Part-1: Material and Energy Balances(II Edition). CBS Publishers & Distributors, New Delhi, pp 504
+
+//Chapter-5, Illustration 2, Page 113
+//Title: Calculation of relative saturation and percentage saturation
+//=============================================================================
+clear
+clc
+
+//INPUT
+P = [745 184.8] //Working pressure and vapor pressure of acetone at 20 degree C in mm Hg
+v = 14.8 //Composition by volume of acetone
+
+//CALCULATIONS
+P1 = P(1)*v/100; //Partial pressure of acetone in mm Hg
+RS = P1*100/P(2); //Relative saturation of mixture
+n1 = v/100; //lb mole of acetone
+n2 = 1-n1; //lb mole of nitrogen
+n3 = n1/n2; //lb moles of acetone per lb moles of nitrogen
+V1 = P(2)*100/P(1); //Percentage by volume of acetone
+n4 = V1/100; //lb moles of acetone
+n5 = 1-n4; //lb moles of nitrogen
+n6 = n4/n5; //Moles of acetone per moles of nitrogen
+PS = n3*100/n6; //Percentage saturation
+
+//OUTPUT
+//Console output
+mprintf('\n Relative saturation of the mixture at given conditions = %3.1f %% \n Percentage saturation = %3.1f %%',RS,PS);
+
+// File output
+fd= mopen('.\Chapter5_Example2_Output.txt','w');
+mfprintf(fd,'\n Relative saturation of the mixture at given conditions = %3.1f %% \n Percentage saturation = %3.1f %%',RS,PS);
+mclose(fd);
+
+//=============================END OF PROGRAM==================================