I would like to know what is happening at a chemical level-
not much that you can see: most of the chemistry happens in the cartridge, when the hammer initiates the decomposition of the gunpowder therein, resulting in a huge amount of compressed gas, that will propel the bullet towards the exit of the barrel (as this exit is the only game in town)
in the first "huge" bubble - the one next to the exit of the barrel - resulting thereof (which hence mostly is composed of the resulting explosion gases: mainly nitrogen, carbonmonoxie / dioxide, H
2O vapour and some nitrogenoxides) you might notice some smoke residue , esp. when it collapses, which should be (at least in part) due to
Boudouard's equilibrium being shifted towards CO
2 + C upon cooling
... and everything else is plain physics: no more chemical reactions involved
-How were the bubbles generated?
except of the first huge bubble (which I did explain above), everything else (the "channel(s)") in first place is a "vacuum tunnel" (well: not a perfect vacuum: there's some traces of gas in it still, but pretty much a vacuum, nevertheless)
the bullet leaving the barrel at approx. 1.5 times sonic speed (with the pistol, that is: modern rifles still might be several times faster), it will force the water in its way to move out of its path (with approx. the same speed in average) - resulting in kind of a slip stream behind the bullet, with literally nothing in it
-Are these "bubbles" hollow - as in, all water is forced from the area creating an effective gas bubble?
as I said, the initial channel is pretty much a vacuum channel
after that, you will observe this vacuum to collapse and recreate some secondary bubbles instantly thereafter.
this is due to the fact, that the implosion of this channel represents a lot of energy when the former "water - walls" of the tunnel finally will meet in the middle : they're colliding like cars crashing heads on at high speed.
this energy has to go somewhere, and aside form heating up some water, also, this will evaporate some of it, too.
so, these secondary bubbles (and tertiary and so on: the collapsing water vapour bubbles will show the same effect, which becomes smaller and smaller with every cycle, of course) are filled with water vapour.
-Notice that water does shoot above the resting water level - is the amount of water that rises into the air proportional to the volume of water that could fit into the gas bubbles that were created?
no
the surface effect is due to impulse - forwarding.
the volume of water droplets "elevated" times their average elevation extent roughly is a function of "energy forwarded by impulse minus energy required to separate the droplets from surface (
surface tension and thatlike)"
-If measured (...)
-How did the gas get there (...)
I hope you'll find these questions already answered above?
regards
Ingo