Question: Given: Wrong Matlab Code used: % Known parameters A = 706 FN2 = 135.54 n = 0.6527 RNH3 = 56791.1128 Tend = 1 % Number

Given:

Given: Wrong Matlab Code used: % Known parameters A = 706 FN2= 135.54 n = 0.6527 RNH3 = 56791.1128 Tend = 1 %Number of steps n = 100 % Step size h = Tend

L = 0:h:Tend % Function used f= @(X,L) ((n*RNH3*A)/(2*FN2)) % Initial conditionL(1) = 0 X(1) = 0 for i = 1:n k1 =

Wrong Matlab Code used:

% Known parameters

A = 706

FN2 = 135.54

n = 0.6527

RNH3 = 56791.1128

Tend = 1

% Number of steps

n = 100

% Step size

h = Tend

L = 0:h:Tend

% Function used

f= @(X,L) ((n*RNH3*A)/(2*FN2))

% Initial condition

L(1) = 0

X(1) = 0

for i = 1:n

k1 = h*f(L(i), X(i));

k2 = h*f(L(i)+h/2, X(i) + k1/2);

k3 = h*f(L(i)+h/2, X(i) + k2/2);

k4 = h*f(L(i)+h, X(i) + k3);

X(i+1) = X(i)+1/6*(k1 + 2*k2 + 2*k3 + k4);

end

% Plotting value in a table

[L' X']

% Plotting the graph

figure (1)

plot(L,X)

xlabel('Length (m)')

ylabel('Conversion (X)')

ylim([0 100])

I don't seem to get the graph as shown. Please correct the Matlab code until it becomes similar to the graph.

RNH3=2k(ka2aN2[(aNH3)2(aH2)3][(aH2)3(aNH3)2]1) ai=1fi=fi=yiiPyN2=12XYNN2YN2(1X)yH2=12XYN2YH23XYN2yNH3=12XYNN2YNH3+2XYN2N2=0.93431737+0.2028538103T+0.295896103P0.270727106T2+0.4775207106p2H2=exp{exp(3.8402T0.125+0.541)Pexp(0.1263T0.515.98)P2+300exp(0.011901T5.941)exp(P/300)} =b0+b1T+b2X+b3T2+b4X2+b5T3+b6X3 Constants are: b0=8.2125534b1=0.03774149b2=6.190112b3=5.354571105b4=20.86963b5=2.379142108b6=27.86403 \begin{tabular}{|l|r|r|} \hline niu & 0.652670905 \\ \hline & \\ \hline bo & 8.2125534 & \\ \hline b1 & 0.03774149 & \\ \hline b2 & 6.190112 & \\ \hline b3 & 5.35457E05 & \\ \hline b4 & -20.86963 & \\ \hline b5 & 2.37914E08 & \\ \hline b6 & 27.86403 \\ \hline \end{tabular} dLdXN2=2FN2RNH3A

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Chemical Engineering Questions!