MathGroup Archive 2000

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

Search the Archive

Re: Problem with partial differential equations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg23465] Re: Problem with partial differential equations
  • From: Max Ulbrich <mulbrich at physik.tu-muenchen.de>
  • Date: Thu, 11 May 2000 00:54:14 -0400 (EDT)
  • Organization: Rechenzentrum der Max-Planck-Gesellschaft in Garching
  • References: <8etp9i$n1n@smc.vnet.net> <BH0R4.93$5j.5351@ralph.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Roland, I tried, but I still get an error message like

NDSolve::ndnum:
    The right-hand side of the differential equation does not evaluate
to a number at t == 0.

Has anyone an idea what is wrong?

Max

Roland Franzius wrote:

> Hi Max,
> seems to work if you use delayed definitions (at evalutation time)
>
> > P1[x_,t_]:=2x^2;
> > P2[x_,t_]:=2(x+t)^2;
> > Diff=0.2;
> > G[x_]:=Exp[-x^2];
>
> probably a problem of fixing variables to numbers
>
> Max Ulbrich wrote:
> >
> > Hi,
> >
> > I have a problem with a partial differential equation.
> > I want to solve a diffusion problem in a time-dependent potential.
> > It works with the potential P1, but not with P2.
> > Can someone help me?
> >
> > P1[x_,t_]=2x^2;
> > P2[x_,t_]=2(x+t)^2;
> > Diff=0.2;
> > G[x_]=Exp[-x^2];
> > solution=n/.First[
> >       NDSolve[{Derivative[0,1][n][x,t]==
> >
> > Diff*Derivative[2,0][n][x,t]+n[x,t]*Derivative[2,0][P1][x,t]+
> >
> > Derivative[1,0][n][x,t]*Derivative[1,0][P1][x,t],n[x,0]==G[x],
> >           n[-3,t]==G[-3],n[3,t]==G[3]},n,{x,-3,3},{t,0,4},
> >         StartingStepSize->0.05]];
> > Plot3D[solution[x,t],{x,-2,2},{t,0,4}];
> >
> > Max Ulbrich
> > ulbrich at biochem.mpg.de
>
> --
> Roland Franzius
>
>   +++ exactly <<n>> lines of this message have value <<FALSE>> +++



  • Prev by Date: RE: Re: matrices, dot products and convergents ofcontinued fractions
  • Next by Date: Re: buggy part allocation ?
  • Previous by thread: Re: Problem with partial differential equations
  • Next by thread: Re: Problem with partial differential equations