Gravitational equations used in model of orbiting bodies

Click For Summary

Discussion Overview

The discussion centers on the gravitational equations used in modeling orbiting bodies, particularly the validity of using modified gravitational formulas in computational simulations. Participants explore the implications of using one mass versus both masses in the calculations and the resulting effects on simulation outcomes.

Discussion Character

  • Debate/contested
  • Mathematical reasoning
  • Experimental/applied

Main Points Raised

  • One participant suggests that a valid gravitational model only works when the force is computed using one mass, questioning the correctness of the original equation.
  • Another participant asserts that the original formula is valid, provided relativistic effects are negligible, and argues that the modified equation does not work due to unit inconsistencies.
  • Several participants express confusion over why simulations using the original formula do not yield expected results, despite the modified formula appearing to work.
  • Concerns are raised about the consistency of various equations presented, with claims that many of them have inconsistent units.
  • Participants discuss the implications of Newton's third law, emphasizing that forces must be equal and opposite, and that both masses should be included in force calculations.
  • One participant mentions that their simulations work fine with one mass but not with both, prompting questions about the stability of the resulting orbits.
  • Links to external resources for n-body gravitational models are shared, though their relevance is questioned.

Areas of Agreement / Disagreement

Participants do not reach consensus on the validity of the modified gravitational equation or the reasons for discrepancies in simulation results. Multiple competing views remain regarding the correct application of gravitational equations in modeling.

Contextual Notes

Participants note limitations in the equations presented, including potential issues with unit consistency and the treatment of forces and accelerations in the context of changing masses. The discussion reflects ongoing uncertainty and exploration of the topic.

nearc
Gold Member
Messages
65
Reaction score
6
In practice I’ve found that a valid gravitational model of orbiting bodies only works when the force is computed with only the other mass and not both masses. Thus, the original equation does not work but the modified one does. Is using one mass ok or am I doing something wrong? thanks. [also i included is the agent based model I'm using [you will need to change the file extension to .nlogo], it can be run with a free download of netlogo [ https://ccl.northwestern.edu/netlogo/download.shtml ]]F = G*m1*m2/ r^2, original

F = G*m1/ r^2, modifiedusing Finite difference; Euler's method. with the time step is built into the gravitational constant, Gvaluenew=valueold + time step*differential equationmi, mj, mass of objects,<br /> <br /> d_x=m_{i_x}-m_{j_x}<br /> <br /><br /> <br /> d_y=m_{i_y}-m_{j_y}<br /> <br /><br /> <br /> R^2=d^2_x+d^2_y<br /> <br /><br /> <br /> F = \frac {Gm_im_j}{R^2}<br /> <br /><br /> <br /> \Theta = tan^{-1}(\frac {d_y}{d_x})<br /> <br /><br /> <br /> F_{x_{new}}= F_{x_{old}}+ Fcos(\Theta)<br /> <br /><br /> <br /> F_{y_{new}}= F_{y_{old}}+ Fsin(\Theta)<br /> <br /><br /> <br /> v_{x_{new}}= v_{x_{old}}+ F_{x_{new}}<br /> <br /><br /> <br /> v_{y_{new}}= v_{y_{old}}+ F_{y_{new}}<br /> <br /><br /> <br /> m_{ix_{new}}= m_{ix_{old}}+ v_{x_{new}}<br /> <br /><br /> <br /> m_{iy_{new}}= m_{iy_{old}}+ v_{y_{new}}<br /> <br />Rewritten in algorithm form [i.e. computational model]:<br /> <br /> F_{ix_{new}} =F_{ix_{old}} + G\sum_{j=1}^{k} \frac{m_im_j}{{(m_{i_x }-m_{j_x }})^2 +({m_{i_y }-m_{j_y }})^2} cos(tan^{-1}(\frac { m_{i_x }-m_{j_x } } { m_{i_y }-m_{j_y } }))), i\neq j<br /> <br /><br /> <br /> F_{iy_{new}} =F_{iy_{old}} + G\sum_{j=1}^{k} \frac{m_im_j}{{(m_{i_x }-m_{j_x }})^2 +({m_{i_y }-m_{j_y }})^2} sin(tan^{-1}(\frac { m_{i_x }-m_{j_x } } { m_{i_y }-m_{j_y } }))), i\neq j<br /> <br /><br /> <br /> v_{x_{new}}= v_{x_{old}}+ F_{x_{new}}<br /> <br /><br /> <br /> v_{y_{new}}= v_{y_{old}}+ F_{y_{new}}<br /> <br /><br /> <br /> m_{ix_{new}}= m_{ix_{old}}+ v_{x_{new}}<br /> <br /><br /> <br /> m_{iy_{new}}= m_{iy_{old}}+ v_{y_{new}}<br /> <br />
 

Attachments

Last edited:
Physics news on Phys.org
The original formula always works (as long as you can neglect relativistic effects), the second one will never work because the units do not match.
In many cases, it is sufficient to neglect the influence of the object you care about on the other mass, then ##a=\frac{F}{m}=\frac{GM}{r^2}## will do the job, but that is different from your second equation.

Most of the equations in your post are wrong.
 
i see the two initital distance equations where wrong and i fixed them, can you point out the other ones that are wrong? also i still don't know why a simulation with F=GM1M2/R^2 does not work but one with F=GM1/R^2 does?
 
F=GM1/R^2 does not work. Maybe you mean A2=GM1/R^2 ?

You must include both masses to get the force. Per Newton's third law, the force on one body will always be equal in magnitude, but opposite in polarity, to the force on the other body. However, the magnitudes of acceleration will be different if their masses are different:

F_1=G\frac{M_1M_2}{R^2}
F_2=-G\frac{M_1M_2}{R^2}
A_1=G\frac{M_2}{R^2}
A_2=-G\frac{M_1}{R^2}
 
nearc said:
can you point out the other ones that are wrong?
All with inconsistent units, so nearly all of them. And those where you take the previous force and increase it step by step based on the total force.
also i still don't know why a simulation with F=GM1M2/R^2 does not work but one with F=GM1/R^2 does?
See TurtleMeister, but I'm surprised your formulas lead to anything reasonable at all. Maybe some lucky coincidence for specific time steps.
 
mfb said:
All with inconsistent units, so nearly all of them.

the only equations i can find with inconsistent are:

<br /> <br /> v_{x_{new}}= v_{x_{old}}+ F_{x_{new}}<br /> <br /><br /> <br /> v_{y_{new}}= v_{y_{old}}+ F_{y_{new}}<br /> <br />

can you point out how the other ones are also inconsistent?

And those where you take the previous force and increase it step by step based on the total force.

are you saying these equations are wrong?:

<br /> <br /> F_{x_{new}}= F_{x_{old}}+ Fcos(\Theta)<br /> <br /><br /> <br /> F_{y_{new}}= F_{y_{old}}+ Fsin(\Theta)<br /> <br />
See TurtleMeister, but I'm surprised your formulas lead to anything reasonable at all. Maybe some lucky coincidence for specific time steps.

i have used various time steps, grid spacing, number of bodies. all of the simulations work fine with one mass but not both masses.

can anyone point to an example of a n-body gravitational model?
 
nearc said:
can you point out how the other ones are also inconsistent?
- adding velocities to masses (changing masses are weird on their own)
- adding forces to the gravitational constant (the mass units in the sums cancel)

are you saying these equations are wrong?:
I don't see any way how they can make sense.

i have used various time steps, grid spacing, number of bodies. all of the simulations work fine with one mass but not both masses.
One mass is just floating in space?

Do you get a stable ellipsis in any setup?

can anyone point to an example of a n-body gravitational model?
https://www.youtube.com/watch?v=TXY6NJm5se0
http://www.codeproject.com/Articles/22438/Gravity-and-Collision-Simulation-in-C
http://users.softlab.ece.ntua.gr/~ttsiod/gravity.html

Random google hits, I don't know them.
 
mfb said:
- adding velocities to masses (changing masses are weird on their own)
- adding forces to the gravitational constant (the mass units in the sums cancel)

I don't see any way how they can make sense.

velocities are not being added to masses, if you are referring to:

<br /> <br /> m_{ix_{new}}= m_{ix_{old}}+ v_{x_{new}}<br /> <br />

that is the x position of mass i, being adjusted by the the velocity which is multiplied by the time step [remember the time step is built into G]. velocity multiplied by time yields distance, so that equation is x_new = x_old + delta distance

i'm seeing where i add forces to the gravitational constant which equations are you referring to?
 
The only equation that comes to mind is :
total acceleration (of both bodies) = ( G * ( M + m ) ) / r ^2

If m is negligible, then you get : acceleration of m = ( G * M ) / r ^2
(M is deemed to be non accelerating)
 

Similar threads

Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 8 ·
Replies
8
Views
5K
  • · Replies 125 ·
5
Replies
125
Views
20K