Astronomy Stack Exchange is a question and answer site for astronomers and astrophysicists. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As title suggests I'm in need of a set of data of our solar system. Similar to this, specifically dubinsky milky way-andromeda data.

I'm creating a n-body simulation for school and can't seem the find any initial particle conditions which I could use to simulate our solar system in the software I'm developing. I need initial positions, velocity and mass.

Any idea where I could find this?

Thank you.

share|improve this question
up vote 2 down vote accepted

Horizons Ephemeris generator can give you a planet's position and velocity vectors at a specified time.

This is one set of possible options:

enter image description here

Clicking Generate Ephemeris on that page will give you position and velocity vectors:

enter image description here

Above the position and velocity vectors are the Julian date as well as the more conventional date.

Wikipedia can give the masses of the sun and planets.

share|improve this answer

You've probably long since moved on, but, just for reference, the initial conditions HORIZONS uses are mentioned ("header.431_572") in but the only place I could find them in "table form" is in my own git repository:

The values are explained in starting on page 39, "VI. Initial Conditions and Constants", especially in the tables starting with Table 4 on page 47 and ending with Table 13 on page 74.

I've written scripts to setup the initial conditions and numerically solve the differential equations using Mathematica, so the following may be helpful:

When I reduce the step size sufficiently (Mathematica's default step size is too large), my results closely match those of HORIZONS:

share|improve this answer

What language are you writing this simulation in? Is it 2D or 3D? Do you only need positions and velocities for our solar system planets?

I've done this exact thing (simulated the solar system in Fortran) and I didn't need exact initial positions, all I needed were initial radii (in AU from the Sun/centre of mass) and initial velocities. Use a random number generator to distribute the planets at random places along their orbits. In Fortran, this looked like:

degrees = 2*3.141592653
theta(1:15) = degrees*randNum(1:15)

And there I have an array of 15 random radial positions. You can obtain initial velocities of our solar system's planets from any reputable resource.

share|improve this answer
Wouldn't this solution assume planets have circular orbits? – Isracg May 13 '14 at 1:33
Yeah, it does, unfortunately. Luckily for us though, it's a reasonable assumption. Which planets are you attempting to simulate? It'd help a bit more if we knew more about your project's initial parameters and goals. – IronWaffleMan May 13 '14 at 1:34
Well firstly I'm doing this in C# using OpenCL and OpenGL. I'm using the naive O(n^2) algorithm as this was the easiest to implement in OpenCL. At first I tried to simulate the milkyway-andromeda collision but this turned out to be really slow, so now I'm only trying to simulate our solar system in 2D. – Isracg May 13 '14 at 1:38
OK, so... C# is suited far less for this kind of scientific computing than something like C/C++/Fortran. What are you using OpenCL/GL for? Simulating the solar system is far easier than the collision of billions of stars, yeah. For starters, unless you really care about it, you can ignore Mercury (it doesn't affect anything else). Are you simulating this to try to see how it reacts to instability, or some other end goal? – IronWaffleMan May 13 '14 at 1:44
Well I'm most familiar with C# than Fortran, and I'm using OpenGL for visualization and OpenCL for parallelism My end goal is visualizing the planets orbits around the sun. – Isracg May 13 '14 at 1:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.