Submarine ends upside down, how will it go up?

Bouyancy for modern submarines requires that the ballast tanks be trimmed as necessary with air and the tanks have valves at the tops to keep that air in, however the bottoms of the ballast tanks are open to the sea (consider that the water which displaces that air does have to come from somewhere, ya know?)

A submarine which (for whatever bizarre reason) should happen to become fully inverted would have the air in the ballast tanks empty out almost instantly and any attempts to pump more air to replace the lost bouyancy would simply allow that additional air to escape as well. Without the support of this air the submarine would descend to the bottom (or more likely, would sink to crush depth and the hull would collapse under the intense pressure).

And before anyone comes up with any bright ideas about using the engines to bring the sub rightside up i would point out that a nuclear reactor subjected to these sort of gymnastics would have scrammed rather promptly leaving the sub powerless and sinking into the darkness (not that the sub’s control surfaces are made for the challenge of flipping a submarine back over from an inverted position anyways). Regardless, an upside down submarine is effectively a doomed one.
wolf189 (former submariner)