Page 1 of 1

Mass ratios?

Posted: 19.11.2011, 06:22
by PlutonianEmpire
I notice that in the STC data for binary stars, I see the line "# Mass Ratio x:y", with the x and y being numbers, of course.

What is the mass ratio, and how do I use it to calculate the orbits of the stars from the barycenter, considering I always see the mass ratio line right after the "SemiMajorAxis" numbers?

Re: Mass ratios?

Posted: 19.11.2011, 17:35
by selden
It's the ratio of the masses of the two stars. A higher mass star orbits closer to the barycenter than does the lower mass star. Their orbital SMAs are inversely proportional to their masses. See my previous postings about this, which are included in the thread which starts a viewtopic.php?f=6&t=16589&start=30

Re: Mass ratios?

Posted: 20.11.2011, 02:18
by PlutonianEmpire
Thanks. :)

Re: Mass ratios?

Posted: 12.12.2011, 06:15
by PlutonianEmpire
New question: The easiest formula I got was the one in this post.

If I wanted to do calculations for binary planets instead of stars, using kilometers and earth masses, how would that formula need to be changed?

Re: Mass ratios?

Posted: 12.12.2011, 12:38
by selden
You can use the same formulas if you convert the units to AU and years before applying the formulas, and then back to km and days afterward.

Celestia wants values for objects orbiting around planets (ReferencePoints) to be in km and days, while values for objects orbiting around Stars (Barycenters) in the formulas have to be in AU and years.

Re: Mass ratios?

Posted: 12.12.2011, 17:26
by t00fri
selden wrote:You can use the same formulas if you convert the units to AU and years before applying the formulas, and then back to km and days afterward.

Celestia wants values for objects orbiting around planets (ReferencePoints) to be in km and days, while values for objects orbiting around Stars (Barycenters) in the formulas have to be in AU and years.

Didn't Andrew implement the option to use more general units deviating from the historical defaults? I have never tested this personally, but when working with the C++ code, I keep stumbling over such mods...Of course the preferred units need to be declared appropriately in the config files.

Fridger

Re: Mass ratios?

Posted: 26.02.2012, 04:13
by PlutonianEmpire
For future readers of this thread, here's something that may be of help:

In the formula I linked to, which is this:

a1 = (a1+a2) * m2/(m1+m2)

a2 = (a1+a2) * m1/(m1+m2)

I realized the formula could actually be kinda simplified (maybe?), for faster calculations:

(a1 + a2) Is really the total orbital separation between the two bodies, so just simply type in the desired distance from the primary object much as you would a planet orbiting a star.

(m1+m2) is the combined total mass of the two objects. You'll still need to do two separate calculations though, which is to multiply the distance by the mass of one of the individual bodies divided by the total mass of the two bodies, so really, the formulas could be simplified into these:

a1 = (d) * m2/(t)
a2 = (d) * m1/(t)

where "d" is the distance between the two objects, "t" is the total mass of both objects combined, "a1" is the SemiMajorAxis of the primary (more massive) object around the barycenter, "a2" is the SemiMajorAxis of the secondary (less massive) object around the barycenter, "m1" is the mass of the primary object, and "m2" is the mass of the secondary object.

Hope this helps. :)

Re: Mass ratios?

Posted: 26.02.2012, 13:13
by ajtribick
t00fri wrote:Didn't Andrew implement the option to use more general units deviating from the historical defaults? I have never tested this personally, but when working with the C++ code, I keep stumbling over such mods...Of course the preferred units need to be declared appropriately in the config files.

Fridger
This is implemented in the trunk, for when we get round to releasing 1.7.0.

Re: Mass ratios?

Posted: 26.02.2012, 13:26
by t00fri
ajtribick wrote:
t00fri wrote:Didn't Andrew implement the option to use more general units deviating from the historical defaults? I have never tested this personally, but when working with the C++ code, I keep stumbling over such mods...Of course the preferred units need to be declared appropriately in the config files.

Fridger
This is implemented in the trunk, for when we get round to releasing 1.7.0.

I have never used much anything else than that ;-) . Sorry.

Fridger

Re: Mass ratios?

Posted: 27.02.2012, 00:35
by PlutonianEmpire
selden wrote:You can use the same formulas if you convert the units to AU and years before applying the formulas, and then back to km and days afterward.
I did this, and the numbers I got were the exact same from not converting, so I guess this is moot.