summaryrefslogtreecommitdiff
path: root/2762/CH11/EX11.1.1/11_1_1.sce
blob: c37cc919d5cde594cc4266f56a4bd00c5458e760 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//Transport Processes and Seperation Process Principles
//Chapter 11
//Example 11.1-1
//Vapour Liquid Seperation Processes
//given data
pa=[116.9 135.5 155.7 179.2 204.2 240]
pb=[46 54 63.3 74.3 86 101.32]
P=101.32
//eq: paxa+pb(1-xa)=P
xa=[];
ya=[];
for i=1:6
    xa(i)=(P-pb(1,i))/(pa(1,i)-pb(1,i))
    ya(i)=((pa(1,i))*xa(i))/P
end
xa(7)=1;
ya(7)=1;
m=linspace(0,1,10)
n=linspace(0,1,10)
plot(m,n)
plot2d(xa,ya,rect=[0 0 1 1])
xtitle("raolts law","xa","ya")
mprintf("xa=%f",xa);
mprintf("ya=%f",ya);