Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The reaction system A + B C ( d e s i r e d ) A + B D ( u n d e

The reaction system
A+BC(desired)
A+BD(undesired)
Can be represented by the system of differential equations
dCAdt=-k1ACACB-k2ACA0.5CB1.5
dCBdt=-k1ACACB-k2ACA0.5CB1.5
dCCdt=k1ACACB,
dCDdt=k2ACA0.5CB1.5
,k1=1.1107exp(-9200(T)),k2=4exp(-2000(T))
CA0=1,CB0=1,CC0=0,CD0=0,T=500K
On the same graph, plot the graph of yield (Y) and selectivity(S) of compound D with time
For the purposes of these calculations
Y=CCCA0
S=CCCD+e
e=10-20.% Define the time range
tr = linspace(0,100,50); %Time points from 0 to 100 with 50 intervals
% Initial concentrations
co =[1,1,0,0]; % Initial concentrations of Ca,Cb,Cc,Cd
%Solve the ODE's
[t,c]= ode45(@hughes,tr,co);
% Calculate Yield and Selectivity
Y = c(:,3)./co(1); % Yield of c relative to initial A
e =1e-20; %Small number to avoid division by zero
S= c(:,3)./(c(:,4)+e); %Selectivity of C over D
% Plot the results
plot(t,Y,t,S,"linewidth",2);
xlabel('Time T(s)');
ylabel('values');
legend("Yield (Y)","Selectivity (S)");
title("Yield and Selectivity vs Time");
grid on;
% Define the ODE function
function dcdt = hughes(t,c)
T=500;
k1=1.1*10^7*exp(-9200/T);
k2=4* exp(-2000/T);
% Extract the concentrations from c
ca=c(1); cb=c(2); cc=c(3); cd=c(4);
dcdt =[-k1*ca*cb -k2*ca^0.5*cb^1.5;
-k1*ca*cb -k2*ca^0.5*cb^1.5;
k1*ca*cb;
k2*ca^0.5*cb^1.5
];
end. I wrote this code in matlab for the problem above but I get this errors Error using vertcat
Dimensions of arrays being concatenated are not consistent.
Error in Multiple_react_tut1>hughes (line 31)
dcdt =[-k1*ca*cb -k2*ca^0.5*cb^1.5;
Error in odearguments (line 90)
f0= feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ode45(line 115)
odearguments(FcnHandlesUsed, solver_name, ode, tspan, y0, options, varargin);
Error in Multiple_react_tut1(line 9)
[t,c]= ode45(@hughes,tr,co); when I run it. Please check the question and debug my code for me
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential Practices For Managing Chemical Reactivity Hazards

Authors: Robert W. Johnson, Steven W. Rudy, Stephen D. Unwin

1st Edition

0816908966, 978-0816908967

More Books

Students also viewed these Chemical Engineering questions

Question

What are six well-being benefits of mindfulness?

Answered: 1 week ago

Question

Is SHRD compatible with individual career aspirations

Answered: 1 week ago