Diving of submarine

I have a problem which I am confident that I can solve by dynamic methods but I want to solve it by using conservation of energy to check that my answer is correct. I tried posting on the physics site but got no response.

Consider a submarine near to the surface. It has an internal pressure of 0 Gauge and an internal buoyancy control tank also at 0 Gauge. The submarine is stationary so its average density is equal to the density of water.

The submarine subsequently dives (very slowly), as it dives the hull is compressed thus reducing in length and diameter. Water is pumped out of the buoyancy tank to maintain the average density equal to that of water (must be done during decent to avoid buildup of kinetic energy).

WHAT I CAN CALCULATE
1. Reduction of hull diameter at any depth
2. Reduction of hull length at any depth
3. Volume of water pumped out at each depth (and hence energy required to do this)
4. Energy stored in the steel hull due to the deformation of the steel (three components, radial, axial and circumferential)
5. Checked that energy required to pump out the water matched energy stored in the steel hull.

WHAT I CAN'T DO
I think that I should be able to examine the starting state and the end state without taking any notice of how, or at what depth the buoyancy water was pumped out. I should be able to show that the total energy at the beginning of the study is equal to that at the start.

However, if I do this then the energy stored in the steel appears to come from no where.

START OF STUDY
There is a submarine sized item near to the surface with gpe=mgh
There is a equivalent submarine sized volume of water near the bottom with no energy gpe=0

END OF STUDY
There is a submarine sized volume of water near the surface with gpe=mgh
There is a submarine sized item near to the bottom with gpe=0
There is a volume of water matching the change in submarine volume near the bottom with gpe=0
There is a strained metallic tube with pressure energy.

Some Considerations

2. The potential energy change that occurs on the difference in elevation of the submarine may be used to account for the energy transfer to the hull

3. Minor point - the neutral buoyancy condition is when the weight of the volume of water displaced by the submarine is equal to the weight of the submarine. As the submarine shrinks in size it will displace less volume and you will need to compensate more by shedding the weight of the trim tanks by pumping more to the ocean