       Re: NDSolve Errors: icfail and ntdv

• To: mathgroup at smc.vnet.net
• Subject: [mg77356] Re: NDSolve Errors: icfail and ntdv
• From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
• Date: Thu, 7 Jun 2007 03:50:59 -0400 (EDT)
• Organization: Uni Leipzig
• References: <f463bs\$o2f\$1@smc.vnet.net>
• Reply-to: kuska at informatik.uni-leipzig.de

```Hi,

if you have a system of differential equations
Mathematica trys to bring the system in an explicit form
so that one get equations
{Derivative[Lc][t]==..,
Derivative[Ls][t]==..,
Derivative[ms][t]==..,
Derivative[rs][t]==..,
Derivative[\[Rho]s][t]==..,
Derivative[Lc][t]==..,
Derivative[Ls][t]==..}

if this can't be done Mathematica try to
solve the implicit equations.
Fot the implicit equations it is so, that the initial
conditions you gave, must fullfill the implicit equations
at t=0. And in your case that is not true because

deqn = {Derivative[Lc][t] == g*(1 - \[Rho]d/\[Rho]w),
Derivative[rs][
t] == ((8*\[Alpha]*rs[t]^2 - rc[t]^2)/(4*rs[t]))*
Derivative[Ls][t] +
(rc[t]^2/(4*rs[t]))*Derivative[Lc][t],
Derivative[Ls][t] == (1/(2*\[Alpha]))*Derivative[rs][t],
Derivative[Ls][
t] + (((\[Kappa]*(24/(rs[t]*Derivative[Ls][t]) +
4/(rs[t]*Derivative[Ls][t])^(1/3)) +

14.9/(rs[t]*Derivative[Ls][t])^0.78)*(rs[t]*
Derivative[Ls][t])^2 +
40*((3*\[Kappa] + 2)/(rs[t]*Derivative[Ls][t])) +
15*\[Kappa] + 10)/
((1 + \[Kappa])*(5 + (rs[t]*
Derivative[Ls][t])^2)))*((Pi*\[Rho]w*rs[t]^2)/(2*
ms[t]))*Derivative[Ls][t]^2 - (1 - \[Rho]w/\[Rho]s[t])*g ==
0,
Derivative[ms][t] ==
8*Pi*\[Alpha]*\[Rho]w*Derivative[Ls][t]*rs[t]^2 +
Pi*\[Rho]d*
rc[t]^2*(Derivative[Lc][t] - Derivative[Ls][t]),
Derivative[\[Rho]s][
t] == (3/(4*Pi*rs[t]^3))*
Derivative[ms][t] - ((9*ms[t])/(4*Pi*rs[t]^4))*
Derivative[rs][t]};

and

init = {ms == (4/3)*Pi*\[Rho]d*rso^3, \[Rho]s == \[Rho]d,
Lc == 0, Ls == 0, rc == 0, rs == rso,
Derivative[Ls] == vso,
Derivative[Lc] == 0, Derivative[ms] == 0,
Derivative[\[Rho]s] == 0, Derivative[rs] == 0,
Derivative[Ls] == 0};

gives

FullSimplify[(seqn /. t -> 0) /. (init /. Equal -> Rule)]

{10000*(-1 + \[Rho]d) + Derivative[Lc] == 0, False, False,
1.0000075093357965/\[Rho]d == 1., False, True}

as you can see you have 3 times a false in your equations at the
initial point and you have to choose initial conditions, that
fullfill you equations at t==0.

Regards
Jens

ehicks wrote:
> Hi,
>    I am trying to solve a set of equations with NDSolve.  The problem
> is no matter what I do, I keep getting errors of various kinds.  I've
> used NDSolve successfully in the past, so I am starting to wonder if
> maybe this set of equations just doesn't have a solution.   My set is
> diffeo-alegbraic, so at first I got the NDSolve::icfail error.  I
> tried to circumvent that by taking the derivative of one of the
> equations.  Then I got the NDSolve::ntdv error.  So I tried
> SolveDelayed->True, which just got me right back to the icfail error.
> Does anyone have any ideas on ways to circumvent these errors?
> Thanks!
> -Elizabeth
>
> See the Mathematica File at: http://www.tarzia.selfip.com/~elizabeth/fullplumemodel1.nb
>
> The text of the errors is:
> 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.
>
> NDSolve::ntdv: Cannot solve to find an explicit formula for the
> derivatives.  Consider using the option setting SolveDelayed->True.
>
>

```

• Prev by Date: Time, Inverse, Simulation simple dynamical system, speed issue
• Next by Date: Re: Re: Re: Problem with Mathematica 6
• Previous by thread: NDSolve Errors: icfail and ntdv
• Next by thread: on a pure function for a list of integrals