What happens to the potential energy of a compressed spring when it dissolves in acid? Suppose we take a spring and compress it in a clamp. There is a potential energy due to the compression of the spring. It is now placed into a bath of acid that will dissolve the spring but not the clamp. What happens to the potential energy?
In a realistic situation one (weak) point on the spring could break, so it would then just ping out of the clamp and lose the energy that way. But in the ideal scenario where it dissolves at a uniform rate, this wouldn't happen, so what happens at the instant that it is completely dissolved? 
I thought maybe some kind of change of temperature would occur, due to the assumption that the compression would cause the atoms to be more tightly compacted causing a repulsion. As you remove layers this would gradually decrease, but there is still an inherent increase in energy for each atom, so this would most likely be expelled as something (like) heat.
I'm mainly interested in the detail of the mechanisms for the energy tranfers on an atomic level as opposed to the broad picture. Specifically the transfer from coulomb repulsion to heat in the acid. The more low-level detail the better.
 A: Start by considering a gas phase reaction between two reagents $\mathrm{A}$ and $\mathrm{B}$. If you were watching the molecules with a microscope you'd see the reagents $\mathrm{A}$ and $\mathrm{B}$ collide, and the products $\mathrm{C}$ and $\mathrm{D}$ emerging. If you measure the kinetic energy of the product molecules you'll find it differs from the kinetic energy of the reagents by the energy of the reaction. So, if the reaction is exothermic the products will have greater kinetic energy than the reagents. When we talk about the energy of a reaction we mean the increased kinetic energy of the products.
Now, reactions in solution are a whole lot messier, but the basic idea remains the same. If you dissolve a spring not in tension you have a reaction something like:
$$\mathrm{M + 2H^+ \to M^{2+} + H_2}$$
(for a divalent metal dissolving in acid) and the reaction energy will be (initially) carried away by the $\mathrm{M^{2+}}$ ion and $\mathrm{H}$ atoms. I say initially because, of course, the reagents are not interacting in isolation because they're surrounded by solvent molecules, but basically the reaction energy is carried away as kinetic energy. In a liquid this, of course, raises the temperature.
Now, when you put the spring under compression, you are pushing metal atoms together. So when they react they carry away not just the energy of the reaction but also a small amount of energy from the fact the metal atoms will spring apart from each other when they can. The total energy of the reaction products will be slightly greater than if the spring was relaxed.
So, by compressing the spring you are very slightly increasing the reaction energy with whatever is dissolving the metal, and the result will be that the solution ends up very slightly hotter. Needless to say, in practice the increase would be immeasurably small.
A: Your first assumption, that there would be a weakness in the material of the spring and it would suddenly break if corroded enough is what realistically would happen. 
In your idealized situation each atom dissolved in the liquid had a proportional part of the potential energy of the stressed spring. As it looses its bonds with the surface, bonding with the molecules that corrode the material, its potential energy becomes kinetic energy of the new molecule and, due to the large number of atoms, it will be small enough to just turn into the heat energy of the liquid. In this process the potential energy of the spring will be gradually transformed to heat energy of the liquid, as is your guess.
A: The potential energy stored in the atom of the spring will be converted into kinetic energy when they dissolve in the acid. and if the atoms dissolved in the acid have more kinetic energy the solution will take it as heat energy. so ultimately the potential energy will be converted to heat energy, i think.
