Let us then fix compression stroke x, plunger tube length d, and maximum compressed length d-x. If the segment of spring you use exceeds maximum compressed length (distance from plunger head to spring rest when plunger rod is at catch) then your gun won't prime.
Given x and d, you have two options:
- Maximum acceleration: optimize with regard to k. That is, find the spring with the highest k, such that the section you use will compress to a distance (solid length) less than or equal to d-x. Solid length is initial length * CPI * wire diameter.
- Maximize energy: this one is trickier, and most likely, requires you to use a weaker spring, and "precompress" it. The mathematical model is as follows
max k*(L-d+x)^2 - k*(L-d)^2
such that: L * CPI * WD <= d-x
If anyone cares, I'll actually crank out the optimization for that problem, but the answer will be quite meaningless, since the final optimization point is a function of both spring characteristics and the length you use. You still have to arbitrarily fix OD/WD before you can get any useable data.
The main point is that in maximizing acceleration, you can just fix L=d and maximize k subject to the compression constraint. In maximizing energy, L > d and varies with k.