MATLAB: Coupled rate ODEs with ode45

differential equationskinetic modelsode23ode45rate equations

Dear all,
I have been having trouble trying to model the concentrations of 8 species in the attached file showing the reactions. I have the rate constant values, initial conditions and a time frame but for some reason the plot seems to display no changes in concentration. I have attached my function and script. Any pointers or tips would be greatly appreciated.
Thanks in advance.

Best Answer

The concentrations change appropriately, however they don’t change much and the concentrations are vanishingly small. That’s the reason they don’ appear to change.
Increasing the final time (by 15 times) demonstrates saturation kinetics:
[t,state]=ode15s(@reactions,[0 51.5*15],[2.71E-5;7.8E-6;9.2E-6;0;1.0614E-4;3.359E-3;3.9278E-4;4.521E-4]);
reactants = {'TAG','DAG','MAG','GLY','FAEE','ET','FFA','W'};
figure
for k = 1:8
subplot(4,2,k)
plot(t,state(:,k))
xlabel('Time')
ylabel('Concentration')
title(sprintf('$C_{%s}(t)$',reactants{k}), 'Interpreter','latex')
grid
end
producing:
Adding:
pos = get(gcf,'Position')
set(gcf, 'Position',pos+[0 -500 200 500])
after the loop enlarges the figure making the subplot plots easier to see. (I did not use that in the posted figure.)