DF Zero: Total

You might also like

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

Almoanna Mahmoud 152012

PROPLEM 2.B:

Degree of freedom table:


# of stream variables 4
R 1
Temperatures 2
Q 1
total 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 4 + 1R =
0 3
variables 5
T 0 1
F2, M2 , H2,
Selection - r
T2
Number of independent equations = MB equations + EB equations +
conversion = 3 + 1 + 1 = 5 (O.K) equal to the number of independent
variables.
Now for coding:
function f=homework4(x)
%basis CH3OH =1000mol/h
%variable heat capisities
Tref=25+273;
T1=675+273;
%Hr(at 25) = 20.38kcal/mol
M2=x(1);H2=x(2);F2=x(3);r=x(4);T2=x(5);
ah=13704*10^-3;bh=40085*10^-5;ch=-23092*10^-8;
am=75.75*10^-3;bm=16.83*10^-5;
af=34.28*10^-3;bf=4.268*10^-5;
%material balance:
f(1)=M2-1000+r;

1
Almoanna Mahmoud 152012

f(2)=H2-r;
f(3)=F2-r;
%conversion relation:
f(4)=((1000-M2)/1000)-0.25;
HH=ah*(T2-Tref)+bh/2*(T2^2-Tref^2)+ch/3*(T2^3-Tref^3);
HM2=am*(T2-Tref)+bm/2*(T2^2-Tref^2);
HM=am*(T1-Tref)+bm/2*(T1^2-Tref^2);
HF=af*(T2-Tref)+bf/2*(T2^2-Tref^2);
%energy balance:
f(5)=r*(20.38*1000)+(((H2*HH)+(F2*HF)+(M2*HM2))*(T2-298))-1000*HM(T1-
298);
end
script file:
x0=10*ones(1,5);
x= fsolve (@homework4,x0);
M2=x(1);H2=x(2);F2=x(3);r=x(4);T2=x(5);
fprintf('The temperature of stream 2 = %6.3f \n',T2)

2
Almoanna Mahmoud 152012

Problem 3: a

DF table:

NO. of variables 8
EXTENT OF REACTION 1
Temperature 3
Q 1
Basis 2
Material Balance 5
Temperature 3
Energy Balance 1
Conversion 1
relation 1
DF Zero

TABLE OF INDEPENDENT UNKOWN VARIABLEs:

STREAM NO. 1 2 3 SUM


Number of - 1 5 2+1+5
variable
Variable N N,O,NO,W,A Q,,r
SELECTION

Number of independent eq=8

M.B=5

E.B=1

RELATION=1

3
Almoanna Mahmoud 152012

Conv.=1

D.F=NUM. OF I. VARIABLE - NUM. OF I. EQ=8-8=0


Correctly specified
Material balances:
A3-1+4*r=0 /NH3 BALANCE
o3-2.4-5*r=0 /O2 BALANCE
N3-N2=0 /N2 BALANCE
NO3-4*r=0 /NO BALANCE
W3-6*r=0 /H2O BALANCE

Conversion equation:
1-N3-0.9=0
%RELATION:
N2-(2.4*0.79/0.29)=0
Energy balance:
Q=r*-1630.52*1000+(W3*4.18/18+A3*2.2/19+O3*0.918/32+N3*1.04/14+NO3*0.995/30)*(920-25)-(750-
25)*(2.2*0.918/32+N2*1.04/28)

Matlab code:
function f=Mu3nnaTUT4(x)
N2=x(1);N3=x(2);O3=x(3);NO3=x(4);W3=x(5);A3=x(6);Q=x(7);r=x(8);
f(1)= A3-1+4*r;
f(2)=o3-2.4-5*r;
f(3)= N3-N2;
f(4)=NO3-4*r;
f(5)=W3-6*r;
f(6)=1-N3-0.9;
f(7)=N2-(2.4*0.79/0.29);
f(8)=r*1630.52*1000+(W3*4.18/18+A3*2.2/19+O3*0.918/32+N3*1.04/14+NO3*0.
995/30)*(920-25)-(750-25)*(2.2*0.918/32+N2*1.04/28)-Q;
end

SCRIPT:

x0=10*ones(1,8);
x= fsolve (@Mu3nnaTUT4,x0);

4
Almoanna Mahmoud 152012

fprintf('THE VLAUE OF RATE OF HEAT ROMOVAL PER 1 MOLE NH3=


%6.2f\n',x(7))

You might also like