Tut 4 Solution

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Simulation & Optimization

TUT(4) solution

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))

b)

function f=problem11(x)
%variable heat capicities
%cp kj/mol.k
%basis, F1=100 mol
Tref=948;
aF=34.28*10.^-3; bF=4.268*10.^-5; cF=0; dF=-8.69*10.^-12;
aM=42.93*10.^-3; bM=8.301*10.^-5; cM=-1.87*10.^-8; dM=-8.03*10.^-12;
aH=28.84*10.^-3;bH=0.00765*10.^-5;cH=0.3288*10.^-8;dH=-0.8698*10.^-12;

M2=x(1); F2=x(2);H2=x(3);T2=x(4);r=x(5);

cpF1=aF*(T2-Tref)+(bF/2)*(T2^2-Tref^2)+(cF/3)*(T2^3-Tref^3)+(dF/4)*(T2^4-
Tref^4);
cpF2=aF*(Tref-298)+(bF/2)*(Tref^2-298^2)+(cF/3)*(Tref^3 298^3)+(dF/4)*(Tref^4-
298^4);
cpH1=aH*(T2-Tref)+(bH/2)*(T2^2-Tref^2)+(cH/3)*(T2^3-Tref^3)+(dH/4)*(T2^4-
Tref^4);
cpH2=aH*(Tref-298)+(bH/2)*(Tref^2-298^2)+(cH/3)*(Tref^3-
298^3)+(dH/4)*(Tref^4-298^4);
cpM1=aM*(T2-Tref)+(bM/2)*(T2^2-Tref^2)+(cM/3)*(T2^3-Tref^3)+(dM/4)*(T2^4-
Tref^4);
cpM2=aM*(Tref-298)+(bM/2)*(Tref^2-298^2)+(cM/3)*(Tref^3-
298^3)+(dM/4)*(Tref^4-298^4);

Hr=86+(cpF2-cpM2+cpH2);
%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*cpF1+H2*cpH1+M2*cpM1);

end

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

Answer:

T2= 713.668
Question(2):
Rodwan Fathi solutions:

1/ degree of freedom table :

No of variables 8
Extent of reaction (r) 1
Temperature 3
Heat rate 1
Total ∑ 13
Givens

Material balance 5
Energy balance 1
Given compositions 1
Heat rate _
Basis 2
Temperature 3
relations 1
Total ∑ 13
Degree of freedom zero

2/ Selection of independent variables :-

Number of stream 1 2 3
Number of independent variables _ 1 5
N2 A3
O3
Selections -
M3
W3

NOTE :-
A = CH3 O = O2 M3 = NO N = Flow rate of stream2 W = H 2O

Basis = 2.4 mol O2 per 1 mol NH3


Air = 21% O2 79% N2

3/ Number of independent equations:-


Number of independent equations =
Ind. equation of material balance + ind . equation for energy balance +
relations = 5 + 1 + 1 = 7
Degree of freedom = Number of independent equations - Number of independent variables
= 7 – (6 + 1 ) =0

4/ writing equations in termes of selected variables:-


Material balance :-
For O2 2.4 – 5*r – O3 = 0

For CH3 1 – 4*r – A3 = 0

For N N2 - (2.4/0.21);

For H2O 6*r – W3 = 0

For NO 4*r – M3 = 0
Relation :-

1 – A3 – 0.9 = 0

Energy balance :-

Q = r∆Hr + ∑out NCP ∆T - ∑In NCP ∆T

∆Hr = ∆Hr0 + ∑product nCp∆T - ∑reactant nCp∆T

Let Tref = 920 C0


∆Hr at 920 C0 = -216.42 kcal \ gmol
Q = - 216420*r + ∑product nCp(920 – 920) - ( ( N O2 (N N2
+ (N NH3
Cpo2 = 8.4 cal/mol.k CpN2 = 8 cal/mol.k CpNH3 = 12 cal/mol.k

Q = (-216420*r) - ((2.4*8.4*(920-750)) + (0.79*N2*8*(920-750)) + (1*12*(920-


25)));
5/The matlab code : -

In function file :-

function f = tut4Q3(x)
% define the indepndent variables
A3 = x(1);
O3 = x(2);
M3 = x(3);
W3 = x(4);
N2 = x(5);
r = x(6);
Q = x(7);
%write the 7 equation
f(1) = 2.4 - (5*r) - O3;
f(2) = 1 - (4*r) - A3;
f(3) = N2 - (2.4/0.21);
f(4) = 6*r - W3;
f(5) = 4*r - M3;
f(6) = 1 - A3 - 0.9;
f(7) = Q -(-216420*r) - ((2.4*8.4*(920-750)) + (0.79*N2*8*(920-750)) +
(1*12*(920-25)));
end

in script file :-

% initial guess of 10 for all 7 variables


x0 = 10*ones(1,7);
% using fsolve
x=fsolve(@tut4Q3,x0);
Q = x(7);
%Print results
fprintf(' the heat of reaction in cal/mol NH3 =%7.2f\n',Q);

in command window :-
the heat of reaction in cal/mol NH3 =-22248.44

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