Physics Simulation: Calculating Gravitational Force between Earth and Sun

  • Context: Undergrad 
  • Thread starter Thread starter braindeaduser
  • Start date Start date
  • Tags Tags
    Physics Simulation
Click For Summary

Discussion Overview

The discussion revolves around the calculations involved in simulating the gravitational force between the Earth and the Sun, specifically using Newton's law of Universal Gravitation. Participants explore the accuracy of the calculations, the methods used for simulation, and considerations for orbital mechanics.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • The original poster (OP) presents their calculations for gravitational force and acceleration between the Earth and the Sun, seeking verification of their results.
  • Some participants suggest checking the calculations against the gravitational force formula and emphasize the importance of unit conversion from kilometers to meters.
  • One participant mentions the need to consider centrifugal force, questioning its relevance in the context of the simulation.
  • Another participant recommends using Verlet integration for better energy preservation in orbital simulations.
  • There is a correction regarding the gravitational force value, with one participant asserting that the OP's initial calculation was incorrect and providing a revised calculation.
  • A later reply highlights that gravitational force is not constant due to the elliptical nature of planetary orbits, suggesting recalculating forces at each time step for accuracy.
  • One participant expresses interest in contributing further to the discussion, while also acknowledging the potential for thread hijacking.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the correctness of the OP's calculations, as there are conflicting views on the values and methods used. Multiple competing perspectives on simulation techniques and gravitational force calculations remain present.

Contextual Notes

Some limitations include the dependence on accurate unit conversions, the assumption of constant gravitational force, and the need for recalculating forces in more complex simulations involving multiple bodies.

braindeaduser
Messages
1
Reaction score
0
I've written a couple of small physics simulations in the past (hey, everyone has to have a hobby) and now I'm trying to write something a little more complex so decided to attempt to write an program that simulates the motion of the planets and moons in our solar-system entirely procedurally - initially I'm starting off with just the Earth and the Sun.

With the initial values as follows:
Mass Sun: 1.989x10^30kg
Mass Earth: 5.976x10^24kg
Mean distance between the Earth and the Sun: 1.496x10^8km

I'm using Newton's law of Universal Gravitation to calculate the gravitational force between the sun and the Earth as 3.54476x10^28N

I then use F=ma to calculate the Earth's acceleration towards the sun and visa versa:
Earth towards Sun: 5.93166x10^3ms-1
Sun towards Earth: 1.78218x10^-2ms-1

My problem is, I'm not sure if these results are correct and after a good hour of scouring google and a small pile of physics textbooks I can't seem to find the correct values for my calculations to check these with. If anyone can check the math for me or point me to a site with these values i'd appreciate it greatly.

cheers
 
Astronomy news on Phys.org
Did u check for the centrifual force?
And one more thing u will obviously get a very small accelaration of sun towards earth.
 
They seem okay. Btw, for orbiting systems, Verlet integration is a very good way to go, as it preserves energy in this case.
 
No you went wrong somewhere you should have got 3.54476E22N

Did you remember to convert the kilometers to meters? 1.496E8km = 1.496E11m

The easiest way to do it is in scientific notation simple do the maths on the number and add and subtract the exponentials


Mass Sun: 1.989E30 kg
Mass Earth: 5.976E24 kg
Mean distance between the Earth and the Sun: 1.496E11 m
Gravitational constant 6.673E-11 m3 kg-1 s-2

F = G x M1 x M2 / (R x R)

= 6.673E-11 x 1.989E30 x 5.976E24 / (1.496E11 x 1.496E11)

= 79.317E43 / 2.238E22

= 35.441E21 Newtons

(now correct to 1 decimal place for proper scientific notation)
= 3.5441E22 Newtons

If you want to cheat and not do the maths :-)
http://www.ajdesigner.com/phpgravity/Newtons_law_gravity_equation_force.php
 
Strictly speaking, the force due to gravity is not constant because the distance between a planet and the sun is not constant. The planets do not travel in perfect circles, but in ellipses. So it is best to recalculate the gravitational forces at every time step. This is especially true when you start adding other planets to the simulation, because they exert gravitational forces on each other and do not have constant separations. If you approach the problem generally and apply total forces and find total accelerations for each body (don't treat the sun as special), then you can use the same code to simulate beautiful binary star system trajectories.

By the way, you don't have to program in centrifugal force because it is a fictional force. If you program the gravitational accelerations properly, the apparent effect that we can centrifugal force will appear automatically.
 
cephron said:
I'm interested in any input.(and to the original poster, let me know if you consider this to be hijacking your thread beyond your purposes; I'll apologize and start a new one...)
Note well: The hijack isn't your fault, cephron.

The last time the OP was here was September 3 in 2007, so close to 4 years ago.

This thread is now locked. The continued discussion on velocity verlet et al is [thread=513844]here[/thread].
 
Last edited:

Similar threads

Replies
17
Views
4K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 7 ·
Replies
7
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 86 ·
3
Replies
86
Views
9K