A submarine is a ship able to navigate under water.
The principle of operation is based on finding a balance between the weight of the ship which tends to sink and buoyancy which makes the ship float.
The intensity of the buoyant force is proportional to the mass of water displaced by the immersed parts of the object.
see the animation "float or sink".
Click on the buttons to fill or empty the ballast tank.