Message Boards Message Boards

0
|
4496 Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

NDSolve error

Posted 10 years ago

Hi,

I got an error in my ND solve file.. but I am sure about my parameterizations.. I dint miss anything in my definitions , i checked it several times.. not sure where i am going wrong.. got stuck here for a long time.. The file is lenghty..it would be great if someone could help me with this..

Attachments:
POSTED BY: ash ash
2 Replies
Posted 10 years ago

Thanks! it worked!

POSTED BY: ash ash

You left the function Cs out of the dependent variable list. You also gave

Nh[t] == 1, No[t] == 1, Ni[t] == 1

as algebraic equations. Perhaps you meant it to be

Nh[0] == 1, No[0] == 1, Ni[0] == 1?

You should also give an initial value for Cs. The following works:

NDSolve[{Cp'[t] == Gp - Mp,
  Ch'[t] == Mp + Ms + Mm - Dsh,
  Co'[t] == Mp + Ms + Mm - Dmo - Dso,
  Cs'[t] == es Us - Ms,
  Cm'[t] == em Um - Mm,
  Np'[t] == Upn - rp Mp + \[Phi]m,
  Nh'[t] == fhp rp Mp + fhs rs Ms + fhm rm Mm - rh Dsh,
  No'[t] == fop rp Mp + fos rs Ms + fom rm Mm - ro (Dmo + Dso),
  Ni'[t] == Datm - L - Umn + \[Phi]s,
  Cp[0] == 1, Ch[0] == 1, Co[0] == 1, Cm[0] == 1, Np[0] == 1, 
  Nh[0] == 1, No[0] == 1, Ni[0] == 1, Cs[0] == 0}, {Cp, Ch, Co, Cm, 
  Np, Nh, No, Ni, Cs}, {t, 0, 100}]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract