MathGroup Archive 2001

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

Search the Archive

Re: NDsolve question

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29141] Re: NDsolve question
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 30 May 2001 23:28:27 -0400 (EDT)
  • Organization: Universitaet Leipzig
  • References: <9f2gjo$881$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

and Mathematica has case sensitive names ! and g2 != G2

So 

G1 = 0.97536;
G2 = 0.95079;
G3 = 0.92583;
G4 = 0.90336;
G5 = 0.87948;

will work.

Regards
  Jens


Supriyo Sinha wrote:
> 
> Hi,
> 
> I'm relatively new to Mathematica, 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 =
> 0..
> 
> 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.
> 
> Thanks,
> Supriyo
> supriyo at stanford.edu
> 
> ---------------------------------------------------------------------
> "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: Re: possible?: Notebook in "batch mode"
  • Next by Date: Re: Integrating TeXSaved Mathematica in LaTeX-Documents
  • Previous by thread: Re: NDsolve question
  • Next by thread: codes for option pricing models