I have done several of these to calculate needed detention volume based on a triangular hydrograph from Modified Rational. email me at mroberts@ndmce.com and I will forward some to you. They usually have to be customized to each City's criteria. It involves some sort of lookup function for Intensity values for different time values so it really helps if you have an IDF formula.