From hydrostatics, it is said that when you have a liquid with no moving parts, the pressure does not vary on any horizontal slice of the liquid. The pressure only varies with depth.
Thinking about this led me to consider the following scenario that might contradict this.
Suppose I have water in a fully sealed and fully rigid container. We say it is located on Earth, so gravity is present as usual. Now suppose there is a small air bubble at the top of the container, as shown in the sketch below.
To a good approximation, the air bubble has a uniform pressure $P_{\text{Air}} = \text{const}$ everywhere inside the air bubble. The water presumably has a linear pressure gradient downward: $$ P(z) = \gamma z $$ where $z$ is the distance from the top of the container to the given level and $\gamma$ is the specific weight of the water. Maybe more accurately, the air bubble causes the water at the top to have some pressure as well, so maybe we should write $$ P(z) = P_{0} + \gamma z. $$ Let's say for the sake of the questions, the air bubble is $h = 3\text{ mm}$ in height.
Now the problem is that there seems to be a contradiction between the following three ideas:
- Pressure must be continuous with respect to position, including across the air-water interface.
- The pressure of the water must be the same at every horizontal slice, and it only linearly increases with depth.
- The pressure is approximately uniform/constant in the air bubble.
All three of these can't be correct simultaneously. Which one(s) is/are wrong?
What I really wonder is, what is the pressure distribution $P = P(x, y, z)$ throughout the whole container, and how can you derive this from first principles? I am really curious to know if there is anything out there that deals with these kinds of scenarios.