MathGroup Archive 2011

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

Search the Archive

Re: NDSolve (loop)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116996] Re: NDSolve (loop)
  • From: greg28 <grega.smrkolj at gmail.com>
  • Date: Mon, 7 Mar 2011 05:47:03 -0500 (EST)

Hi,
let me be more specific about my problem. My code in mathematica is:

_______________________________________
T=1000 (truncation of time, assuming that V(s,x)-> V(x)  
        as T-> infinity)

alpha= 0.1
pde= some complicated expression (involving 1st and 2nd 
                                     order derivatives)

soln = NDSolve[{pde, V[0, x] == 0, 
   V[s, xu] == 0, (D[V[s, x], x] /. x -> xd) == 0}, 
  V[s, x], {s, 0, T}, {x, xd, xu}, 
  Method -> {"MethodOfLines", 
    "SpatialDiscretization" -> {"TensorProductGrid", 
      "MinPoints" -> 1000}} ]
_______________________________________

This is then a particular solution for alpha=0.1.
However, my problem is to find a value of alpha,
at which, for instance, V[x=0.3]=alpha/2. So I 
need to write a loop which will stop when this
condition is satisfied. The problem is that one
evaluation takes a lot of time, so I wonder whether
it is somehow possible to speed up NDSolve, e.g.
by somehow telling mathematica what the solution for
alpha=0.1 was when solving for alpha=0.2 or something
like this. The shape of V should not differ too much
between alpha=0.1 and alpha=0.2...


  • Prev by Date: Re: Mathplayer on tablet device
  • Next by Date: Re: How to avoid repeated calculation in NDSolve ?
  • Previous by thread: Re: NDSolve (loop)
  • Next by thread: Re: NDSolve (loop)