You are on page 1of 3

2‫تيتويال‬

H.W

‫محمد ياسر غانم‬

162047

Splitter case(2) is assumed

DF table:-

mixer RO splitter process overall


Number of stream variables 6 6 6 12 6
Number of independent material balance 2 2 2 6 2
equations
Number of independent compositions 2 1 2 4 3
Number of given relations 1 - 1 1 1
Number of given flows - 1 - - -
basis 1 - - 1 1
Degree of freedom 0 2 1 0 0

(DF = 0) therefore this problem is solvable.

Number of Independent unknowns in each stream table:-

Stream number 1 2 3 4 5 6 total


Independent unknown variables 0 2 1 2 1 1 7

Number of independent equations :-

Material balance equations = 6

Relations 1

Total =7

Selection of independent variables :-

S2,w2,w3,w4,s4,w5,w6

Then we write the equations in terms of the selected independent variables:-

Material balance equations :

mixer:

water:

9690+w6-w2=0
Salt:

310+525/9475*w6-s2+0

RO:

water:

W2-w3-w4=0

salt:

s2-5/9995w3-4=0

splitter:

water:

w4-w5-w6=0

salt:

s4-5.25/94.75w5-5.25/94.75w6

CODE:
FUNCTION CODE

function f=reverse_osmosis(x)
f(1)=9690+x(7)-x(2);
f(2)=310+((525/9475)*x(7))-x(1);
f(3)=x(2)-x(3)-x(4);
f(4)=x(4)-x(6)-x(7);
f(5)=x(1)-(0.05/99.95)*x(3)-x(5);
f(6)=x(5)-((5.25/94.75)*x(6))-x(7);
f(7)=x(7)-(0.5*x(6));
end

SCRIPT CODE

x0=[1 1 1 1 1 1 1];
x=fsolve(@reverse_osmosis,x0)
fprintf('%8.8f',x(1))
n5=x(6)/0.9475;
s5 = n5*0.0525
xs2 = x(1)/(x(1)+x(2))
XW2 = x(2)/(x(1)+x(2))
xw4 = x(4)/(x(4)+x(5))
xw5 = x(6)/n5
n6 = n5*.5
xw6= x(7)/n6
fprintf('the value of xS2=%7.4f\n',xS2)
fprintf('the value of xW2=%7.4f\n',xW2)
fprintf('the value of xW3=%7.4f\n',xW3)
fprintf('the value of xW4=%7.4f\n',xW4)
fprintf('the value of xW5=%7.4f\n',xW5)
fprintf('the value of xW6=%7.4f\n',xW6)

You might also like