Kinetics model-Why i dont get 3 graphs of these modeling, but i get just one for C catalyst. Is there problem with definition of k?

1 次查看(过去 30 天)
function Pd
t_span=[0 1000];
c0=[1 1 1 0 0 0 0 0 0];
[t,c]=ode45(@kinetics,t_span,c0);
plot(t,c)
xlabel('Time,[min]');
ylabel('Concentration,[mol/cm^3]');
legend('cct-CDT','ctt-CDT','ttt-CDT','cc-CDD', 'ct-CDD', 'tt-CDD', 'c-CDE', 't-CDE', 'CDA')
end
function dz=kinetics(t,c);
k=[0.105 0.097 0.065 0.071 0.060 0.056 0.065 0.250 0.061 0.07 0.0110 0.120; %%C
0.015 0.007 0.010 0.008 0.025 0.016 0.005 0.003 0.007 0.015 0.001 0.035; %%CaCO3
0.090 0.078 0.070 0.058 0.125 0.045 0.069 0.007 0.073 0.080 0.006 0.039]; %%Al2O3
dz=zeros(9,3);
r1=k(1)*c(1);
r2=k(2)*c(1);
r3=k(3)*c(2);
r4=k(4)*c(2);
r5=k(5)*c(3);
r6=k(1)*c(1)-k(6)*c(4);
r7=k(2)*c(1)+k(3)*c(2)-k(7)*c(5)-k(8)*c(5)-k(9)*c(5);
r8=k(4)*c(2)+k(5)*c(3)-k(10)*c(6);
r9=k(6)*c(4)+k(7)*c(5)-k(11)*c(7);
r10=k(9)*c(5)+k(10)*c(6)-k(12)*c(8);
r11=k(11)*c(7)+k(8)*c(5)+k(12)*c(8);
dz(1)=-r1-r2;
dz(2)=-r3-r4;
dz(3)=-r5;
dz(4)=r6;
dz(5)=r7;
dz(6)=r8;
dz(7)=r9;
dz(8)=r10;
dz(9)=r11;
end

采纳的回答

Star Strider
Star Strider 2021-1-26
If you want to fit your differential equations to the ‘k’ matrix to estimate the parameters of your system, your current approach is not going to do that. See for example Parameter Estimation for a System of Differential Equations for a relaible way of estimating the parameters you want.
There are several other examples as well (most of which I wrote). I can likely help you estimate the parameters if you describe what you want to do more clearly.
  7 个评论
Star Strider
Star Strider 2021-1-27
If you only want to see the effects on ‘t-CDE’, add this plot at the end of the current code:
cm = cell2mat(c);
figure
plot(t_span, cm(:,8:9:end))
legend({'C','CaCO_3','Al_2O_3'})
grid
xlabel('Time,[min]');
ylabel('t-CDE Concentration,[mol/cm^3]');
.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by