Following is the best explanation of pressure and velocity versus
length in a shotgun barrel that has ever been posted here.
Almost all shotgun powder burns within the first 2 inches
of the chamber. A typical fast burning powder will burn
in the first 3/4 inch of the chamber. This is where
maximum chamber pressure is attained. A typical fast
burning powder like Red Dot might give a chamber pressure
with a certain load of about 10,000 psi at that point.
This is why a chamber is very thick on a shotgun barrel
back at the chamber and gradually becomes thinner as
it gets further from the chamber.
After that first 3/4 inch, the pressure and tempurature
starts reducing. When the shot has travelled twice as far,
then the already burned powder which is now gas has
twice as much space available and the pressure therefore
drops to 1/2 what it was at 3/4 inch travel.
So when the shot has traveled 1 1/2 inches the pressure
drops to 5,000 psi if it was at 10,000 when the shot
had traveled 3/4 inch and was at max chamber pressure.
Likewise when the shot travels twice as far again, to
3 inches the pressure drops to half again. So when the
shot has traveled 3 inches the pressure is about 2500 psi.
This can be carried out on down the barrel and the
pressure keep reducing by half as the shot travel
doubles onward down the barrel. Here is a table giving
shot travel vs pressure.
inches

ressure
3/4 : 10,000
1 1/2 : 5,000
3 : 2,500
6 : 1,250
12 : 675
24 : 338
So as you can see as the shot travels further down the
barrel the pressure reduces. Since the pressure is
very high early on, the shot accelerates rapidly early
on. With 10,000 psi back initially it is accelerating
very fast. Once it gets out to 24 inches though the
pressure is only 338 psi, so the shot is accelerating
very little after that point.
Adding barrel length does give extra velocity, but its
not a lot once you have a barrel length approaching 30
inches. If you had a 2 inch barrel and increased it
to 4 inches though your velocity increase would be
very large. Increasing from 28 inches to 30 though
might only give you about 10 feet per second.
If you make the barrel very long, say something like
8 feet the pressure has dropped so much that the
gun hardly makes any noise. This barrel length thing
is why an 18 inch riot barrel is so much louder than
your 30 inch trap gun. The pressure wave let loose
upon the air at 18 inches would be substantially
higher than the pressure wave let loose from a
30 inch barrel.
The above explanation is not entirely accurate,
because barrel pressure also drops with temperature
as well as with getting more space available, and
the powder is also cooling as pressure drops, but
the above explanation is accurate enough to think
of it that way as a close approximation.