You maybe a little over your hear on this one. Tuned pipes require absolutely presice timeing of when negitive and positive pressures waves are sent back to the cylinder to be truly tuned. These pressure waves either suck out more exaust gasses alowing more charge (air/gas mix) to enter the cylinder or push the charge back in. Due to different shapes of pistons, the way charge enters the chamber is different for all engines so I would find it hard to belive that any formulas or programs are out there. Your best bet is to look at other tuned pipes also take a look at www.howstuffworks.com, they can explane the principles at play and give you a good place to start. Make pipe, see how it works, then just play with different body, stinger, etc. lengths. Your end product may not quite what you want it to be but if done right it will be better than stock. (sorry about the spelling),.
Good luck, I'm interested in the end results
Jon