Question

Problem 4: Consider the following system differential equations for a plug flow reactor ar,=-2k,C,; F,(0) = 2 dV dV dV where
PLEASE USE MATLAB! Thank you in advance!
0 0
Add a comment Improve this question Transcribed image text
Answer #1

%%% Matlab code %%%

clc;
close all;
clear all;
Fa(1)=2;
Fb(1)=0;
Fc(1)=6;
k1=0.25;
k2=0.05;
Ct=1;
h=0.1;

%%%% Eular method
for n=1:2
Ca=Fa(n)/(Fa(n)+Fb(n)+Fc(n))*Ct;
Cb=Fb(n)/(Fa(n)+Fb(n)+Fc(n))*Ct;
Cc=Fc(n)/(Fa(n)+Fb(n)+Fc(n))*Ct;
Fa(n+1)=Fa(n)-h*2*k1*(Ca)^2;
Fb(n+1)=Fb(n)+2*k1*(Ca)^2;
Fc(n+1)=Fc(n)-k2*Cb*Cc;
fprintf('After iteration %d : Fa= %f Fb= %f Fc=%f \n ',n,Fa(n+1),Fb(n+1),Fc(n+1));
  
  
  
end

OUTPUT:

After iteration 1 : Fa= 1.996875 Fb= 0.031250 Fc=6.000000
After iteration 2 : Fa= 1.993782 Fb= 0.062185 Fc=5.999855
>>

Add a comment
Know the answer?
Add Answer to:
PLEASE USE MATLAB! Thank you in advance! Problem 4: Consider the following system differential equations for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT