Author Topic: Gravity Challenge!  (Read 8466 times)

0 Members and 1 Guest are viewing this topic.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Gravity Challenge!
« Reply #15 on: February 10, 2019, 03:46:30 pm »
Qwerkey is such a pessimist. At least I'll outlive him... by 6 days, apparently! This integral calculus is all well and good, but most of this theoretical stuff is considered acceptable within a 10% deviation of results. Well, screw this theoretical crap. Let's find out for sure. Johnno, when I count to three, you get on the floor and push as hard as you can. When the planet stops orbiting, Mark, who lives on Mars, anyway, you start the timer. My guess is Qwerkey will have at least 6 days to apologize to me!

Oh well, like the astro-proctoligists all say... "It's ironic we know everything about mercury to Neptune and Pluto, but to get paid, we have to look up Uranus.

Pete :D 
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: Gravity Challenge!
« Reply #16 on: February 11, 2019, 04:58:41 am »
Well, I would have apologised but for the scatological pun.  And I must try and find where those extra days went.


Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: Gravity Challenge!
« Reply #17 on: February 13, 2019, 01:11:04 pm »
I have had a further look at why my ratio came out wrong - tested against all the orbital periods of Mercury to Pluto, the Gravitation Simulation program is very accurate.

I redid the model for Earth-Sun and got a time of 61 days (must have put in an incorrect distance previously): this gives a ratio of 0.167, still not the correct value of 0.177.

Then I ran the model for Jupiter-Sun and that gave a value of 0.176.  Now that is respectable.


Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: Gravity Challenge!
« Reply #18 on: February 14, 2019, 10:40:25 am »
I realised that I had been misinterpreting the elapsed time output of my Gravity Simulation program (you'd think that I'd know what I was doing!).  So I redid the Earth calculation and then did one for Pluto (in addition to the one for Jupiter above).

STxAxTIC's ratio for Earth is 0.178 and for Pluto is 0.177 compared to the theoretical 0.177.

So, the program is, after all, accurate (as it should be).

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: Gravity Challenge!
« Reply #19 on: February 14, 2019, 11:02:28 am »
Holy cow Qwerkey!

Way to persist on the issue. It's always super satisfying when simulation and theory agree at the important milestones. It gives a little hope that the simulation is correct when there is no theoretical case to test against. Bravo for seeing this calculation through to the end.
You're not done when it works, you're done when it's right.

Offline Qwerkey

  • Forum Resident
  • Posts: 755
    • View Profile
Re: Gravity Challenge!
« Reply #20 on: February 15, 2019, 05:41:34 am »
STxAxTIC, just to show you that I'm not fiddling the results, here's a screen capture video of an Earth-Sun collapse run of my Gravitation Program.  The start data are: Mass of Sun 1.99E30 kg, Mass of Earth 5.97E24 kg, Sun at zero, Earth at x = 1.5E8 km.

When the run is executed, the Earth (green dot/trace) moves towards the Sun in the middle.  The jumping to the right of the Earth on occasions is when the display is zoomed in.  The Earth speeds up towards the Sun and when it gets to the position of the Sun, the Program is halted.  Then reading the Elapsed Time gives the value of just over 65 days.
* Earth-Sun.mp4 (Filesize: 1 MB, Downloads: 263)

Offline STxAxTIC

  • Library Staff
  • Forum Resident
  • Posts: 1091
  • he lives
    • View Profile
Re: Gravity Challenge!
« Reply #21 on: February 15, 2019, 09:05:20 am »
Awesome, a real bang-up job on that one! It's efforts like this that force a person to believe in calculus in they only know simulation, or to believe in simulation if they only know calculus. Handy use of InForm as well!

Not to mention the flattering icon of Newton. Images of Newton make me laugh. Sometimes he looks like a powdered whig judge, other times he's depicted as the no-chin alchemist he truly was, who never got laid, ever... And then there are the flattering images: nice squared-off jaw, modern-ish hair, etc. History's been nice to that guy - for very good reason I suppose. I wonder if in 2000 years we'll be arguing as to whether or not he was a white guy, or yet another pseudonym of Francis Bacon or something.

Bravo for seeing this one to the end. (Pretty sure Pete used Google to come up with his number!)
You're not done when it works, you're done when it's right.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Gravity Challenge!
« Reply #22 on: February 15, 2019, 10:42:49 am »
(Pretty sure Pete used Google to come up with his number!)

I find that highly insulting. Anybody with half a brain knows when I put my mind to accomplish something... I use Bing.

Pete :D
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Re: Gravity Challenge!
« Reply #23 on: February 19, 2019, 09:49:07 am »
Excuse me, we are real coders. We don;t GOTO our corners, we EXIT the ring!

Happy searching. I took some time off to go mattress shopping Monday, so see if you can buy me an extra day.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/