0% found this document useful (0 votes)
40 views2 pages

Assigment 5

The document describes a numerical iteration to calculate the equilibrium composition of a gas mixture given initial mole fractions and conditions. The algorithm initializes molar concentrations and iteratively updates them using an inverse gradient matrix until concentrations converge within a specified tolerance.

Uploaded by

Tanishq Dhanuka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views2 pages

Assigment 5

The document describes a numerical iteration to calculate the equilibrium composition of a gas mixture given initial mole fractions and conditions. The algorithm initializes molar concentrations and iteratively updates them using an inverse gradient matrix until concentrations converge within a specified tolerance.

Uploaded by

Tanishq Dhanuka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

%known values

nCH4_feed = 13.5;
nH2O_feed = 86.5;
Ptot = 12.2;
tolerance = 0.01;
%initialization
n = [1 1 1 1 1 1]; %[CH4 H2O CO2 CO H2 Ntot]
%N-R iteration
for i=1
%variable matrix
A = transpose(n(i,:));
%function matrix
B = [(((n(i,5)^3)*n(i,4))/(n(i,1)*n(i,2)*(n(i,6)^2)))*148.84 - 126.8;
((n(i,5)*n(i,3))/(n(i,4)*n(i,2))) - 0.929;
n(i,1) + n(i,2) + n(i,3) + n(i,4) + n(i,5) - n(i,6)
n(i,4) + n(i,3) + n(i,1) - nCH4_feed;
n(i,4) + (2*n(i,3)) + n(i,2) - nH2O_feed;
(2*n(i,5)) + (2*n(i,2)) + (4*n(i,1)) - (4*nCH4_feed) - (2*nH2O_feed)];
%gradient matrix
Z = [(-1*(n(i,5)^3)*n(i,4)*(Ptot^2))/((n(i,1)^2)*n(i,2)*(n(i,6)^2)), (-
1*(n(i,5)^3)*n(i,4)*(Ptot^2))/((n(i,2)^2)*n(i,1)*(n(i,6)^2)), 0,
((n(i,5)^3)*(Ptot^2))/(n(i,1)*n(i,2)*(n(i,6)^2)),
(3*(n(i,5)^2)*n(i,4)*(Ptot^2))/(n(i,1)*n(i,2)*(n(i,6)^2)), (-
2*(n(i,5)^3)*n(i,4)*(Ptot^2))/(n(i,1)*n(i,2)*(n(i,6)^3));
0, -(n(i,5)*n(i,3))/((n(i,2)^2)*n(i,4)), n(i,5)/(n(i,2)*n(i,4)), -
(n(i,5)*n(i,3))/(n(i,2)*(n(i,4)^2)),
n(i,3)/(n(i,2)*n(i,4)), 0;
1, 1, 1, 1, 1, -1;
1, 0, 1, 1, 0, 0;
0, 1, 2, 1, 0, 0;
4, 2, 0, 0, 2, 0];
C = A - (inv(Z)*B);
n(i+1,:) = transpose(C);
if n(i+1)-n(i)<tolerance
break
end
i=i+1;

end
Feasibility Equilibrium
Temperature Equilibrium
Reaction Conversion at given
(K) Constant (K) (High/Moderate/Low) Temperature

1.    S(s) +
300 4.4×10 53

O (g) ⇌ SO (g)
2 2

2.    2 H (g) + 2

O (g) ⇌ 2
2 500 2.4×10 47

H O(g) 2

3.    H (g) + 2

Cl (g) ⇌ 2
2 300 1.6×10 33

HCl(g)

4.    H (g) + 2

Br (g) ⇌ 2
2 300 4.1×10 18

HBr(g)

5.    2 NO(g) +
O (g) ⇌ 2
2 300 4.2×10 13

NO (g) 2

6.    3 H (g) + 2

N (g) ⇌ 2
2 300 2.7×10 8

NH (g) 3

7.    H (g) + 2

D (g) ⇌ 2
2 100 1.92
HD(g)

8.    H (g) +
300 2.9×10
2
−1

I (g) ⇌ 2 HI(g)
2

9.    I (g) ⇌ 2
800 4.6×10
2
−7

I(g)

10.  Br (g) ⇌ 2
1000 4.0×10
2
−7

Br(g)

11.  Cl (g) ⇌ 2
1000 1.8×10
2
−9

Cl(g)

12.  F (g) ⇌ 2
500 7.4×10
2
−13

F(g)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy