Binary Star Initial Speed
You will always get a &quot;stable&quot; orbit if the stars have less than escape velocity relative to each other. (unless you are modelling the stars as having non-zero radii so they can collide)  The stars will enter into elliptical orbits around a barycentre.
But I guess you want a circular orbit. For a circular orbit the speed $v$ is given by
$$v^2=GM/r$$
where r is the orbit radius (from the centre of mass), G is Newtons gravitational constant, and M is the reduced mass
$$M= \frac{m_1m_2}{m_1+m_2}$$
for stars of mass $m_1$ and $m_2$.
You will find it convenient to use astronomical units (not SI units), so distance in AU, time in years, mass in &quot;solar masses&quot;  In these units $G=(2\pi)^{2}$ and you avoid difficulties with very large and very small values. (in these units the speed of the Earth is $2\pi$ AU/year which makes sense)