On the topic of mufflers I have a wag.
A muffler is similar to a ported speaker box.
It should be tuned to the max power of the motor. The rpm can be viewed as frequency.
We would want a muffler/ box with a resonant frequency of our target rpm or frequency. Let's say 10krpm or 10 kHz.
To find this we need the compliance VAS of the the speaker/ pulse generator/ piston port opening I don't know how to do that but. We know the smaller the box the higher the frequency.
Operating at less than resonant frequency limits or essentially closes the outlet. Good news is it will not be as loud.
The port. Let's say we use a 1/2" piece of emt. If the pipe is 2" long and only extends 1/4" out of the muffler we subtract the tube area from the muffler area. It tunes our box for a higher rpm
If we stick the tube 1 3/4 " out of the muffler the area is added to the box. Our resonance frequency will be lower. Because we made the box bigger.
Now when it comes to diameter of the tube. Larger is more efficient. Really no surprise. A 3/4" EMT will be more efficient. The reason it friction along the walls of air hitting itself at high speed.
Round is the best shape because it will have the most open area for a given perimeter.
So this is my guess hope I explained it well. I wish someone knew a bunch about box design.
David