Page 1 of 1

How to do Binary Systems

Posted: 24.02.2009, 21:13
by starcreator
Hello.

I have some time using Celestia and I know how to do some basic topics. But now, I'd like to start to do some binary systems, but I don't know how to calculate the semi major axis of the stars that compose the system. I found some formulas in Wikipedia, but I can?t undestand them.

For example, I create a barycenter in x position. Then, I choose 2 stars which I can use as a model. In this case:

Epsilon Reticuli with 1.2 solar masses and
HD 63454 whith 0.8 solar masses.

I'm just gonna get the absolute magnittude and the class to make my fictional stars in Celestia. But I want to calculate the semi major axis of both stars respect to the barycenter using the masses of the stars.

Can anybody please help me with a formula to calculate this?

don't worry, be happy...
mike

Re: How to do Binary Systems

Posted: 01.03.2009, 15:40
by duds26
You need to calculate the barycenter of two masses.

Let's assume point-masses.
https://en.wikipedia.org/wiki/Point_particle#Point_mass

so there is a mass m1 on a position v1 (x1,y1,z1)
and a mass m2 on a position v2 (x2,y2,z2)

the total mass is: m1 + m2
with coordinates x, y, z


And now: the center of gravity is:
v = (1/[total mass])*(m1*v1 + m2*v2)

(working it out as a vector with dimension 3)

v = (1/total mass) * ( [m1*x1]+[m2*x2])
( [m1*y1]+[m2*y2])
( [m1*z1]+[m2*z2])


working this out gets you:

v = (1/total mass) * (x,y,z)

(It's a 3 dimensional vector, that's why I used that notation)
Try to make this in OOo Calc or MS Excel,
you can also do this for more than 2 bodies

The equations become:
x-component of v = (1/total mass) * (m1*x1 + m2*x2 + m3*x3 + ...)
y-component of v = ...
z-component of ...

total mass = m1 + m2 + m3 + ...

The total distance depends on the orbit time of the bodies and by that relation
you can thus specify one of the parameters and the other stuff will be in relation to it.
(If your formulas are correct)

https://en.wikipedia.org/wiki/Orbital_period
This Wikipedia article should supply all what's necessary about orbit time.

A few important tips:
-> units, be sure to do the right conversions and your date has the right unit
-> put all of the calculations in a spreadsheet,
this way you can use it in the future and do a lot of calculations, stuff very fast.
-> make your calculations as modular as possible,
this will make debugging easier as well as adding new features to your spreadsheet for calculation

Good luck and
post a reply when you have done coding.

Re: How to do Binary Systems

Posted: 09.04.2009, 00:52
by starcreator
Sorry that I haven't written. I have had a lot of work.
Also, it's been a lot of time since I worked with vectors, and I never used them in excel.

I did something like this:

Image

-I put the Epsilon Reticuli twin at the center of the vectors.
-I got the distance between the stars using the third law of kepler (Epsilon Reticulli has planets). I tried to use the Newton's formula for the third law
(http://es.wikipedia.org/wiki/Leyes_de_Kepler), but this didn't work out.
-I used the masses in solar masses (I think that Excel has problems using too high or too low numbers), and the distances in astronomical units

Image

I don't know if I did it right. The SMA's seems logical to me, but solar masses and astronomical units doesn't fit, right?
Tell me if you don't see the images.

Re: How to do Binary Systems

Posted: 09.04.2009, 00:58
by starcreator
By the way, I changed the Newton's Formula to get the Semi Major Axis, istead of the Period:

p2 = (((4*pi)2)/(G*(m1+m2)))*a3

and I got this:

a3 = ((4*pi)2)/(G*(m1+m2)*p2)

The number after "a", "pi" and "p" are their potences.

Re: How to do Binary Systems

Posted: 09.04.2009, 12:02
by duds26
You just have to recalculate the constants to fit the solar masses.
(Do that with calculator not with Excel in one step, )
(or do multiple steps in excel to overcome the number limitation. )

Using the distance in astronomical units and doing the masses in solar masses is not a bad idea.
It doesn't fit indeed, recalculating constants and you can go.
(Putting the constants in a separate field in excel with a label is helpful to keep an eye on things.)

Interesting post about Lagrange points and addon:
http://www.shatters.net/forum/viewtopic.php?f=6&t=13618

I haven't been buzzy with astronomical calculations for a while.

But here are some unit calculations:
1 solar mass = 1.98892 ? 10^30 kilograms
1 Astronomical Unit = 149 598 000 kilometers
(Typed names in at google.)

There is not more information about this matter I can currently help you with.
Good Luck

Re: How to do Binary Systems

Posted: 14.04.2009, 04:42
by starcreator
Thanks, I already tried to use the units in Kilograms and Meters, but Excel couldn't handle them. That's why I said that "Excel has problems with too high or too low numbers".

I didn't understand what you meant with "You just have to recalculate the constants to fit the solar masses" :? How would you do this?

Anyway, it's a good Idea that you have mentioned the Lagrange points. I want to put the nearest planet in the L3 of the star's system. But it may be too close to the biggest star, so it may be under the Roche's limit of the star. And it seems that the lagrange points won't be possible because of the masses of both stars are not in a relation of 25 to 1.

That launches a new question: How can I calculate the minimun stable orbit around the stars?

But lets solve first the question of the binary system itself. I can put that planet in another of the stars that will compose the system. :mrgreen:

Well, I have a lot of work to do before May 1st. right? :lol:

Re: How to do Binary Systems

Posted: 14.04.2009, 10:21
by duds26
Because excel can't handle it, use a calculator to calculate some things out.

The constants for calculating forces are very small something*10^-somethingelse,
if you calculate something in solar masses,
something more near small, hand able numbers come out.
And excel might be able to do that then.

If not, there needs to be another pad taken:

Write a macro that deals with it.
Or write a program that does it for you.
Or use a program that can work with such large numbers (computer algebra system).

Spending some time in a gravity simulator program could be very interesting for finding that stable orbit.

Re: How to do Binary Systems

Posted: 03.06.2009, 18:40
by ares2101
First off, new to the forum, so hello (maybe people at Orion's Arm are around, hey guys).

I have occasionally toyed with using Celestia to make the star systems in my sci-fi setting and recently I've worked out some ways to make this easier, but there are aspects of Binary Systems that still bug me.

First, there are programs and excel sheets out there that automate the creation of .ssc files for asteroid belts (Asteroid Maker) and even nice user interfaces to save effort in .ssc files for planets, spacecraft, etc (System Maker for Celestia), but I haven't yet found a similar thing for stars themselves. Does anyone know of anything similar to the previously mentioned items that can generate data for wholly fiction stars easily without needing to work with vectors, converting desired luminosity to absolute magnitude, etc. Something you'd basically punch in mass, luminosity, spectral type and get everything from it? This would be nice for creating distant star systems, especially binary stars.

Second, when toying with putting planets and other objects around preexisting binary stars I run into complications involving discrepancies between the plane of individual stars and the plane of the binary orbit. Take Alpha Centauri for example, I've seen articles suggesting planets would be most stable to the furthest distances if the planets orbiting in the plane of A and B, not by orbiting in the plane of the individual star they orbit.

To Start, here is the default I get without any tricks:
http://johnsonm.com/Pics/Original.jpg

Note how the orbital plane of each star is practically perpendicular to the plane of the AB Orbital plane. This seems to occur from making a simple orbital definition in the .ssc file:

"Hermes" "Rigel Kentaurus A"

{
Class "Planet"
Texture "mercury-like.jpg"
Radius 3478
EllipticalOrbit
{
Period 0.563
SemiMajorAxis 0.7
Eccentricity 0.001
Inclination 1.2
}
RotationPeriod 4935.258
Obliquity 0
Albedo 0.06
}

The data of course varies for each planet, but these are the only parameters I define for any of the planets. It occurred to me that since there is a Plane mismatch, maybe the orbital data on the stars themselves is more complicated, more parameters are defined, so looked in the Near Stars file and studied the data on Rigel Kentaurus A:

71683 # ALF Cen A
{
OrbitBarycenter "ALF Cen"
SpectralType "G2V"
AppMag 0.01

EllipticalOrbit {
Period 79.914
SemiMajorAxis 10.765 # mass ratio 1.09:0.92
Eccentricity 0.5179
Inclination 82.986
AscendingNode 67.726
ArgOfPericenter 3.772
MeanAnomaly 200.119

}

This has 3 additional parameters, I put them in bold, there is also a major inclination. Now, I know from other work in Celestia that Mean Anomaly basically just shifts where in the orbit the object stars, so I experimented with the other factors and got one that at first seems to do what I want. By giving a planet an additional Ascending Node and Inclination equivilant to what Star A itself has, I get the planet in the AB Plane as seen below; the highlighted orbit of the first planet is in line with the AB orbital plane.

http://johnsonm.com/Pics/Inclination_and_Ascending_Node_Altered.jpg

However, this presents an additional problem.

http://johnsonm.com/Pics/Hermes_Inclination_and_Node_Altered.jpg

Hermes is now heavily tilted, as is any other planet I do this to. The obvious, of course, occurred to me, if you tilt an orbit without a corresponding axial tilt you get a situation like Uranus, a planet on its side. However, even by adding an Axial Tilt of 82.986 degrees in either direction, the plane of the equator doesn't line up with the plane of the AB Orbit. What am I missing here? Any thoughts?

Re: How to do Binary Systems

Posted: 03.06.2009, 20:36
by selden
ares2101,

Welcome to the Celestia forum!
There are several OA people here.

By default, Celestia defines orbital planes with respect to our Solar System's ecliptic plane. This is almost never the same as the plane of the orbits of the stars in binary systems, nor is it likely to be the plane defined by the rotation axis of any individual star. In other words, all of the elements of the orbits and orientations of the bodies in another star system have to be tilted relative to Celestia's default.

So far as I know, nobody has written a utility to automate the appropriate calculations.

I also don't think anyone has taken the time to write a utility to automate the definition of stellar parameters in terms of one another.

Maybe you could be persuaded to write a tool for one of these these tasks?

Re: How to do Binary Systems

Posted: 03.06.2009, 22:01
by ares2101
ares2101,

Welcome to the Celestia forum!
There are several OA people here.

Thank you.

By default, Celestia defines orbital planes with respect to our Solar System's ecliptic plane. This is almost never the same as the plane of the orbits of the stars in binary systems, nor is it likely to be the plane defined by the rotation axis of any individual star. In other words, all of the elements of the orbits and orientations of the bodies in another star system have to be tilted relative to Celestia's default.

How heliocentric...and familiar, I think I must have asked about this problem before, just not here, had to register.

So far as I know, nobody has written a utility to automate the appropriate calculations.

Damn, guess I gotta accept the angle wide binaries make on each other's planets as bad.

I also don't think anyone has taken the time to write a utility to automate the definition of stellar parameters in terms of one another.

Once again, damn. Guess I'll have to learn that procedure in the Celestia guide and how to do the calculations it requires. This is why it sucks to write fictional systems in binary stars, a lot harder to just find a star that's close enough to make the image of the planet look about right.

Maybe you could be persuaded to write a tool for one of these these tasks?

I'm afraid I'm not the guy to talk about about doing this, I search far and wide for such tools because I have a hard time with the precision of higher math and even the not-quite-programming involved in ".ssc" files.

Re: How to do Binary Systems

Posted: 05.06.2009, 22:16
by ajtribick
Argument of pericentre, inclination and longitude of the ascending node are in fact the same as Euler angles and allow the orbital orientation in space to be specified.

Start with the orbit in the xy plane with periastron in the +x direction. First rotate around the z axis anticlockwise through the angle specified by the argument of pericentre. Next rotate around the x axis anticlockwise by the inclination. Finally rotate again around the z axis anticlockwise through the angle given by the longitude of the ascending node.

Of course the question is what to use as the convention for the x, y and z axes. Celestia convention is to use ecliptic coordinates for planets and stellar orbits, whereas most references you will find for binary star orbits and exoplanetary orbits use plane-of-sky coordinates. Thus the numbers you see in the .ssc file are not what you get out of the binary star catalogues!

As for aligning the rotation axis so that it is perpendicular to the orbit, just set the Inclination and AscendingNode properties in the UniformRotation block to match the same properties in the EllipticalOrbit block, e.g.

Code: Select all

"Test" "ALF Men"
{
    Radius 70000
    Texture "exo-class2.*"
    EllipticalOrbit {
        Period 1
        SemiMajorAxis 1
        Eccentricity 0.4
        Inclination 32.3
        AscendingNode 68.4
        ArgOfPericenter 243.7
    }
    UniformRotation {
        Period 10
        Inclination 32.3
        AscendingNode 68.4
    }
}

Re: How to do Binary Systems

Posted: 09.06.2009, 17:34
by ares2101
"Test" "ALF Men"
{
Radius 70000
Texture "exo-class2.*"
EllipticalOrbit {
Period 1
SemiMajorAxis 1
Eccentricity 0.4
Inclination 32.3
AscendingNode 68.4
ArgOfPericenter 243.7
}
UniformRotation {
Period 10
Inclination 32.3
AscendingNode 68.4
}
}

Hmm, toying with that and making planets with no inclination or tricks makes me think you have the solution to this...figures I just uploaded version 1 of Alpha Centauri to my site not even an hour after you posted this. Guess I know what I'm doing for version 2.0.

Thanks, pretty sure this is just what I needed.

Re: How to do Binary Systems

Posted: 12.06.2009, 02:24
by ares2101
Hmm, toying with that and making planets with no inclination or tricks makes me think you have the solution to this...figures I just uploaded version 1 of Alpha Centauri to my site not even an hour after you posted this. Guess I know what I'm doing for version 2.0.

Thanks, pretty sure this is just what I needed.

An addition; I just finished remaking my data for Alpha Centauri A using the solution recommended by ajtribick, it is now exactly how I want it, no funny side effects either! Ajtribick, thanks again, I'll be acknowledging you when the next version of my Alpha Centauri add-on hits my website.