blob: 1b607c2ae9760140c13098e0fe39b303038b772e (
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
|
//Engineering and Chemical Thermodynamics
//Example 8.4
//Page no :371
clear ; clc ;
//Given
P_a_sat = 0.53 ; //[bar]
P_b_sat = 0.16 ; //[bar]
X = 1/3 ;
Y = 1- X ;
x_a_feed = 0.5 ;
x_b_feed = 0.5 ;
a = Y * -(x_a_feed + x_b_feed) + Y^2 ;
b = X * Y *(P_a_sat + P_b_sat) - (x_a_feed * P_b_sat + x_b_feed * P_a_sat)*X ;
c = P_a_sat * P_b_sat * X^2;
k=poly(0,'k');
P = c + b*k^1 + a*k^2 ;
M = roots(P);
disp(" Example: 8.4 Page no : 371") ;
for i = 1:2
sign(M(i,1)) ;
if ans == 1 then
printf("\n\n Pressure = %.2f bar",M(i,1)) ;
Xa = x_a_feed / (P_a_sat / M(i,1) * X + Y) ;//....E8.4D
Ya = Xa * P_a_sat / M(i,1) ;//.....E8.4B
printf("\n\n Xa = %.2f \n Ya = %.2f\n",Xa,Ya);
end
end
|