Underground atomic bomb tests are done in a deep, sealed hole. Not all underground tests eject material on the surface. In this case, they are only noticeable as earthquakes, according to German Wikipedia on nuclear tests. There seems to be no bulge above the explosion site afterwards.
I assume the explosion creates a cavity. Also, I assume that rocks are not very compressible, more so for rocks deep under ground, without many gas-filled pores.
I'd like to understand where the volume of the rock goes. Is it one or more of these:
- Rock is compressible, and the surrounding rock is just squished a little after the explosion.
- The ground is elastic, and there is no cavity after the explosion.
- There is a bulge on the surface, it's just too flat to be noticeable, but has a large volume.
- the cavity is so small that the bulge on the surface is so flat that it is not noticeable.
- There are enough pores filled with compressible gas in rocks generally, which end up with higher gas pressure after they lost some or most volume, with the total lost volume being the same as the cavities volume.
Regarding compressibility, "Geologic materials reduces in volume only when the void spaces are reduced, which expel the liquid or gas from the voids." (Wikipedia: Compressibility - Earth science) The answer of LDC3 hints that it can be assumed that the ground chosen for nuclear tests is most probably not porous, to avoid migration of radioactive isotopes. From this, it could be concluded that compressibility is not an important factor, which is certainly counterintuitive.
There are probably some more options, and it may be more than one mechanism. But where does that volume mainly come from?
