Ok, exhaust theory is a great big subject in of itself.
In general:
* Exhaust diameter should be large enough to evacuate all the exhaust from the engine at the peak of horsepower, while maximizing exhaust velocity, no matter how long the pipe.
* Exhaust length should be long enough to provide the strongest vacuum during vavle overlap where you want your peak torque to be. Shorter length piping will move your peak torque up the powerband, longer piping length moves it farther down the powerband.
Both diameter and length can be tuned depending on what you're after, but you add a whole 'nother wrench in the mix when you start changing exhaust diameter before the end of the pipe. Sometimes a large tipped muffler can act as a reversion chamber or expansion chamber, both of which can play havoc with the sound waves and spacing of said waves in the exhaust. It's that reason that I really despise mufflers that have a larger outlet than inlet. The muffler is usually short enough that it doesn't adversely affect anything, but it just really isn't necessary to have a tip any bigger than your piping.
I could go farther in depth, but in order to follow all the physics behind exhaust theory, a thermodynamics and fluid dynamics class would be beneficial.
__________________
-Harry
AIM: NDcissive
CRX and Pre '92 Civic, Engine Tech and Tuning, & Track and Autocross Forum Mod