summaryrefslogtreecommitdiff
path: root/1394/CH13/EX13.2.2/Ex13_2_2.sce
blob: 81d983519910c3e0e7f0d25d00bc2541ebdc6ee1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22


clc
//initialization of variables
x0 = 0.0082
xB = 10^-4
L = 1
//Calculations
y0 = 36*x0
//There are two balancing equations , mole fraction balance , mole balance , from them G is 
G0 = (xB-x0)*L/(xB-y0)
G = 3*G0
B = L-G
y1 = ((L*x0)-(B*xB))/G
yNplus1 = 36*xB
xN = (L*x0 - (G*(y1-yNplus1)))/L
yN = 36*xN
N = (log((yNplus1-yN)/(y1-y0)))/log((yNplus1-y1)/(yN-y0))
//Results
printf("The number of stages are %.1f",N)
//Answer wrong in textbook