(In what I've written below, I've tried to be as clear as possible, including mentioning things I'm sure you already know. However, some people reading this might not be aware of some of them.)
You first have to decide an appropriate separation for the stars. This is the sum of the two stars' semimajor axes.
Typically "a" is used as the symbol for an object's semimajor axis, and one uses an appropriate number to identify the stars. As a result, the total separation between the two stars can be written as (a1+a2).
At any particular time, the distance of one of the stars from the barycenter is inversely proportional to its mass. That is, low mass stars orbit far from the barycenter while high mass stars orbit close to it. One way of looking at is that low mass stars don't pull on high mass stars very hard -- it's like a teeter-totter. To be balanced, someone heavy sits near the axis and someone light sits farther away.
Then, knowing the stars' individual masses (let's call them m1 and m2) and the sum of their SMAs, you can calculate their individual SMAs using the formulae
a1 = (a1+a2) * m2/(m1+m2)
and
a2 = (a1+a2) * m1/(m1+m2)
These are how I'd write them for calculating in a Fortran program. When writing them on paper, they might look more like this:
Code: Select all
m2
a1 = (a1+a2) -------
(m1+m2)
and
m1
a2 = (a1+a2) -------
(m1+m2)
Does this help?
p.s. In the above, I'm assuming that the semimajor axes (a) are measured in units of AU, the distance of the Earth from the sun, and that the masses (m) are measured in units of the Sun's mass. Otherwise one has to take into account a Gravitational Constant to convert the units appropriately.