# Where can I find a set of data of the initial conditions of our solar system?

As the title suggests, I'm in need of a set of data of our solar system. Similar to this http://bima.astro.umd.edu/nemo/archive/#iau25, but more specifically, the Dubinsky Milky Way-Andromeda data.

I'm creating a n-body simulation for school and can't seem the find any initial particle conditions that 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?

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

This is one set of possible options:

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

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.

You've probably long since moved on, but, just for reference, the initial conditions HORIZONS uses are mentioned ("header.431_572") in ftp://ssd.jpl.nasa.gov/pub/eph/planets/Linux/README.txt but the only place I could find them in "table form" is in my own git repository:

The values are explained in http://ilrs.gsfc.nasa.gov/docs/2014/196C.pdf 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:

https://github.com/barrycarter/bcapps/blob/master/ASTRO/bc-integrate.m

The output of the Perl script above, which includes all the equations you'll need, is: https://github.com/barrycarter/bcapps/tree/master/ASTRO/bc-integrate-init.m

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

https://github.com/barrycarter/bcapps/blob/master/ASTRO/bc-integrate-compare.m

I was able to get the Cartesian orbital vectors for all the major bodies from HORIZON at the J2000 epoch only. I could extend the coverage forward thru time. It’s easy to get data overload doing this. My simulation is modeled using the Laws of Gravitation and Motion alone. This gives results that are surprisingly close to those published. Running the solar system backwards (by reversing the velocity vectors) has given me the initial vectors back to 1900. This is all I needed and the results were close enough for my purposes. I still have the CSV files.

I have also have had all sorts of problems with the horizons interface. For instance changing the date had no effect on the value of the vectors. i.e.: all specified start dates have the same values. Lately, I have not been able to duplicate this feat. There are obviously some serious problems with this interface, especially lately.

I know the data I got was correct because it correlates, perfectly, with published events, e.g.: the recent transit of Mercury.

I too am still looking for this type of data.

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:

CALL RANDOM_NUMBER(randNum)
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.

• Wouldn't this solution assume planets have circular orbits? Commented May 13, 2014 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. Commented May 13, 2014 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. Commented May 13, 2014 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? Commented May 13, 2014 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. Commented May 13, 2014 at 1:48