Skip to main content
15 events
when toggle format what by license comment
May 30, 2022 at 13:16 comment added mkvb_78 And for the demo video: m.youtube.com/watch?v=g7ucAwWma2Y
May 30, 2022 at 13:15 comment added mkvb_78 If you want to check the result, it is fully available at github.com/MarwaKadhem/Solar-System-3D-simulation
May 30, 2022 at 13:12 comment added mkvb_78 Hi everyone, I can't thank you enough for all your suggestions and help. I manage to solve the problem by following the steps you described and by taking into account all your replies.
May 5, 2022 at 14:05 comment added Barry Carter Since you're doing the calculations yourself, you might want to look at astronomy.stackexchange.com/questions/2416/… and perhaps astronomy.stackexchange.com/questions/13488 (under "If you want to compute star/planet positions yourself, you have several options")
May 3, 2022 at 0:27 comment added uhoh fyi "one-body" means just calculate for the Earth and leave the Sun's central force at the origin. Once you get the integrator working and generating real, physical results, then work your way up slowly; add several bodies without interactions (n x 1-body) then finally add back all the $n(n-1$ two-body interactions i.e. n-body.
May 3, 2022 at 0:16 comment added uhoh Finally, back up and first see if your method can solve a very familiar one-body problem. In a much shorter, simpler script, just put the Earth at $1.5 \times10^{11} \ \mathbf{\hat{x}}$ meters with a velocity of $2.9780 \times10^4 \ \mathbf{\hat{y}}$ meters per second, and confirm it goes around the $\mathbf{\hat{z}}$ axis in roughly a circle and takes about a year to do so. All that said, here's a complicated n-body script that matches a JPL ephemeris pretty well space.stackexchange.com/a/23409/12102
May 3, 2022 at 0:05 comment added uhoh Straight lines intersecting the Sun mean that gravity is too strong or speed is too low. A quick way to check is to calculate the reduced kinetic and potential energies $v^2/2$ and $-GM_{Sun}/r^2$ and see if the kinetic is about half of the absolute value of the potential energy since a bound orbit will have negative total energy. Next, if the lines radiate away from the Sun then you might be missing a minus sign somewhere. Also be extremely careful to never mix kilograms and seconds with kilometers, use only meters (perhaps the 1E-09 zephyr mentions comes from that?)
May 2, 2022 at 17:06 comment added zephyr Why do you have G = 6.67430e-11*1e-9. Where does that extra *1e-9 come from? Everything else seems to be in mks units but this value. Unrelatedly, I'd suggest you post your code on something like code review. I think you could really benefit from someone reviewing your code from a coding perspective (aside from the science perspective you're asking for here).
May 2, 2022 at 16:45 comment added James K finally, for testing purposes, it would be convenient to break the dependency on spice and de440 (as these are large file dependencies.) You are only using them to initialise the system. So I'd suggest working out the initial values for may 2022 and hard coding them into the program. When everything is working with the hard-coded values, you can easily switch back the de400 values.
May 2, 2022 at 16:01 comment added James K In addition, numerical stability is much easier if you use AU-solar mass-years units, instead of SI units. For example, in these units G=4pi.
May 2, 2022 at 11:57 comment added Greg Miller First guess is to make sure all of your units are correct. This sort of result is common when the force of gravity far exceeds the initial velocities.
May 2, 2022 at 9:39 history undeleted mkvb_78
May 2, 2022 at 9:08 history deleted mkvb_78 via Vote
S May 2, 2022 at 8:43 review First questions
May 2, 2022 at 9:12
S May 2, 2022 at 8:43 history asked mkvb_78 CC BY-SA 4.0