I got to twin turbocharge a VR6 engine for my mechanical engineering senior project, so it is nice to see people actually doing stuff that they are interested in.
I suspect that there is little to no engineering calculation that goes into aftermarket exhaust design, and it is more driven by packaging. They are probably pulling from tried and true exhaust designs, dynoing the prototypes and boxing them up as an "engineered" product. The key (i think) is to design the exhaust for a certain RPM range, and not for peak horsepower. Figure out your flowrate based on Engine size and RPM to properly size the piping, and keep your bends smooth...remember that 90 degree bens are bad
If you look at a true dyno plot of an aftermarket exhaust, you will find gains and losses compared to the OEM exhaust. The plots that show HP curves with gains across the board are typically fictional...especially on a car like an M3 that was designed with performance in mind from the start.
Good luck, and have fun man!!