Submarine
How it works?
So in order to know whether the submarine is floating or submerging is by the buoyancy. The buoyancy is controlled by the submarine's inner and outer hulls. Whenever the submarine is resting its a positive buoyancy, and if it's submerges its an negative buoyancy. To control the the depth of water you have to adjust the water to air ratio in the ballast tanks. The submarine can come at neutral buoyancy whenever it is even, it can not sink at this point. Whenever its at positive buoyancy , the submarine is less dense than the water, so it rises.
So in order for a submarine to work efficiently, it uses Archimedes' Principle and Boyles' Law. Which states that upward buoyant force that is exerted on a body immersed in a fluid, whether fully or partially submerged, is equal to the weight of the fluid that the body displaces, also the product of absolute pressure and volume is always constant. There is two tanks located in the submarine one in the front called forward, and one in the back called aft which helps keep water from coming in or out.
Basic Components
The pressure hull is the inner hull that is made much stronger and resistant to immense water pressure. Strongest material used for these hulls are titanium or steel. The Ballast tanks are between the two hulls, when it is filled with air the submarine rises to the surface. When it is filled with water it sinks to the seabed. The changing of amount of water or air is called Buoyancy (ability to float). The Trim tanks are at the front of the bow, it helps to raise or lower the boat. So since the boat is always under water and cant have air all the time, all submarines but nuclear use diesel-electric engines. Reason behind why they're shaped like they're is that so it can slip through the water smoothly, the Conning tower is placed in the center for navigation. Diving planes and or hydroplanes used to control the submarine to go up or down, the fins can be tilted to switch the angle at which it lowers or rises itself. Periscopes are just used whenever at the surface or beneath it. The SONAR system is used alot like a radar , which sends sound waves into the sea and listen for any echoes. Inertial guidance is used to see how far the submarine has traveled and in which direction.
Hypothesis
If the submarine were to fail, then it would sink to the bottom of the ocean. For example, if you were cruising through the water and the submarine SONAR system started not to work, then therefore them being underwater and not being able to see anything they would probably end up going in the wrong direction or possibly wrecking. So if this were to happen then they wouldn't have no way to fix the submarine because of them being located where they're.