That "energy" has to come from the exploding gunpowder. Would exploding gunpowder accelerating the bullet down the barrel be the same as the energy released in Tark's test?
My point is that there's more to these things than just "energy".
And to answer your question: no. The energy released from the exploding gunpowder accelerating a bullet down the barrel is NOT the same as the energy released in tark's test.
Don't get me wrong...the TOTAL energy of the SYSTEM is conserved. But energy comes in many forms and is converted from one to another. A moving bullet is taking energy away from the chemical reaction in the form kinetic energy. Some of that kinetic energy is, in turn, converted to heat energy by friction between the bullet and the barrel. Some of the energy from the chemical reaction of the burning powder is converted directly to heat, some of which is transferred to the metal of the brass and firing chamber. Some is converted to kinetic energy in the form of gasses which leak out around the brass and firing chamber walls.
There are two basic types of energy: potential and kinetic. Potential energy is stored energy. Kinetic energy is inherent in moving objects.
Energy comes in many forms and it can accomplish different things depending on the type of energy you have...and how it's converted into some useful form for a given task. Stored energy in chemicals, like gun powder for example, only becomes useful when it's released to create heat and pressure. That heat and pressure in turn only becomes useful from the standpoint of a firearm when it's converted to kinetic energy. Kinetic energy, however, only lies in objects that are moving...no motion means no kinetic energy.
Once a bullet starts moving, it has kinetic energy...which means the bullet is taking SOME energy AWAY from the energies that were released when the chemical reaction took place.
Once a mass is in motion is also has a quality called "momentum". Momentum is not energy. Momentum has a vector, kinetic energy does not. Momentum is always conserved...kinetic energy is not.
In a collision, momentum is always conserved , whether the collision is elastic or inelastic. It's a straight forward application of mass times velocity.
Kinetic energy, however, is only conserved in elastic collisions. In inelastic collisions, it gets converted into other forms...such as heat, sound, deformation of objects, etc.
When the bullet is held in place to prevent any relative motion between it and the rest of the gun, then there is no transfer of kinetic energy down the barrel. The bullet also develops no momentum which can be transferred down the barrel. With no relative linear motion imparted to the bullet, there is also no "recoil" (conservation of momentum).
This means that the energy released from the chemical reaction of the burning powder is felt solely on the immobile portions of the firing chamber region. If the pressure generated by this release of stored energy is not sufficient to overcome the fracture toughness of these components, then those components will not "break".
So the pressure has no choice but to be either contained, leaked out, or converted to other forms of energy, like heat, which can be absorbed by the surrounding material.
Does this make sense?
If not, think of it this way:
A gas cylinder can be thought of as a firing chamber of a gun in which the bullet is not allowed to move, if you simplify it.
If you force more gas into the cylinder, what happens? The pressure inside the cylinder goes up. It also gets hotter. So long as the pressure does not exceed the fracture toughness of the cylinder, the cylinder will not break. The energy used to force the gases in is converted to potential energy (static pressure) and heat. The excess heat is eventually transferred to the cylinder walls, where it radiates out until the cylinder comes to thermal equilibrium with the rest of the environment.
If the cylinder develops a leak, some of the gasses slowly leak out...converting potential energy to kinetic energy in the process. The lowering pressure also transfers heat away from the cylinder, and it cools down some.
Now, back to the firing chamber with the immobilized bullet:
Potential energy is converted to heat and pressure by the chemical reaction. If that pressure does not exceed the fracture toughness of the material, then nothing breaks. The heat gets transferred to the surrounding structural materials and the gases leak out, lowering pressure and removing more heat.