Longer barrels do gain speed over short barrels and heavier black powder charges gain speed over lighter charges from either short or long barrels.
Some examples here from the Lyman BP handbook tested over a
chronograph show a .50 caliber BP rifle with a .498" ball and .015" patch with G/O 3f as follows.
50 grains, 26" barrel, 1348 fps
50 grains, 43" barrel, 1506 fps
100 grains, 26" barrel, 1882 fps
100 grains, 43" barrel, 2095 fps
130 grains, 26" barrel, 2124 fps
130 grains, 43" barrel, 2295 fps
The formula is: 11.5 grains per cubic Inch of bore. You need a 36 inch barrel in .50 caliber to burn 80 grains of powder efficiently. (Actually, 81.29 grains!)
Using the calibre ( .50) determine the radius, because you need to know the area of a circle that size before determining the cubic length and content of a cylinder that diameter. The formula for determining the area of a circle is " Pi R Squared". Pi is 3.1416 for our purposes. R is the Radius.
Now the radius is half the diameter, so use .25 as your radius. Now square the radius, by multiplying it times itself.
.25 x .25= .0625. Now multiply that number times 3.1416, which equals .1963125.
Now, multiply that number times 11.5 = 2.2580.
Now, multiply that times your barrel length to get the volume of the cylinder that is your bore length and diameter. 36 x 2.2580 = 81.288, or 81.29 grains.
Charles Davenport did NOT Invent the formula. It was worked out centuries before him to use with all Black Powder firearms. Ordnance was concerned not only with how much powder needed to be shipped on warships to feed cannons, but also with how much powder was needed to feed muskets and later, rifles.
The King would not be very happy if he spent his money to send his army to a distant shore to battle foreign armies, only to be told his war was lost because the ordnance department didn't send along enough powder! So, bean counters were around a long time ago. The formula is NOT JUST FOR Cannons.
The formula does NOT say you can't PUT more powder in your barrel, or FIRE more powder in your barrel, or even GET MORE velocity by putting more powder in your barrel. It deals with getting the Most Velocity from the barrel with the Least Amount of Powder- that is " Efficiency".
When you pass the Efficient formula amount, you venture into the "Law of Diminishing Returns", that is, you get less and less increase in velocity for each measured increment in increase of powder.( Caveat: Particularly with shooting PRBs, the coefficient of friction between the PRB and the bore is so small, that you can get fluctuations in these velocities as you increase powder charges beyond the "efficient " formula- recommended load. Only meticulous attention to cleaning the barrel between each shot, and shooting long shot strings, to average, is going to give you a better idea about how any " Over charge load " will shoot out of your gun, on a particular day, with particular temperature and humidity present.)
Before overcharging any gun, you should take into consideration that the Sound Barrier does bad things to any projectile, but does even nastier things to a RB. Pushing any RB over 1135 fps. requires that ball to come back down through both the Sound Barrier, and the Transonic Zone, where all kinds of forces hammer the ball in the air.
And you should also consider that the faster something leaves the barrel to fly through the air, the faster it will slow down. You can see this clearly if you look at the tables in the Lyman Shotshell Reloading Manual( any edition) that shows shot size, MVs, and then down range velocities at 20, 40 & 60 yards. The Chart makes it very easy to compare loss of velocity for the faster MVs vs. the Slower MVs. for any particular size shot you are interested in.
Since "bird shot " are simply smaller Round Balls, the principles of Aerodynamics that apply to shot also apply to shooting a single Round Ball from a rifle or smoothbore through air.
Charles Davenport is reported to have walked the firing lines at Friendship each year talking to the shooters, asking the caliber of their rifles, and their barrel lengths, and then consulted his book to give them their maximum efficient load. Phil Quaglino relates that Davenport told shooters to reduce that max. efficient powder charge by 10% and then work up to find the most accurate load for their gun. The 10% factor helped to make adjustments for barrel harmonics, that are unique to each gun.