MathGroup Archive 2009

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

Search the Archive

Re: bvdae error when using NDSolve for initial value problem

The system of equations is not an ODE.  Because there are algebraic
relationships among the functions (w[u]==w1[u]+w2[u]), this falls into
the class of Differential-Algebraic Equations (DAE).  While it may not
seem to be a significant difference, it is actually quite a bit
tricker set up an initial value problem for a DAE than for an ODE.
The methods for solution are well known now (see Brenan, Campbell,
Petzold, "Numerical Solution of Initial-Value Problems in Differential-
Algebraic Equations") these methods were not implemented into NDSolve
until Mathematica 5.  Unfortunately for me, DAE's pop up in my work
all the time, so I had to a MathLink to FORTRAN code (yuck) to solve
them many years ago.

To solve an ODE initial value problem (IVP), you only need to give the
function values at t=0.  Your problem is a DAE of index 1, so you also
need to supply the initial slopes of the functions, so give values for
w1'[0], w2'[0], timer'[0].  I think your timer[1]==8.3 may be messing
things up, since this constraint means this is not strictly an IVP.

As some of the other posters have suggested, you might also be able to
re-arrange your equations to eliminate the algebraic relationship and
solve as an ODE.

I hope this helps.  I find that it is often very difficult in general
to find a consistent set of initial values and slopes to start a DAE

  • Prev by Date: Re: Finding the Position of Elements in a List that Contain
  • Next by Date: Re: Eigenvalues of sparse arrays
  • Previous by thread: Re: Finding the Position of Elements in a List that Contain
  • Next by thread: Re: Eigenvalues of sparse arrays