Free energy via adjusting buoyancy- why not? Answered
Hypothetical setup- a floating object which can adjust its own buoyancy via ballast tanks full of air (if it's a submarine) or compressing/expanding a helium bag (if it's a blimp). Naively, it feels like the amount of energy you could harness by letting it float and sink is a lot compared to the amount of energy required to adjust the buoyancy, but I'm starting from the axiom that free energy is impossible so I must have made an error somewhere.
If we take the example of a submarine, is it that filling the ballast tanks with air effectively raises the sea level by a tiny fraction, and that water's potential energy is what makes the submarine float upwards?
I guess in the case of a helium balloon, the act of inflating it pushes the atmosphere upwards and that is what provides it with lift. This question was prompted by a Youtube video of a hybrid helium-balloon-airliner that used buoyancy to reach altitude and then glided back downwards, which made me think "that's quite a neat idea... hang on... where does the energy come from?".