summaryrefslogtreecommitdiff
path: root/647/CH10/EX10.10/Example10_10.sce
blob: 1a0644d94f7404763ec7ad985abc7743cdb2d061 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
clear;
clc;

// Example: 10.10
// Page: 412

printf("Example: 10.10 - Page: 412\n\n");

// Solution

//*****Data******//
P = 101.3;// [kPa]
P1sat = 100.59;// [kPa]
P2sat = 99.27;// [kPa]
x1 = 0.532;
//****************//

x2 = 1 - x1;
gama1 = P/P1sat;
gama2 = P/P2sat;
A = log(gama1)*(1 + (x2*log(gama2))/(x1*log(gama1)))^2;
B = log(gama2)*(1 + (x1*log(gama1))/(x2*log(gama2)))^2;

// For solution containing 10 mol percent benzene:
x1 = 0.10;
x2 = 1 - x1;
gama1 = exp(A/(1 + (A*x1/(B*x2))^2));
gama2 = exp(B/(1 + (B*x2/(A*x1))^2));
printf("Activity Coeffecient\n");
printf("gama1 = %.3f\n",gama1);
printf("gama2 = %.3f\n",gama2);