From 7f60ea012dd2524dae921a2a35adbf7ef21f2bb6 Mon Sep 17 00:00:00 2001 From: prashantsinalkar Date: Tue, 10 Oct 2017 12:27:19 +0530 Subject: initial commit / add all books --- 3825/CH10/EX10.2/Ex10_2.sce | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 3825/CH10/EX10.2/Ex10_2.sce (limited to '3825/CH10/EX10.2/Ex10_2.sce') 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 + -- cgit