Before I started to write this answer, I thoroughly read this question, its answers and comments:
So, my question tries to ellaborate over this, considering that, for single speeds, there will always be a certain unique chainlength (for a new drivetrain) given the gear sizes and the number of links in the chain. Also, for vertical dropouts, where chainstay length is fixed, there might be a "magical gear" when you have almost zero chain-slack with the right combination of sprocket teeth number, chainring teeth number, and number of chain links.
Then, I think the following assumptions should be made:
- The chain perimeter is the sum of the distances between the consecutive centerlines of each pin;
- The nominal distance between centerlines, in a new chain, is half an inch, or "exactely" 12.7mm;
- The chain is considered to run a straight line between the tangent points where it touches each gear (sprocket or chainring);
- The chain is considered a regular polygon sector along the circumference of the gears, as pointed by Lantius in his answer to the linked question.
The result would be the answer to the question: "If I wrap a closed chain with N links around a spocket with S teeth and a chainring with C teeth and pull those apart, what would be the distance between the centerlines of the cog and the chainring?"
EDIT: I'm including an "updated" drawing I generated programmatically (it's quite involving!), so it would be easier to analyze the geometry of the problem:
X is the chainstay length, and it is the hypotenuse of the purple triangle, the short cathetus being R-r (known), and the longer cathetus being equal to B (unknown).
EDIT: (added trig formula) The whole length L of the chain (known) is equal to A+B+C+D. Since B = D, then L = 2B + A + C, or, with all the added trig:
The unknown (B) appears in both sides of the equation, and it looks like it cannot be isolated.
(To make matters worse, there are the natural limitations that teeth profile is not always the same between brands, there might be very small variations of link length between different chains even of the same brand (happens to me quite often), how much chainslack is actually necessary is debatable, and so on, but it would be nice to have a "canonical formula" which actually considers the physical nature of the pinion-and-chain engagement and allows us to calculate this, at least theoretically.)
Thanks for reading!