summaryrefslogtreecommitdiff
path: root/3825/CH10/EX10.2/Ex10_2.sce
diff options
context:
space:
mode:
authorprashantsinalkar2017-10-10 12:27:19 +0530
committerprashantsinalkar2017-10-10 12:27:19 +0530
commit7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 (patch)
treedbb9e3ddb5fc829e7c5c7e6be99b2c4ba356132c /3825/CH10/EX10.2/Ex10_2.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 '3825/CH10/EX10.2/Ex10_2.sce')
-rw-r--r--3825/CH10/EX10.2/Ex10_2.sce44
1 files changed, 44 insertions, 0 deletions
diff --git a/3825/CH10/EX10.2/Ex10_2.sce b/3825/CH10/EX10.2/Ex10_2.sce
new file mode 100644
index 000000000..e86812a96
--- /dev/null
+++ b/3825/CH10/EX10.2/Ex10_2.sce
@@ -0,0 +1,44 @@
+clc
+y1=0.2 //O2
+y2=0.5 //N2
+y3=0.1 //H2O
+y4=0.2 //CO2
+P=100 //in kPa
+p1=P*y1
+p2=P*y2
+p3=P*y3
+p4=P*y4
+mprintf("pi=.(in kPa)\n%f\n%f\n%f\n%f\n",p1,p2,p3,p4)
+M1=32
+M2=28
+M3=18
+M4=44
+M=(y1*M1)+(y2*M2)+(y3*M3)+(y4*M4)
+mprintf("Molar mass of mixture=%ikg/kmol\n",M)
+m1=M1*y1
+m2=M2*y2
+m3=M3*y3
+m4=M4*y4
+mprintf("mi=.(kg*10^3)\n%f\n%f\n%f\n%f\n",m1,m2,m3,m4)
+phi1=m1/M
+phi2=m2/M
+phi3=m3/M
+phi4=m4/M
+mprintf("phi i=.\n%f\n%f\n%f\n%f\n",phi1,phi2,phi3,phi4)
+P=p1+p2+p3
+mprintf("Final pressure=%ikPa\n",P)
+y1=p1/P
+y2=p2/P
+y3=p3/P
+mprintf("yi=.\n%f\n%f\n%f\n",y1,y2,y3)
+m1=M1*y1
+m2=M2*y2
+m3=M3*y3
+mprintf("mi=.\n%f\n%f\n%f\n",m1,m2,m3)
+phi1=m1/M
+phi2=m2/M
+phi3=m3/M
+mprintf("phi i=.\n%f\n%f\n%f\n",phi1,phi2,phi3)
+M=(y1*M1)+(y2*M2)+(y3*M3)
+mprintf("Molar mass=%f\n",M)//ans vary due to roundoff error
+