1. Create a StarBarycenter:
Code: Select all
// Example
StarBarycenter "MyTestStar"
{
RA 10 25 12.57
Dec -27 37 12.87
Dist 171.53
Class "G2 V"
}
Sometimes something like this appears:
Therefore I recommend to use the spectral class of the main star as 'Class'.Type Blue hypergiant
Spectrum O0 0
(But that only happens when you make a 'StarBarycenter' without a 'Star'.)
2. Create two Stars.
Code: Select all
// Example
Star "MyTestStar A"
{
ParentBody "MyTestStar"
Class "G2 V"
MassSol 1
Orbit
{
SemiMajorAxis 0.333333333333333
Period 0.816496580927726
Eccentricity 0.0
Inclination 0.0
AscendingNode 0.0
ArgOfPericenter 0.0
MeanAnomaly 0.0
}
}
Star "MyTestStar B"
{
ParentBody "MyTestStar"
Class "K2 V"
MassSol 0.5
Orbit
{
SemiMajorAxis 0.666666666666667
Period 0.816496580927726
Eccentricity 0.0
Inclination 0.0
AscendingNode 0.0
ArgOfPericenter 180.0
MeanAnomaly 0.0
}
}
Eccentricity, Inclination; AscendingNode and MeanAnomaly must be the same for both stars. (I set all values to 0)
ArgOfPericenter must differ by 180 degrees.
SemiMajorAxis and Period must be calculated.
SemiMajorAxis is calculated using this formula:
andSemiMajorAxis = Distance * MassA / (MassA + MassB)
Distance is the distance between the two stars in astronomical units (Au)SemiMajorAxis = Distance * MassB / (MassA + MassB)
MassA is the mass of star A in solar masses and MassB is the mass of star B in solar masses.
(The second SemiMajoAxis can also be calculated by subtracting the first SemiMajorAxis from the distance.)
The smaller value of SemiMajorAxis belongs to the more massive star!
Period is calculated as follows:
That's it.Period = sqrt(DistanceAu^3 / (MassSolA + MassSolB))