Differential model won't calculate with powers <1
Show older comments
Hi everyone,
I am working on a model which describes multiple reactions over time, using simple power law models (R = k*[C]^n).
ode1 = diff(Ca) == -k1*Ca;
cond1 = Ca(0) == 5;
ode2 = diff(Cb) == k1*Ca - k2*Cb;
cond2 = Cb(0) == 0;
ode3 = diff(Cc) == k2*Cb - k3*Cc;
cond3 = Cc(0) == 0;
ode4 = diff(Cd) == k3*Cc - k4*Cd;
cond4 = Cd(0) == 0;
ode5 = diff(Ce) == k4*Cd;
cond5 = Ce(0) == 0;
t works just like I want to with n = 1, however, our data suggests that n < 1. I tried adding powers to my concentrations, but then, Matlab has a hard time calculating it, and it never finishes.
I want to calculate the concentrations of all components over time. All constants (k1, k2, k3, k4) and reaction orders will be added later. However, the model should be able to calculate the concentrations when the order is lower than 1.
Do you have any suggestions on how to tackle this problem? Do I have to use other functions?
2 Comments
Jan
on 8 Mar 2021
You forgot to mention how you try to calculate what. These are the equations only.
Jort Puiman
on 8 Mar 2021
Accepted Answer
More Answers (0)
Categories
Find more on Numerical Integration and Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!