Transferring liquids in a confined space is in some cases difficult to understand.
May be the trim system used for compensating for weight shifting fore and aft gives an explanation.
The image of the system is shown below. One trimtank is situated forward and one aft, an approximate distance between the tanks of some 41,6 meters gives a proper correctional momentum by shifting a relatively small amount of water in the system. The water can be transferred either by the trimpump or airpressure. When the system is operated by the trimpump, water is pumped through the trimline. The volume of the shifting air and water in the confined system is constant (you don`t add air or water to the system) and according to plate 6 you don`t have local venting, everything is centralized in the controlroom. However as the volume of water is shifted, the air volum ("venting") has to be shifted as well. This can be done by the airpipe between the tanks by putting the blow/ venting cock in the pumping position, straight through the cock as indicated on my image below, allowing the air to move between the tanks. Thus by pumping water from one tank to the other the ventingair can be shifted to the opposite tank via the airpipe.
When trimming by airpressure the valves to and from the trimpump are shut, the water distributing ( Schalter) valve is put in a middle position and you have a direct water connection between the two tanks, shortcutting the trimpump. When selecting the tank for air pressurizing (blowing) you put the air / venting cock in the airpipe in the required position and as you pressurize one tank by the air blow valve, you vent the other. As you admit air to the system the tanks have to be vented into the boat, which means increasing the inside pressure of the pressure hull.
We usually used the trimpump avoiding increasing the ambient air pressure in the boat.
The above is just an example to illustrate the physics of moving liquids and air in a confined space like a submarine.
Tore