MathGroup Archive 2007

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

Search the Archive

Re: NDSolve -- initial conditions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73021] Re: NDSolve -- initial conditions
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Mon, 29 Jan 2007 04:39:38 -0500 (EST)
  • References: <epf93g$buf$1@smc.vnet.net>

Hi,

a good reason to update to version 5.2,
your example below run without any problems.

Regards
   Jens

Michael Ederer wrote:
> Hello MathGroup,
> 
> For computation of initial conditions NDSolve uses somehow the simulation
> time.
> 
> For example:
> ====
> equ = {D[x1[t], t] == -10^5 * x1[t], x1[0] == 1}; 
> 
> NDSolve[equ, x1[t], {t, 0,  50}, "SolveDelayed" -> True]; 
> NDSolve[equ, x1[t], {t, 0, 100}, "SolveDelayed" -> True]; 
> ---
> The first NDSolve (simulation time 50) runs without errors,
> but the second (simulation time 100) says:
>   "NDSolve::icfail: Unable to find initial conditions which satisfy the
> residual function within specified tolerances.  Try giving initial
> conditions for both values and derivatives of the functions"
> ===
> 
> I use NDSolve for numerical simulation of nonlinear, stiff,
> differential-algebraic equation systems of the form 
> B(x) xdot = f(x) with singular B(x) (Method->IDA).
> For this reason, I need the SolveDelayed-option and I often have simulation
> times much larger than the fastest dynamics.
> This often leads to problems with the above described behavior. 
> 
> To avoid this problem, I divide the whole simulation time into smaller parts
> by using something like sd=NDSolve`ProcessEquations[..] and
> NDSolve`Iterate[sd,t1], NDSolve`Iterate[sd,t2],.... with
> t1<t2<... . However, then I very often get solutions that are non-continuous
> at t1, t2, ... . So, this is not a good solution.
> 
> An alternative would be to follow the suggestion in the error message and
> give initial conditions for the derivatives.
> Those I would have to compute by using FindRoot. This is annoying, since
> NDSolve could in principal find initial conditions for a smaller simulation
> time. I would prefer if I could handle the  simulation and the computation
> of initial derivatives solely using NDSolve.
> 
> 
> So this is my question:
> Is there any Option or different mechanism in NDSolve that controls the
> numeric computation of initial conditions and initial derivatives? 
> Could this option be used to prevent the "NDSolve::icfail" for systems with
> partly very fast dynamics?
> 
> 
> Thanks and best regards
> Michael Ederer
> 
> 
> P.S.: I use Mathematica 5.0
> 


  • Prev by Date: Re: Can Mathematica do Separation of Variables?
  • Next by Date: Re: Re: Sequence of Bernoulli RVs
  • Previous by thread: Re: Irregular Behavior of TranslateShape and RotateShape with ParametricPlot3D
  • Next by thread: How to do quickest