We’ve all heard that a shark must swim continuously or sink. Do you know why? It’s because sharks do not have a swim bladder. “This gas-filled sac provides buoyancy and helps to keep the fish afloat by keeping it in a neutrally buoyant state.” When in this state, the fish is neither rising nor sinking in the water.
Many bony fish – those having skeletons of bone rather than cartilage like our shark friends – have a swim bladder. It is located in the dorsal portion of the fish as noted in the anatomical sketch included in this post. The swim bladder can expand or contract by filling with or emptying itself of gas through the use of the gas gland. (In some less developed types of fish, the fish fills or empties the swim bladder with gulps of air.) The gas never passes through the wall of the swim bladder. You can think of the swim bladder as a sort of internal helium balloon.
When functioning properly, the swim bladder is used to bring the fish to a nearly weightless state. When a fish wants to dive, it expels gas from the bladder. When it wants to rise, it does the opposite, This results in less effort on the part of the fish when trying to maintain or alter its position. While this is fairly intuitive stuff, it might not occur to you at once that goldfish you’ve seen that are “swimming funny,” are goldfish with impaired functioning of the swim bladder. It is a problem with this mechanism that causes the goldfish to swim with the tail higher than the head.
Another benefit of a functioning swim bladder is that the weightless state of the fish leaves all of the energy for forward motion. “Using the fins to generate lift means a fish can’t be using them to provide forward thrust. With a swim bladder, neutral buoyancy is ensured and bony fish are free to use their fins for forward motion.”
More on this topic: Modeling Ships and Space Craft: The Science and Art of Mastering the Oceans and Sky by Gina Hagler — Part I – Fluid Dynamics in Action, Chapter Three – Aquatic Creatures
(Quotes are taken from Modeling Ships and Space Craft)