Dependence of fluid pressure being on height and not mass

Fluid pressure is calculated as

$$\rho = hdg$$

where $\rho$ is fluid pressure, $h$ is depth from surface, $d$ is density of fluid and $g$ is acceleration of gravity.

It used to make sense to me for square or rectangle shaped containers since pressure means force per unit area.

$$Pressure = \frac{Force}{Area} = \frac{Fluid \space Weight}{Container's \space Bottom \space Area}$$

and

$$h \times d \times g= \frac{h\times m \times g}{v} = \frac{h\times m \times g}{h \times s} = \frac{m \times g}{s} = \frac{Fluid \space Weight}{Container's \space Bottom \space Area}$$

where $m$ is mass, $v$ is volume and $s$ is bottom area.

I thought that pressure being dependent on $h$ and not $m$ would be acceptable since $m$ is also dependent on $h$ since fluids can't go higher when they have spaces to their sides.

One big obvious mistake I made was to assume that all containers would be squares or rectangles. So, now I can't wrap my mind around the concept that pressures on tennis balls in the following image are equal. Why are they equal when the weight (and mass) of fluid above them is obviously different?

• PS: I found a very similar question on the site before asking the question and I even took the image from there however, OP of that question asks something slightly different based on a thought experiment and it hasn't got an answer that answers my question so please don't mark as duplicate. – SarpSTA Feb 4 '17 at 23:33
• Pressure is weight over surface. Is this ratio really higher in the picture on the right? Why would that be the case? – Phoenix87 Feb 4 '17 at 23:41
• In the left diagram, you can think of the situation as a ball in a little cubical chamber being pressurized by a long, heavy piston with a small cross-sectional area (i.e., the narrow column of water). In the right diagram, you have the another ball in a cubical chamber but now the chamber is pressurized by an even heavier piston than the the one on the left AND this heavier piston also has a larger cross-sectional area than the piston on the left. So which chamber has a higher pressure? Sure, the piston on the right is pushing with more force, but that force is pushing over a larger area. – Samuel Weir Feb 4 '17 at 23:56

What you have ignored is the effect of the container walls.
The liquid is in equilibrium each particle has no net force on it. Whatever force the liquid above a small region of the liquid exerts on that region a region of the liquid at the same horizontal level has the same force exerted by the container wall.
So the region of liquid has the same force on it irrespective of whether there is liquid or a container wall above it.

So your analysis failed to include the contribution to the force due to the container wall.

Make a hole in the wall and the force due to the wall ceases to exist and liquid comes out of the hole. Let us consider the picture you provided(remove the tennis balls,they're useless here), and at a certain depth $h$ from the free surface of both tanks, connect them by another pipe as shown.

NOTE:both the free surfaces of the tanks are at the same distance from the pipe,which is horizontal.

If possible, let us assume that the pressures at the given depth $h$ is different in the tanks. Then water would flow from the right to the left(under the assumption that greater mass implies greater pressure). Also assume after transportation, no water is spilled over the brim of the tanks. Now, at equilibrium the horizontal pipe is at a distance of $h_1$ from the free surface of left tank and at $h_2$ from free surface of right tank($h_1 > h_2$). Consider a infinitesimally small fluid cube A of side $dh$ in the left tank, at the same level as the pipe. Let the force here be $\vec F = F_x + F_y + F_z$.

Clearly under equlibrium(taking z axis to be vertical):

$(F_x + dF_x)-F_x = 0$.............1)

$(F_y + dF_y) -F_y = 0$............2)

$(F_z + dF_z) - F_z = dV.\rho.g$.....3)[$dV = dA.dh$ is the volume of the fluid element.]

Clearly,from 1) and 2), we can see that $dP_x = \frac{dF_x}{dA} = 0$ and similarly, $dP_y = 0$

From 3), we have $dF_z = \rho.g.dA.dh$

or, integrating $P_z = \rho.g.h + C$ Clearly, $C = P_a$ (atmospheric pressure)

So, for the left tank, $P_z = \rho.g.h_1 + P_a$, while for the right tank it is

$P_z = \rho.g.h_2 + P_a$ [Assuming change in $P_a$ is negligible over $h_1 - h_2$.

But this means that the pressures are not equal at the same depth in the left and right tanks, and neither are the forces on the fluid elements. Thus, there will be further flow to attain equilibrium, net force on the fluid elements should be zero. This contradicts the assumption that equilibrium had been reached at $h_2$ and $h_1$. Hence, our primary assumption must also be false. i.e: there cannot be any water flow when we initially connect the pipes. Thus the pressures must also be equal at the same depth, whatever the shape of the tank.