Group Abstract Group Abstract

Message Boards Message Boards

Error while using NDSolve?

Posted 5 years ago
POSTED BY: Maggie Purvis
Posted 5 years ago

You have k4r,k5r,k6r that are not defined in your notebook and somehow, for reasons I cannot explain yet, show up in the output of your NDSolve.

As a temporary measure I put

k4r=1;k5r=1;k6r=1;

at the beginning of your notebook.

Then at the bottom of your notebook you have

s=NDSolve[eqs/.kp->10^5, vars, {t,0,.001}]
Plot[Evaluate[Z5[t]/.s,{t,0,1},PlotRange->{0,0.5}]

where you appear to have solved the system over the range 0<=t<=.001, but your next line tries to evaluate this system over 0<=t<=1.

I made another change to those two lines

s=vars/.NDSolve[eqs/.kp->10^5,vars, {t,0,.001}][[1]]
Plot[s,{t,0,.000107163}]

I chose 0<=t<=.000107163 because of the error message from NDSolve saying that the system had failed at that time. That may be because of the choices I made for k4r,k5r,k6r.

But that did display what appear to be graphs of all your functions.

If I change one line of that to

s=Z5[t]/.NDSolve[eqs/.kp->10^5,vars, {t,0,.001}][[1]]

then it appears to plot Z5[t]

Can you try to reproduce exactly what I have done and see if you get exactly the same result?

Can you then substitute more sensible values for k4r,k5r,k6r and see if you get sensible functions plotted, perhaps even over your range 0<=t<=.001

POSTED BY: Bill Nelson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard