0% found this document useful (0 votes)
30 views

Tutorials Solutions

This document contains information and equations related to three tutorial problems involving material and energy balances for chemical processes. The first problem involves a process with 13 variables and 4 material balance equations. The second problem models a reverse osmosis process with 12 variables, 5 material balances, and 1 relation. The third problem involves a two-reactor system with 20 variables, 14 material balances, and 2 splitter relations.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Tutorials Solutions

This document contains information and equations related to three tutorial problems involving material and energy balances for chemical processes. The first problem involves a process with 13 variables and 4 material balance equations. The second problem models a reverse osmosis process with 12 variables, 5 material balances, and 1 relation. The third problem involves a two-reactor system with 20 variables, 14 material balances, and 2 splitter relations.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Tutorials Solutions

Tutorial Two:
Q1/

Process:

Number of variables 13
Number of independent compositions 7
Relations 1
Basis 1
Number of material balance equations (MB)
4
DF 0

Stream 1 2 3 4 total
No. 2 1 0 2 5
selection C1,D1 N2 - B4,D4

Independent equations =5

A:

0.2*N1+0.1*200=0.05*N4+0.75*N2

C+D=0.55*N1

N1=(C+D)/0.55

((20/55)*(C1+D1))+0.1*200-((5/95)*(B4+D4))-0.75*N2=0

B:

((25/55))*(C1+D1))+0.2*200-0.2*N2-B4=0

C:

C1+0.7*200-0.05*N2=0

D:

D1-D4=0

Relation:

N3/N1=0.3

200/0.3=(100/55)*(C1+D1)
(200/0.3)-((100/55)*(C1+D1))=0

Code

Function:

function f=tut21(x)
C1=x(1);D1=x(2);N2=x(3);B4=x(4);D4=x(5);
f(1)=((20/55)*(C1+D1))+20-0.75*N2-((5/95)*(B4+D4));
f(2)=((25/55)*(C1+D1))+40-0.2*N2-B4;
f(3)=C1+140-0.05*N2;
f(4)=D1-D4;
f(5)=(200/0.3)-((100/55)*(C1+D1));
end

Script:

x0=10*ones(1,5);
x=fsolve(@tut21,x0);
A4=((5/95)*(x(4)+x(5)));
fprintf('the flowrate of A in stream 4=%6.2f/n',A4)

Answer from command window:

the flowrate of A in stream 4= 35.48/n>>

Q2\

Process:

Number of variables 12
Number of independent compositions 5
Relations 1
Splitter relation -
Basis 1
Number of material balance equations
5
DF 0

Stream 1 2 3 4 5 6 total
No. 0 2 1 1 1 1 6
selection - S2,W2 N3 N4 N5 N6

Independent equations =6
Mixer:

For S:

310+0.0525*N6-S2=0

For w:

9690+0.9475*N6-W2=0

Reverses osmosis:

For S:

S2-5*10-4*N3-0.0525*N4=0

For w:

W2-0.9995*N3-0.9475*N4=0

Splitter:

For W:

0.9475*N4-0.9475*N5-0.9475*N6=0

Relation:

N6-0.5*N5=0

Code
Function:

function f=reverses(x)
S2=x(1);W2=x(2);N3=x(3);N4=x(4);N5=x(5);N6=x(6);
f(1)=N6-0.5*N5;
f(2)= 310+0.0525*N6-S2;
f(3)= -W2+9690+0.9475*N6;
f(4)= S2-0.0525*N4-((5*10^-4)*N3);
f(5)= W2-0.9995*N3-0.9475*N4;
f(6)=0.9475*N4-0.9475*N5-0.9475*N6;

end

Script :

x0=10*ones(1,6);
x =fsolve(@reverses,x0);
xS2=x(1)/(x(1)+x(2));
xW2=x(2)/(x(1)+x(2));
xW4=(x(4)-0.0525*x(4))/x(4);
xW5=(x(5)-0.0525*x(5))/x(5);
xW6=(x(6)-0.0525*x(6))/x(6);
xW3=(x(3)-0.0005*x(3))/x(3);
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)

Answer from command window:

the value of xS2= 0.0359

the value of xW2= 0.9641

the value of xW3= 0.9995

the value of xW4= 0.9475

the value of xW5= 0.9475

the value of xW6= 0.9475

>>

Q3\

Process:

Number of variables 14
Number of independent compositions 4
Relations 0
Basis 4
Number of material balance equations
6
DF 0

Stream 1 2 3 4 5 6 7 total
No. 0 0 2 0 2 0 2 6
selection - - A3,B3 - A5,B5 - A7,B7

Independent equations =6

Tower (1):

For A:

28-A3=0
For B:

92-B3=0

Mixer:

For A:

18+A3-A5=0

For B:

42+B3-B5=0

Tower (2):

For A:

A5-36-A7=0

For B:

B5-24-B7=0

Code

Function:

function f=towers(x)
A3=x(1);B3=x(2);A5=x(3);B5=x(4);A7=x(5);B7=x(6);
f(1)= 0.5*200-0.9*80-A3;
f(2)=A3+0.3*60-A5;
f(3)=A5-0.6*60-A7;
f(4)=0.5*200-0.1*80-B3;
f(5)=B3+0.7*60-B5;
f(6)=B5-0.4*60-B7;
end

Script:

x0=0*ones(1,6);
x=fsolve(@towers,x0);
xA3=x(1)/(x(1)+x(2));
xB3=x(2)/(x(1)+x(2));
xA5=x(3)/(x(3)+x(4));
xB5=x(4)/(x(3)+x(4));
xA7=x(5)/(x(5)+x(6));
xB7=x(6)/(x(5)+x(6));
fprintf('the value of xA3=%7.4f\n',xA3)
fprintf('the value of xB3=%7.4f\n',xB3)
fprintf('the value of xA5=%7.4f\n',xA5)
fprintf('the value of xB5=%7.4f\n',xB5)
fprintf('the value of xA7=%7.4f\n',xA7)
fprintf('the value of xB7=%7.4f\n',xB7)
Answer from command window:

the value of xA3= 0.2333

the value of xB3= 0.7667

the value of xA5= 0.2556

the value of xB5= 0.7444

the value of xA7= 0.0833

the value of xB7= 0.9167

Tutorial Three:
Q1/

Process:

Number of variables 20+1


Number of independent compositions 4
Splitter Relations 2
Basis 1
Number of material balance equations
14
DF 0

Stream 1 2 3 4 5 6 7 total
No. 0 2 4 1 2 3 3 15+1
selection - N2,G2 A3,H3,N3,G3 A4 N5,G5 N6,G6,H6 N7,H7,G7

Independent equations =16

75.15+H7-((79.52/20.48)*(N2+G2))=0
24.58+N7-N2=0
0.27+G7-G2=0
((79.52/20.48)*(N2+G2))-3*r1-H3=0
N2-N3-r1=0
2*r1-A3=0
G2-G3=0
A3-A4=0
H3-((80.01/19.99)*(N5+G5))=0
N3-N5=0
G3-G5=0
N5-N6-N7=0
G5-G6-G7=0
((80.01/19.99)*(N5+G5))-H6-H7=0
(N6/(N6+G6+H6))-(N7/(N7+G7+H7))=0
(H6/(H6+G6+N6))-(H7/(N7+G7+H7))=0

Code

Function:

function f=reactor1(x)
N2=x(1);G2=x(2);A3=x(3);H3=x(4);N3=x(5);G3=x(6);A4=x(7);
N5=x(8);G5=x(9);N6=x(10);G6=x(11);H6=x(12);N7=x(13);G7=x(14);H7=x(15)
;r1=x(16);
f(1)=75.15+H7-((79.52/20.48)*(N2+G2));
f(2)=24.58+N7-N2;
f(3)=0.27+G7-G2;
f(4)=((79.52/20.48)*(N2+G2))-3*r1-H3;
f(5)=N2-N3-r1;
f(6)=2*r1-A3;
f(7)=G2-G3;
f(8)=A3-A4;
f(9)=H3-((80.01/19.99)*(N5+G5));
f(10)=N3-N5;
f(11)=G3-G5;
f(12)=N5-N6-N7;
f(13)=G5-G6-G7;
f(14)=((80.01/19.99)*(N5+G5))-H6-H7;
f(15)=(N6/(N6+G6+H6))-(N7/(N7+G7+H7));
f(16)=(H6/(H6+G6+N6))-(H7/(N7+G7+H7));
end

Script:

x0=10*ones(1,16);
x=fsolve(@reactor1,x0);
N6=x(10)+x(11)+x(12);
N7=x(13)+x(14)+x(15);
fprintf('the flowrate of purge=%7.4f\n',N6)
fprintf('the flowrate of recycle=%7.4f\n',N7)

Answer from command window:

the flowrate of purge= 2.9940


the flowrate of recycle=891.8367

Q2/
Process:

Number of variables 14+2


Number of independent compositions -
Relations 2
Basis/flows 2
Number of material balance equations
12
DF 0
Stream 1 2 3 4 5 6 TOTAL
No. 2 0 5 2 1 2 12+2
selection A, O - A, O, P, C, H H, C P A, O

Notice:

In the above table and in upcoming equation we have

A = flowrate of C2H4 , O= flowrate of O2 , P= flowrate of our product (C2H4O)

C= flow rate of CO2 , H= flowrate of H2O

Also notice the number near the flowrate indicates the number of stream

Example; A1= the flowrate of C2H4 in stream 1

Total number of independent variables = 14

Total number of independent equation :

MB= 12

Relations=2

Independent equations =14

equations in terms of unknowns:

MB for mixer:

A1+A6-75=0 (1)

O1+O6-25=0 (2)

MB for reactor:

75-A3-2*r1-r2=0 (3)

25-O3-r1-3*r2=0 (4)

2*r1-P3=0 (5)

2*r2-C3=0 (6)

2*r2-H3=0 (7)

MB for separator:

A3-A6=0 (8)

O3-O6=0 (8)
O3-O6=0 (9)

P3-P5=0 (10)

C3-C4=0 (11)

H3-H4=0 (12)

(P3/75)-(90/100)=0 (13)

75-A3-0.2*75=0( 14)

Code

Function:

function f = mu3nnatut3(x)
A1= x(1); O1 =x(2);A3=x(3);O3=x(4); P3=x(5);C3=x(6); H3=x(7);
H4=x(8); C4=x(9);P5=x(10); A6=x(11); O6=x(12); r1=x(13); r2=x(14);
%MB for unit 1 :
%C2H4 balance:
f(1)=A1+A6-75;
%O2 balance
f(2)=O1+O6-25;
%MB for unit 2:
%C2H4 balance:
f(3)=75-A3-2*r1-r2;
%O2 balance :
f(4)=25-O3-r1-3*r2;
%C2H4O balance:
f(5)=2*r1-P3;
%CO2 balance :
f(6)=2*r2-C3;
%H2O balance:
f(7)=2*r2-H3;
%MB for unit 3:
%C2H4 balance:
f(8)=A3-A6;
%O2 balance
f(9)=O3-O6;
%C2H4O balance:
f(10)=P3-P5;
%CO2 balance:
f(11)=C3-C4;
%H2O balance:
f(12)=H3-H4;
%Given relations:
f(13)=(P3/75)-(90/100);
f(14)=((75-A3)/75)-(20/100);
end

Script:

%initial guess of 5 for all 14 variables:


x0=5*ones(1,14);
x=fsolve(@mu3nnatut3,x0);
FLOWRATE_4=x(8)+x(9);
FLOWRATE_5=x(10);
FLOWRATE_1=x(1)+x(2);
CON=(x(1))/x(1);
fprintf('FLOWRATE_4=%6.2f\n',FLOWRATE_4)
fprintf('FLOWRATE_5=%6.2f\n',FLOWRATE_5)
fprintf('FEED STREAM FLOWRATE=%6.2f\n',FLOWRATE_1)
fprintf('R1=%6.2f\n',x(13))
fprintf('R2=%6.2f\n',x(14))
fprintf('Total conversion=%6.2f\n',CON)

Answer from command window:

FLOWRATE_4=-210.00

FLOWRATE_5= 67.50

FEED STREAM FLOWRATE=-108.75

R1= 33.75

R2=-52.50

Total conversion= 1.00

Q3/

Process:

Number of variables 7+3


Number of independent compositions 4
Splitter Relations -
Basis 1
Number of material balance equations
5
DF 0

Stream 1 2 TOTAL
No. - 2 2+3
selection - H,C
A= H2 , B=CO2

Reaction equations:

The number of ind. MB = 5

The number of unk.variables =5

So DF=5-5=0

Equations in term of unknown variables H2 , CO2 (A and B respectively):


75-(2*r1)-(3*r2)+r3-H2=0

25-r1-r2-r3-((20/67)*(H2+CO2))=0

r2-((5/67)*(H2+CO2))=0

r1-((8/67)*(H2+CO2))=0

r3-CO2=0

Code

Function:

function f=tut33(x)
r1=x(1);r2=x(2);r3=x(3);H2=x(4);CO2=x(5);
f(1)=75-(2*r1)-(3*r2)+r3-H2;
f(2)=25-r1-r2-r3-((20/67)*(H2+CO2));
f(3)=r2-((5/67)*(H2+CO2));
f(4)=r1-((8/67)*(H2+CO2));
f(5)=r3-CO2;

end

Script:

x0=100*ones(1,5);
x=fsolve(@tut33,x0);
N2=((x(4)+x(5))/0.67);
H2=x(4)/N2;
CO2=x(5)/N2;
fprintf('the composition of H2=%6.2f\n',H2)
fprintf('the composition of CO2=%6.2f\n',CO2)

Answer from command window:

the composition of H2= 0.67

the composition of CO2= -0.00

USING MATRIX:

A=[-2 -3 1 -1 0;
-1 -1 -1 (20/67) (20/67);
0 1 0 (5/67) (5/67);
1 0 0 (8/67) (8/67);
0 0 1 0 -1];
B=[75;25;0;0;0];
x=A\B;
H2=x(4)/(((8/67)*(x(4)+x(5)))+((5/67)*(x(4)+x(5)))+((20/67)*(x(4)+x(5
)))+x(4)+x(5));
CO2=x(5)/(((8/67)*(x(4)+x(5)))+((5/67)*(x(4)+x(5)))+((20/67)*(x(4)+x(
5)))+x(4)+x(5));
fprintf('the composition of H2=%6.2f\n',H2)
fprintf('the composition of CO2=%6.2f\n',CO2)
Answer from command window:

the composition of H2= 0.40

the composition of CO2= 0.27

Tutorial Four:
Q1/

𝑅1 𝑅2 𝑅3 𝑅4 𝑅5
𝐶6𝐻5𝑁𝐻2 −1 0 −1 0 0
𝐶2𝐻5𝑂𝐻 −1 −1 0 0 −1
𝐶6𝐻5𝑁𝐻𝐶2𝐻5 1 0 1 −1 −1
𝐻2𝑂 1 1 0 0 1
𝐶2𝐻4 0 1 −1 −1 0
𝐶6𝐻5𝑁(𝐶2𝐻5)2 0 0 0 1 1
Let R1 be R1*-1

Let R3 be R3 – R1

𝑅1 𝑅2 𝑅3 𝑅4 𝑅5
𝐶6𝐻5𝑁𝐻2 1 0 0 0 0
𝐶2𝐻5𝑂𝐻 1 −1 1 0 −1
𝐶6𝐻5𝑁𝐻𝐶2𝐻5 −1 0 0 −1 −1
𝐻2𝑂 −1 1 −1 0 1
𝐶2𝐻4 0 1 −1 −1 0
𝐶6𝐻5𝑁(𝐶2𝐻5)2 0 0 0 1 1
Interchange row 2 and row 5

𝑅1 𝑅2 𝑅3 𝑅4 𝑅5
𝐶6𝐻5𝑁𝐻2 1 0 0 0 0
𝐶2𝐻4 0 1 −1 −1 0
𝐶6𝐻5𝑁𝐻𝐶2𝐻5 −1 0 0 −1 −1
𝐻2𝑂 −1 1 −1 0 1
𝐶2𝐻5𝑂𝐻 1 −1 1 0 −1
𝐶6𝐻5𝑁(𝐶2𝐻5)2 0 0 0 1 1
Let R3 be R3+R2

Let R4 be R4+R2
𝑅1 𝑅2 𝑅3 𝑅4 𝑅5
𝐶6𝐻5𝑁𝐻2 1 0 0 0 0
𝐶2𝐻4 0 1 0 0 0
𝐶6𝐻5𝑁𝐻𝐶2𝐻5 −1 0 0 −1 −1
𝐻2𝑂 −1 1 0 1 1
𝐶2𝐻5𝑂𝐻 1 −1 0 −1 −1
𝐶6𝐻5𝑁(𝐶2𝐻5)2 0 0 0 1 1
Let R5 be R5 – R4 and the interchange R3 and R4

𝑅1 𝑅2 𝑅4 𝑅3 𝑅5
𝐶6𝐻5𝑁𝐻2 1 0 0 0 0
𝐶2𝐻4 0 1 0 0 0
𝐶6𝐻5𝑁𝐻𝐶2𝐻5 −1 0 −1 0 0
𝐻2𝑂 −1 1 1 0 0
𝐶2𝐻5𝑂𝐻 1 −1 −1 0 0
𝐶6𝐻5𝑁(𝐶2𝐻5)2 0 0 1 0 0
Interchange row 3 and 6

𝑅1 𝑅2 𝑅4 𝑅3 𝑅5
𝐶6𝐻5𝑁𝐻2 1 0 0 0 0
𝐶2𝐻4 0 1 0 0 0
𝐶6𝐻5𝑁(𝐶2𝐻5)2 0 0 1 0 0
𝐻2𝑂 −1 1 1 0 0
𝐶2𝐻5𝑂𝐻 1 −1 −1 0 0
𝐶6𝐻5𝑁𝐻𝐶2𝐻5 −1 0 −1 0 0

 R1, R2 and R4 are the set of independent reactions


Q2/

(a)

Degree of freedom table:

# of stream variables 4
R 1
Temperatures 2
Q 1
∑ 8
Givens
M.B 3
Conversion 1
Basis 1
E.B 1
Temperatures 1
Q 1
∑ 8
DF ZERO

Independent Unknown variables:

Stream 1 2 ∑
#Independent 0 3 4 + 1R =
variables 5
T 0 1
Selection - F2, M2 , H2, r
T2

Number of independent equations = MB equations + EB equations +


conversion = 3 + 1 + 1 = 5 (O.K) equal to the number of independent
variables.

Independent equations:

1) MB equations:
1. F2 = r
2. M2 = 100 – r
3. H2 = r
2) Conversion:
100−𝑀2
4. = 0.25
100

3) EB equation:

𝑄 = 𝑟∆𝐻𝑟 + ∑ 𝑁 ∗ 𝐶𝑃 ∗ ∆𝑇 − ∑ 𝑁 ∗ 𝐶𝑃 ∗ ∆𝑇
𝑂𝑈𝑇 𝐼𝑁

𝐶𝐻3 𝑂𝐻(𝑔) → 𝐻𝐶𝐻𝑂𝑔 + 𝐻2 𝑔 ……. The chem. Reaction equation


Tref = 675˚C

∆𝐻𝑟 = ∆𝐻𝑟(25℃) + ∑ 𝑛𝐶𝑃∆𝑇 − ∑ 𝑛𝐶𝑃∆𝑇


𝑃 𝑅

∆𝐻𝑟(25℃) = ∑ ∆𝐻𝑓 − ∑ ∆𝐻𝑓 = −115.9 − (−201.1)


𝑃 𝑅
𝐾𝐽 𝑐𝑎𝑙
∆𝐻𝑟(25℃) = 85.2 = 20363.29
𝑚𝑜𝑙 𝑚𝑜𝑙

∆𝑯𝒓 = 𝟐𝟎𝟑𝟔𝟑. 𝟐𝟗 + (𝟏 ∗ 𝟏𝟐 ∗ (𝑻𝒓𝒆𝒇 − 𝟐𝟓)) + (𝟏 ∗ 𝟕 ∗ (𝑻𝒓𝒆𝒇 − 𝟐𝟓)) − (𝟏 ∗ 𝟏𝟕 ∗ (𝑻𝒓𝒆𝒇 − 𝟐𝟓))


= 𝟐𝟏𝟔𝟔𝟑. 𝟐𝟗 𝒄𝒂𝒍/𝒎𝒐𝒍

5.
𝑸 = 𝟎 = ( 𝒓 ∗ 𝟐𝟏𝟔𝟔𝟑. 𝟐𝟗 ) + (𝑭𝟐 ∗ 𝟏𝟐 ∗ (𝑻𝟐 − 𝟔𝟕𝟓))
+ (𝑯𝟐 ∗ 𝟕 ∗ (𝑻𝟐 − 𝟔𝟕𝟓)) + (𝑴𝟐 ∗ 𝟏𝟕 ∗ (𝑻𝟐 − 𝟔𝟕𝟓)) − 𝟎

∑ 𝑁 ∗ 𝐶𝑃 ∗ ∆𝑇 = 0 (𝐵𝑒𝑐𝑎𝑢𝑠𝑒 𝑇𝑠𝑡𝑟𝑒𝑎𝑚 = 𝑇𝑟𝑒𝑓 𝑎𝑛𝑑 𝑡ℎ𝑎𝑡 𝑔𝑖𝑣𝑒 ∆𝑇 = 0)


𝐼𝑁

Code

Function:

function f=problem1(x)
%constant heat capicities
%cp cal/mol.C
%basis, F1=100 mol
%Hr=86 kj
%1 kj=0.239 kcal=239 cal
Tref=675;cpH=7;cpF=12;cpM=17;
Hr=20554+(cpH-cpM+cpF)*(Tref-25);
M2=x(1);F2=x(2);H2=x(3);T2=x(4);r=x(5);
%MB
f(1)=100-r-M2;
f(2)=r-F2;
f(3)=r-H2;
%CONVERSION
f(4)=((100-M2)/100)-0.25;
%EB
f(5)=r*Hr+(F2*cpF+H2*cpH+M2*cpM)*(T2-Tref);
end

Script:

x0=700*ones(1,5);
x=fsolve(@problem1,x0);
fprintf('T2=%8.3f\n',x(4))

Answer from command window:

T2= 362.800

You might also like