[Tutor] Problems using odeint

Joel Goldstick joel.goldstick at gmail.com
Wed Jan 15 00:02:44 CET 2014


On Tue, Jan 14, 2014 at 1:40 PM, Grace Roberts
<xgrace_robertsx at hotmail.co.uk> wrote:
> Hi,
>
> I'm a python beginner, currently using scipy's 'odeint' to compute to a set
> of ODEs (obtained by splitting Newton's law of gravity ma=-Gm1m2r/r^3 in two
> ordinary differentials). The idea is that I'm modelling the orbit of a
> satellite as it approaches Mars.
>
> I have two problems:
> -For certain initial conditions the programme displays impossible orbits,
> showing the satellite making immediate sharp turns or jumping up and down in
> velocity. The exact same code can also end up displaying different graphs
> when run multiple times. For example when initial conditions are set at:
> xx0=[1000.,10000.,1000.,10000.].
> -Often when run an error message appears saying: "Excess work done on this
> call (perhaps wrong Dfun type). Run with full_output = 1 to get quantitative
> information." You can see that as part of the odeint function I tried to
> stop the excess work by increasing the maxstep and I also tried to run with
> full_output =1. It's quite possible I haven't done this right. If I have,
> what else can I do to stop this message from appearing?
>
> I've attached a quick print-screen of the code.
>
> Any help is much appreciated.
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
>

Sorry I can't help you, but the way it works best here is that you
actually cut and paste your code in your email.  Use text mode, not
html.  Then run your code, and cut and paste the traceback to your
email.

-- 
Joel Goldstick
http://joelgoldstick.com


More information about the Tutor mailing list