Some questions regarding proportions in a two-body problem

  • Context: Graduate 
  • Thread starter Thread starter Ostsol
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around the challenges of setting up initial conditions for a two-body simulation, specifically modeling the Earth-Moon system. Participants explore the mathematical relationships and algorithms necessary for simulating celestial mechanics using Newtonian gravitation.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested, Mathematical reasoning

Main Points Raised

  • One participant, Daniel, describes his approach to determining the Earth's velocity in relation to the Moon's, proposing a proportional relationship based on their masses.
  • Another participant suggests that the math for n-body simulations is straightforward, emphasizing the importance of the algorithm rather than the complexity of the math itself.
  • A fourth participant shares their method of using ephemerides from the Horizons website to set initial conditions, focusing on calculating the center of mass for the bodies involved.

Areas of Agreement / Disagreement

Participants express varying levels of confidence in their methods and approaches, with no consensus on the best way to determine starting parameters for bodies of arbitrary mass and orbital radii. The discussion remains unresolved regarding the optimal techniques for setting initial conditions.

Contextual Notes

Participants mention limitations in their mathematical backgrounds, which may affect their understanding of celestial mechanics. There is also a dependency on external resources for algorithms and initial conditions, indicating potential gaps in knowledge.

Ostsol
Messages
12
Reaction score
0
I am programming an n-body simulation, but to test my program, I decided to start with two bodies. Specifically, I decided to model the Earth-Moon system. The issue I have is that Kepler's laws involve only the motion of one of the two bodies. From my understanding, the other is assumed to be static or of such mass that its motion is insignificant. That leaves me working with Newtonian gravitation and motion.

My problem is the starting conditions. Wikipedia tells me the mass of the Earth and Moon, and the orbital radius and velocity of the Moon. Simply inputting these parameters does not create a stable simulation, though. The entire system slowly moves. I was obvious that I was not accounting for the Earth's motion in my starting conditions. It was not obvious as to how I should determine the Earth's velocity.

Because my maths are effectively pre-calculus (I took single-variable calculus over a decade ago and have forgotten most of it), it is difficult to understand the maths behind celestial mechanics. Eventually, though, after playing with some numbers I found that the velocity of the Earth should be of a proportion to the Moon's that is inverse to the proportion of their masses. Basically:

v_e{}/v_m{}=m_m{}/m_e{}

Where v and m are velocity and mass, respectively; and the subscripts m and e are the Moon and the Earth, respectively. The Earth's velocity obviously points in the opposite direction as the Moon's. This creates a stables simulation regardless of the values input and the distances involved. As long as these proportions remain the same, the bodies trace the same orbital paths each time.

Now I'm sure that this proportion may be derived from the relevant formulae by those who have sufficient competence in the maths involved, but that's not me. I was unable to find this information on Wikipedia or in various Google searches, though perhaps that's not surprising. My questions therefore are: is this proportion documented somewhere and are there any others that I should be aware of?

Thank you.

-Daniel
 
Physics news on Phys.org
The math for doing an n-body simulation is pretty simple. All you need are Newton's laws. It's the algorithm that you have to be careful with. I did my first program using the information at this site:

http://www.cs.princeton.edu/courses/archive/spring11/cos126/assignments/nbody.html

Although it's for Java, you can still use the info to write the program in any language you like. Also, the instructions at the link site are for x and y coordinates only. But it's pretty easy to add the Z coordinates once you understand how it works.
 
Yes, the simulation was relatively easy to create. I even incorporated RK4 integration based on some information I found elsewhere in these forums. The problem is figuring out the starting parameters for bodies of arbitrary mass and orbital radii.
 
I seed my simulation with the ephemerides generated at the Horizons web site. I then calculate the center of mass for the bodies I am simulating and set that coordinate at 0,0,0 adjusting the coordinates and velocities of the other bodies accordingly.
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 22 ·
Replies
22
Views
2K
Replies
18
Views
3K
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K