[Tutor] Problems using odeint

Grace Roberts xgrace_robertsx at hotmail.co.uk
Tue Jan 14 19:40:03 CET 2014


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. 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140114/89ac379d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: print screen3.docx
Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document
Size: 138247 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tutor/attachments/20140114/89ac379d/attachment-0001.docx>


More information about the Tutor mailing list