N-Body Problem - Initial Values

In summary, a games engineering student is struggling with the N-Body Problem and has implemented basic equations using a leapfrog algorithm. They have two questions regarding calculating the ideal velocity for an orbit and the angular velocity for an N-Body Problem. The current setup includes a stable circular orbit with a sun, earth, and possible addition of more planets. The expert suggests calculating the gravitational parameter and mentions that the exact approach depends on the simulation setup. They also discuss the spin of planets and how it is affected by collisions and other factors.
  • #1
physxfreak
2
0
Hello everyone,
I'm new here so let me introduce myself first:
I'm a games engineering student and my main field is programming


Right now I'm struggeling with the N-Body Problem, well I think actually solved parts of it:
I've implemented the basic equations with a leapfrog algorithm and they seem to be working correctly


Now I have 2 questions:

1.)
When I place a star at a certain position, I want to calculate the ideal velocity in order to produce an orbit. How is this achieved?

2.)
How can I calculate the Angular Velocity for an NBody-Problem?

----------------------------------
My current setup (as reference):

sun (position=0,0,0; mass=333, velocity=0,0,0)
earth(position=-50,0,0, mass=1, velocity=0,0,2)

This is producing a stable circular orbit
It is also possible to add more Earth's/planets with stable orbits
I know that the mass ratio is not quite right, but i want to achieve a "compressed universe"
----------------------------------------

I would appreciate your help on this.
 
Physics news on Phys.org
  • #2
Right now I'm struggeling with the N-Body Problem,
everybody does - you realize there is no analytical solution?
well I think actually solved parts of it
...depending on what you mean by "solved" of course :)
I mean to show you that physicists think of the n-body problem a bit differently to comp-scientists ... I'm guessing you are trying some sort of parallel processing?
Now I have 2 questions:

1.)
When I place a star at a certain position, I want to calculate the ideal velocity in order to produce an orbit. How is this achieved?
For a particular stable orbit, the velocity (and speed) will be different for different parts of the orbit. For a circular orbit, you just need to balance centripetal acceleration for both bodies with the force of gravity on them.

2.)
How can I calculate the Angular Velocity for an NBody-Problem?
That would be the angular velocity of each body in the problem?

$$\vec{\omega}=\frac{\vec{r}\times\vec{v}}{|\vec{r}|^2}$$

...which requires that you know the velocities of course.
The exact approach depends on how you are setting up your simulation.
 
  • #3
Hi physxfreak; Welcome to Physics Forums.

If you've got a particular set of conditions that produces a circular orbit you can calculate the gravitational parameter for your simulated solar system.

The circular orbit velocity for a planet of negligible mass at distance r from a Sun of mass M is given by:

$$v = \sqrt{\frac{GM}{r}}$$

If you solve for μ = GM, then you can use this parameter to find the required speed for circular orbits of other radii. Note that if you have a known radius and velocity you don't even need the mass of the star to find the parameter μ. Even in "real life", μ = GM for our solar system is known with more accuracy than G or M alone.
 
  • #4
Simon Bridge said:
everybody does - you realize there is no analytical solution?...depending on what you mean by "solved" of course :)
Yes I know that the N-Body Problem is unsolved for n>=3, but I'm using a numerical solution (with a leapfrog algorithm)

Simon Bridge said:
I'm guessing you are trying some sort of parallel processing?
No not at the moment, as i have a quite small problem size (n<100) at the moment

Simon Bridge said:
That would be the angular velocity of each body in the problem?

$$\vec{\omega}=\frac{\vec{r}\times\vec{v}}{|\vec{r}|^2}$$

...which requires that you know the velocities of course.
The exact approach depends on how you are setting up your simulation.

Well I'm searching for a way to calculate the "spin" of each planet, like the Earth rotating around it's own axis 365 days a year. But I assume that this spin was given by collisions rather than the gravitational force?

@Gneil:
Thanks, that is exactly what i looked for :)
 
  • #5
Well I'm searching for a way to calculate the "spin" of each planet, like the Earth rotating around it's own axis 365 days a year. But I assume that this spin was given by collisions rather than the gravitational force?
The spin is not something that is determined by anything you can tell from the final state of the body no.

I think models of how planets form have been changing recently - very loosly, they form out of eddies in the planetary nebula surrounding the proto-star, the spin would be mostly affected by that. Any random collection of particles will gravitate to a spinning sphere-oid ... but you are right that collisions once solidified will also affect things, as will the presence of satellites and gravitational resonances like tide-locking (and see mercury).

For most planets you can just pick a rotation to suit yourself.
Close orbiting bodies will have some sort of resonance.
 

Related to N-Body Problem - Initial Values

1. What is the N-Body Problem?

The N-Body Problem is a classical problem in physics that involves predicting the motion of a system of particles interacting through gravitational forces. It is commonly used to model the motion of celestial objects such as planets, stars, and galaxies.

2. What are the Initial Values in the N-Body Problem?

The Initial Values in the N-Body Problem refer to the initial positions and velocities of each particle in the system. These values are crucial in determining the future motion of the particles and are typically specified at a specific time, such as the present moment.

3. How are the Initial Values determined in the N-Body Problem?

The Initial Values in the N-Body Problem can be determined through observations, simulations, or theoretical calculations. For celestial bodies, initial positions and velocities can be measured through telescopes and other instruments, while for other systems, they may need to be calculated based on known physical laws and conditions.

4. Why are the Initial Values important in the N-Body Problem?

The Initial Values are important in the N-Body Problem because they serve as the starting point for predicting the future motion of the particles. Even small errors in the initial values can lead to significant differences in the predicted outcomes, making the accurate determination of these values crucial for obtaining accurate results.

5. Can the Initial Values be changed in the N-Body Problem?

Yes, the Initial Values in the N-Body Problem can be changed. However, doing so will alter the predicted outcomes of the system. In some cases, changing the initial values may be necessary to accurately model certain phenomena, but it must be done carefully to avoid significant discrepancies in the predicted motion of the particles.

Similar threads

  • Introductory Physics Homework Help
Replies
11
Views
296
  • Classical Physics
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
5
Views
3K
  • Introductory Physics Homework Help
Replies
3
Views
2K
  • Introductory Physics Homework Help
Replies
19
Views
865
  • Introductory Physics Homework Help
Replies
2
Views
1K
  • Introductory Physics Homework Help
2
Replies
42
Views
3K
  • Introductory Physics Homework Help
Replies
27
Views
790
  • Introductory Physics Homework Help
Replies
6
Views
1K
Back
Top