You are on page 1of 3

Tut.

Homework

1.DF

Stream Variables num 14


Extend of reaction 2
independent specification 2
MB 12
conversion 1
Yield relation 1
DF =0

2.Number of Independent unknowns:

Stream 1 2 3 4 5 6 Total
Number of 2 0 5 2 1 2 12
unknownsIndependent 2
Variables
Selection E1 _ E3,O3, C4 EO5 E6
O1 EO3,C3 W4 O6
W3

3.writing equations:

C2H4: E1 + E6 = 75
O2: O1 + O6 = 25
C2H4: 75 – 2r1 – r2= E3
O2: 25 - r1– 3r2 = O3
C2H4O: 0 + 2r1= EO3
CO2: 0 + 2r2 = C3
H2O: 0 + 2r2 = W3
C2H4: E3 = E6
O2: O3 = E6
C2H4O: EO3 = EO5
CO2: C3 = C4
H2O: W3 = W4

 Yield = 1
EO3 = 75 * 0.9

 Conversion = 1
0.2 * 75 = 75 – E3
The code:
Function file:
function f = prob2(x)
E1 = x(1); O1 = x(2); E3 = x(3); O3 = x(4); EO3 = x(5);
C3 = x(6); W3 = x(7); C4 = x(8);
W4 = x(9); EO5 = x(10); E6 = x(11); O6 = x(12); r1 =
x(13); r2 = x(14);
f(1) = E1 + E6 - 75;
f(2) = O1 + O6 - 25;
f(3) = 75 - 2*r1 - r2 - E3;
f(4) = 25 - r1 - 3*r2 - O3;
f(5) = 0 + 2*r1 - EO3;
f(6) = 0 + 2*r2 - C3;
f(7) = 0 + 2*r2 - W3;
f(8) = E3 - E6;
f(9) = O3 - O6;
f(10) = EO3 - EO5;
f(11) = C3 - C4;
f(12) = W3 - W4;
f(13) = 75 * 0.9 - EO3;
f(14) = 0.2 * 75 - 75 + E3;
end

Script file:
x0 = 10*ones(1,16);
x = fsolve(@prob2,x0);
feed = x(1)+ x(2);
fprintf (' The product flow rate of co2 = %6.2f\n',x(8));
fprintf (' The product flow rate of h2o = %6.2f\n',x(9));
fprintf (' The product flow rate of c2h4o =
%6.2f\n',x(10));
fprintf (' The product flow rate of c2h4 =
%6.2f\n',x(11));
fprintf (' The product flow rate of o2 = %6.2f\n',x(12));
fprintf (' The value of r1 = %6.2f\n',x(13));
fprintf (' The value of r2 = %6.2f\n',x(14));
fprintf (' The feed steam flow rate = %6.2f\n',feed);

Command Window:
>> run_prob3
The product flow rate of co2 = -105.00
The product flow rate of h2o = -105.00
The product flow rate of c2h4o = 67.50
The product flow rate of c2h4 = 60.00
The product flow rate of o2 = 148.75
The value of r1 = 33.75
The value of r2 = -52.50
The feed steam flow rate = -108.75

You might also like