You are on page 1of 4

3‫تيتويال‬

H.W

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

162047

DF table:-

Number of stream variables 14+2


Number of independent 12
material balance equations
Given flows 2
Number of given relations 2
basis 0
Degree of freedom 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 2 0 5 1 2 2 12+2

Number of independent equations :-

Material balance equations = 12

Given relations =2

Total = 14
Selection of independent variables :-

(IN the following A==ethane,,,,,,,O===oxygen,,,B==Ethylene oxide,,,C==CO2,,W==H2O)

A1,O1,A3,O3,B3,C3,W3,W5,C5,B4,A6,O6

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

Material balance equations :

MIXER

A:

A1+A6-75=0

O:

O1+O6-25=0

REACTOR:

A:

75-A3-2r1-r2=0

O:

25-O3-r1-3r2=0

B:

2r1-B3=0

C:

C3-2r2=0

W:

W3-2r2=0

Separator:

A:

A3-A6=0

O:

O3-O6=0

B:

B3-B4=0
C:

C3-C5=0

W:

W3-W5=0

RELATIONS:

75-A3-0.2*75=0

0.9*75-B3=0

CODE:
FUNCTION CODE

function f = tut_3_3(x)
A1= x(1); O1 =x(2);A3=x(3);O3=x(4); B3=x(5);C3=x(6);
W3=x(7);
W5=x(8); C5=x(9);B4=x(10); A6=x(11); O6=x(12); r1=x(13);
r2=x(14);
f(1)=A1+A6-75;
f(2)=O1+O6-25;
f(3)=75-A3-(2*r1)-r2;
f(4)=25-O3-r1-(3*r2);
f(5)=(2*r1)-B3;
f(6)=2*r2-C3;
f(7)=2*r2-W3;
f(8)=A3-A6;
f(9)=O3-O6;
f(10)=B3-B4;
f(11)=C3-C5;
f(12)=W3-W5;
f(13)=75-A3-(0.2*75);
f(14)=B3-(75*0.9);
end

SCRIPT CODE

x0=1*ones(1,14);
x=fsolve(@tut_3_3,x0);
FLOWRATE_4=x(10);
FLOWRATE_5=x(8)+x(9);
FLOWRATE_1=x(1)+x(2);
CON=(x(1)-0)/x(1);
% no ethane leaving the system
fprintf('FLOWRATE_4=%5.5f\n',FLOWRATE_4)
fprintf('FLOWRATE_5=%5.5f\n',FLOWRATE_5)
fprintf('FEED STREAM FLOWRATE=%5.5f\n',FLOWRATE_1)
fprintf('R1=%5.5f\n',x(13))
fprintf('R2=%5.5f\n',x(14))
fprintf('Total conversion=%5.5f\n',CON)

Answer from command window:


FLOWRATE_4=67.50000

FLOWRATE_5=-210.00000

FEED STREAM FLOWRATE=-108.75000

R1=33.75000

R2=-52.50000

Total conversion= 1.00

You might also like