Gravity Simulator
http://www.orbitsimulator.com/cgi-bin/yabb/YaBB.pl
General >> Discussion >> unlocking sun from solar system barycentre
http://www.orbitsimulator.com/cgi-bin/yabb/YaBB.pl?num=1212924640

Message started by tallbloke on 06/08/08 at 04:30:40

Title: unlocking sun from solar system barycentre
Post by tallbloke on 06/08/08 at 04:30:40

Hi all, noobie question about this fantastic software
.
In this link http://www.physicsforums.com/showthread.php?t=117567 'tony873004' (Tony Dunn?) uses the orbit simulator to demonstrate the effects of the planets on the suns motion about the barycentre opf the solar system.

"Unlocking the Sun exposes the solar system barycenter which is now locked to the center of the screen. The Sun spends nearly a decade in this image circling the solar system barycenter:
http://orbitsimulator.com/BA/sbc2.GIF

Editing the Sun and setting its size to 0 while retaining its mass allows me to zoom in on the solar system barycenter and observe the Sun's path around it:
http://orbitsimulator.com/BA/sbc4.GIF"

How do I use the menu options to "unlock the sun"?

Do I need to import data from the JPL file? How do I do this please.

Many thanks

tallbloke


Title: Re: unlocking sun from solar system barycentre
Post by frankuitaalst on 06/08/08 at 04:44:50

Hallo and welcome here .
There's a simple trick : if you toggle between absolute and floating mode left on the screen, you get in the center of the screen the barycenter of the system and in the other case the object you have centered to . Thats probably what Tony called unlocking the sun .
Figure herunder may be self explaining ...
I think the second part may best be answered by Tony , but you can already download a lot of good .gsim files under the "simulations" menu to start with .

Title: Re: unlocking sun from solar system barycentre
Post by tallbloke on 06/08/08 at 05:07:10

:)
Thanks very much for the extremely quick reply. Now I need to RTFM so I can make a graph of the variation in the earths distance from the sun wrt time. I would particularly like to produce a graph which shows the variation of distance due to the barycentric motion of the sun, with the variation due to the eccentricity of the earths orbit removed. Is this best done by creating a new object of zero mass in a circular orbit at mean earth-sun distance?

Title: Re: unlocking sun from solar system barycentre
Post by frankuitaalst on 06/08/08 at 05:24:58

:)I think we're on the same time-line ...
You can start with the solarsystem.gsim file and under the first menu select "create output file ", selecting the bodies you want and selecting for instance Rx,Ry,Rz . Then you get a datafile which can be read by exel . In this file you can perform the necessary calculations and generate graphs.
I'm not sure if the barycenter data can also be outputted directly . Tony can give some more info about this .

Title: Re: unlocking sun from solar system barycentre
Post by tallbloke on 06/08/08 at 05:33:51

Thanks again!
One more dumb question. How do I shift the viewpoint to a 'polar' position above the barycentre. Can't seem to find anything under the view menu...


Title: Re: unlocking sun from solar system barycentre
Post by frankuitaalst on 06/08/08 at 05:53:08

Running the simulation you see at the right a scroll bar . Scrolling let you alter the viewpoint from equatorial to polar and even from N to S- pole ...

Title: Re: unlocking sun from solar system barycentre
Post by tallbloke on 06/08/08 at 06:30:26

:-[
D'oh! Should have spotted that. Can it be set numerically to an exact value?

I'm using the fullsystem.gsim setup (Is this what you meant by solarsystem.gsim as I don't have that?). I'm assuming anything beyond pluto isn't going to affect the outcome by any significant degree, and the asteroid belt, due to it's even toroidal distibution can also be ignored. Does this seem right?

The problem I'm encountering is that I get a different result each time I run the same simulation. Am I missing something obvious? Do I need to 'reset the sytem' each time in some way, or am I running the simulation too quickly, causing maths errors to multiply? I'm running the clock back from the default start date  at 1-1-2005 to 1985, then forward to 2140 using 16384 second steps on a 1ghz laptop.

Any hints appreciated.

Title: Re: unlocking sun from solar system barycentre
Post by frankuitaalst on 06/08/08 at 11:39:56

There's another sim : onlyplanets.gsim which is more suited for what you're doing .
The difficulty you have may be related to the timestep you've choosen to be too big . 16000 seconds is about 5 hours . For this application my suggestion is a timestep of about 1024...seconds.  
Running forwards and backwards should normally result in getting to the same position as the starting position .

Title: Re: unlocking sun from solar system barycentre
Post by tallbloke on 06/08/08 at 12:32:42

Thanks again, I'd started playing with onlyplanets.gsim at a faster rate so I'll try your time interval suggestion.

update: Looking good, the discrepancies have all but disappeared. Fantastic software!!

Thanks a million for your help Frank, and to Tony for his software!

Title: Re: unlocking sun from solar system barycentre
Post by Tony on 06/08/08 at 13:33:26

I think that Ceres contains more than half the mass of the asteroid belt, so it might not be as easy as assuming they average to 0.  Perhaps contain the 5 most massive asteroids, and then you can more confidently assume that the rest average to 0.

Regardless, the asteroids effect will be small with Jupiter and friends in the simulation.

I just simulated from 2085 to 2134 to compare to the graph you linked to.  This is the rightmost image on the top row from your link.  My results look identical.
http://orbitsimulator.com/gravity/images/ssbc.GIF

I'll sent you a procedure later on how to do this.

Title: Re: unlocking sun from solar system barycentre
Post by tallbloke on 06/08/08 at 13:41:32

Tony, many thanks for your input. I've got the same result now, albeit rotated 90 degrees CW.

Are the asteroids included in the planetsonly.gsim or should I be using the fullsystem.gsim and eliminating the objects I don't need to give my cpu an easier life? As you say, their effect is very small compaared to the gas giants, and our result looks identical to charvatova's now, so perhaps planetsonly is good enough for the job.

Now to try to get the output file right for the graphing I need to do...  :-/

Title: Re: unlocking sun from solar system barycentre
Post by tallbloke on 06/08/08 at 14:26:09

OK, all the exported data is open in excel in reasonable order, each line starts with a date, and all the planetary data is nicely columnised. The sun seems to have a lot of zeros though, so I'm assuming the barycentric offset is contained in the other planet's data.  :D

I'm a bit of a dunce so I need a hint as to how I can extract a monthly value for sun-earth seperation distance from this.  :o

is there a list of what each column represents anywhere? I guess it's a polar coordinates and pythagoras job?

Title: Re: unlocking sun from solar system barycentre
Post by frankuitaalst on 06/08/08 at 15:16:07

The first line should content something as :
"Date ,Planet , Rx,Ry,Rz,Vx,Vy,Vz,Planet2,Rx,Ry, Rz...."
Then applying Pytha gives : dist : sqrt( (x2-x1)^2+(y2-y1)^2+(z2-z1)^2) .

Title: Re: unlocking sun from solar system barycentre
Post by tallbloke on 06/08/08 at 15:24:56

Thanks again for your help today Frank. My local time is half past late now, so I'll sleep on the info, but I think I will be able to get my head round it tomorrow.

I seem to remember a joke which tells how the son of the squaw on the hippopotomus is equal to the sons of the squaws on the other two hides so I should be ok.  ;)

Title: Re: unlocking sun from solar system barycentre
Post by tallbloke on 06/09/08 at 00:50:12

Still confused here. Each body has 12 columns of data rather than 6. I couldn't find a way to only select the sun and earth and the positions only in the output file dialogue as Frank recommended in post #3. For example, for the date   1949 06 04   08 53 20      I get:

Sun      90673943.14      1      12.27905629      12.12222472      54.08633076      1.44E-08      -1.00454E+11      -1.20057E+12      12495684887      -11.99920675      -14.61436072      0.364674531            

Earth      149753944.4      4.67E-02      0.500939501      172.5871892      163.899023      52.24387224      -1.38226E+11      -1.05146E+12      11334720955      -28347.65866      -6056.291874      119.8243351


Assuming the last 3 columns are the positional data and applying franks formula in excel like this:
=SQRT(ABS((Z1-L1)^2+(AA1-K1)^2+(AB1-M1)^2))
I'm getting a result of 12495690944 for this first line of data.
The rest of the values in my monthly series from 1949 to 2057 gradually increase to 12982919059. Wheras I expected to see them rise and fall by 1% or so each decade.
All the reast of the lines of data have the following columns after the sun:
Sun      0      0      0      0      180      180


The average sun-earth seperation is just under 150million km, which seems to be reflected in the first data column after the planet name, and the barycentric oscillation should change this by up to 700,000km or so unless I misunderstand the physics, which is entirely possible.

It looks like I fouled up somewhere.  :(


Sorry to be nagging for help.  :-[

Title: Re: unlocking sun from solar system barycentre
Post by frankuitaalst on 06/09/08 at 09:42:03

You can select first of all the bodies you want at the right , and then the properties you want .
Omit the first and only select from Rx...to Vz, so 6 variables . I usely do this with the simulation paused not to loose any data .
Then copying into exel gives you a string which you convert ...But I see you managed this already . You can post the output file if you want or part of it .
Be assured : units are in m and m/s.

Title: Re: unlocking sun from solar system barycentre
Post by tallbloke on 06/09/08 at 09:58:10

Hi Frank, thanks for hanging with me.

You said before:
"under the first menu select "create output file ""

but I don't have that option under the "file" menu, just "autosave" with the option to create a data file.
There doesn't seem to be any way to select bodies or data types here, just a way of setting time intervals, and the number of autosaves. Am I on the wrong menu here? I'm using V2.0.0.

Looking through the forum for clues, I came across someone trying to use a 'data viewer'. Is this an additional piece of software? Where can I download it if it is the thing I need?

Title: Re: unlocking sun from solar system barycentre
Post by frankuitaalst on 06/09/08 at 10:29:07

Maybe you have an older version . The newest version I can remember is Beta20jan2008. I think you can go through the posts to find it to download . This works fine . In the menu the ouput file option is just below the autosave .
The dataviewer is anaother kind of postprocessing code which calculates resonances .
Here you can find the latest one :
http://www.orbitsimulator.com/cgi-bin/yabb/YaBB.pl?num=1176774875

Title: Re: unlocking sun from solar system barycentre
Post by tallbloke on 06/09/08 at 10:50:23

Great! found the beta, and I'm rerunning the sim now. See you in a bit... 8-)

Title: Re: unlocking sun from solar system barycentre
Post by tallbloke on 06/09/08 at 12:45:43

Hmmm. Reran the sim in floating mode and got the graph made. But it just shows the regular variation you'd expect from the orbital eccentricity of the earth. Here's the first few lines of data. The final value is the calculated sun-earth distance:

Date      Name      Rx      Ry      Rz            Name      Rx      Ry      Rz            
1949 01 01   11 59 32      Sun      -2.79E-02      -0.830281854      7.16E-03            Earth      -33062237140      1.42908E+11      16050786.48      1.46683E+11      
1949 01 31   23 00 52      Sun      5.838130654      -59.03008921      -0.172135874            Earth      -1.02492E+11      1.05352E+11      10694080.66      1.46982E+11      
1949 03 03   10 02 12      Sun      47.95433189      -192.1423863      -1.100361031            Earth      -1.43037E+11      38032746237      2391547.353      1.48007E+11      
1949 04 02   21 03 32      Sun      117.3358131      -408.4731118      -3.117500599            Earth      -1.44038E+11      -39898156024      -6500385.233      1.49461E+11      

The odd thing is that the barycentric motion of the sun is very small if the distances are in metres. Yet when I zoom in on the sim it shows the sun moving in a wide arc about the solar system barycentre.

Perhaps Tony could tell me where I'm going wrong?

Title: Re: unlocking sun from solar system barycentre
Post by Tony on 06/09/08 at 17:05:58

You're looking at the barycenter of the Sun + 8 planets.  But since Earth orbits inside the orbits of the gas giants, they pull on Earth as well as pulling on the Sun, negating much of their effect.  

As an example, imagine if the Sun had an unknown companion, a 10 Jupiter-mass brown dwarf orbiting at 1000 AU.  This would shift the solar system barycenter a great deal.  But being unknown, we wouldn't realize the barycenter was off by that much, because in looking at the Sun / planets barycenter, you can safely ignore anything orbiting external to the planets.  Similarly, when looking at the barycenter distance to Earth, you can ignore everything external to Earth because Jupiter and friends are pulling the Earth with the Sun.

Title: Re: unlocking sun from solar system barycentre
Post by tallbloke on 06/10/08 at 00:22:06

Tony, many thanks, that's a much clearer explaination than I've had elsewhere, and I can see where I had misconcieved what is happening.

It's causing lot's more ideas to occur to me, but I'll think them through for a while and use the software to see if I can work them out before I bother you with more dumb questions.  :o

Please could you explain why the labels for the gas giants changed from V2.0.0 to the latest beta? E.g. from 'jupiter' to 'jupiter barycentre'. Is this an 'internal' reference to the Jupiter system including it's moons?

Thanks again for your time.

Title: Re: unlocking sun from solar system barycentre
Post by Tony on 06/10/08 at 13:18:42

The switch in names from "Jupiter" to "Jupiter Barycenter" has nothing to do with the version.  That's just the particular simulation you're running.  Either version should be able to open either simulation.  "Jupiter Barycenter" refers to a ficticious object that has the combined mass of Jupiter and its moons, plus their combined momentum.

Title: Re: unlocking sun from solar system barycentre
Post by frankuitaalst on 06/10/08 at 22:48:10

I'm not sure about this but was thinking  : if you don't get the coordinates referenced  to the barycenter , but  in absolute coordinates you might first have to calculate het position of the barycenter :
rbc= sum(mass*robj)/totmass. in three coordinates , and then applying the Pytha rule to the objects position and the barycenter position . I can be wrong . If the coordinates are absolute the outputted values themselves could already  be  the barycentric positions and so no Pytha is needed at all , except to derive the distance . Linear momentum rule should keep the BC at 0,0,0 . Perhaps Tony can answer this.  

Title: Re: unlocking sun from solar system barycentre
Post by Tony on 06/11/08 at 10:33:08

Gravity Simulator continuously shifts the entire system so that the first object in the simulation always sits at (0,0,0).  If it drifts to (1,1,1) then all objects are shifted (-1,-1,-1).  This prevents the solar system from drifting light years away from the origin.  Since it uses double precision variables, positions in the solar system can be specified to exact centimeters.  But once it drifts far from the origin, it is only meter-accurate, then km-accurate, then AU-accurate... etc... This causes some strange errors, such as square orbits.  That is why Gravity Simulator continuously re-centers.

So when you output data, the Sun should always have a position of (0,0,0).  So you'll have to compute the barycenter yourself in your spreadsheet.

Gravity Simulator » Powered by YaBB 2.1!
YaBB © 2000-2005. All Rights Reserved.