MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

NDsolve question


I'm relatively new to Mathematica (I normally use MATLAB), but I heard
that Mathematica is better at solving differential equations.  Anyways,
I'm trying to solve a set of six coupled differential equations (each
equation is coupled to a maximum of two other equations).  When I try to
evaluation, I get the following error message:

NDSolve::ndnum: Differential equation does not evaluate to a number at Z =

The code I'm trying to run is the following:

Betapump = 2.23038
Beta1 = 2.0744
Beta2 = 1.92669
Beta3 = 1.78431
Beta4 = 1.66273
Beta5 = 1.54011
g1 = 0.97536
g2 = 0.95079
g3 = 0.92583
g4 = 0.90336
g5 = 0.87948
NDSolve[{Kp'[Z] == -1*K1[Z]*Kp[Z] - Betapump*Kp[Z],Kp[0] == 1,K1'[Z] ==
G1*(K1[Z]*Kp[Z]-K1[Z]*K2[Z])-Beta1*K1[Z],K1[0] == (0.1)^12,K2'[Z] ==
G2*(K2[Z]*K1[Z]-K2[Z]*K3[Z])-Beta2*K2[Z],K2[0] == (0.1)^12,K3'[Z] ==
G3*(K3[Z]*K2[Z]-K3[Z]*K4[Z])-Beta3*K3[Z],K3[0] == (0.1)^12,K4'[Z] ==
G4*(K4[Z]*K3[Z]-K4[Z]*K5[Z])-Beta4*K4[Z],K4[0] == (0.1)^12,K5'[Z] ==
G5*(K5[Z]*K4[Z])-Beta5*K5[Z],K5[0] == (0.1)^12},{Kp[Z], K1[Z], K2[Z],
K3[Z], K4[Z], K5[Z]}, {Z, 0, 500}]

All the equations are pretty similar.  I would actually prefer to use
DSolve to get an equation, but I will settle for the interpolated solution
given by NDSolve and plot it.

Any help would be GREATLY appreciated.

supriyo at

"The presence of an enthusiast makes me as cold as ice, while I think
I should become passionately excited if I had much to do with a dull
and phlegmatic person."

			- Gregory Aleksandrovich Pechorin
			  M. L. Lermontov's A Hero of Our Own Times

"...the only consolation you have left is to whip yourself..."

			- F. Dostoyevsky's Notes From the Underground

  • Prev by Date: Integrating TeXSaved Mathematica in LaTeX-Documents
  • Next by Date: Re: Re: Why can't Nsolve find a solution to this ?
  • Previous by thread: Re: Integrating TeXSaved Mathematica in LaTeX-Documents
  • Next by thread: Re: NDsolve question